You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nils <co...@lolili.de> on 2004/05/11 13:31:39 UTC

xsp:logic question

Hi there,

i have:

	if (<xsp-request:get-server-name/> == "localhost") {
		....some code...
		}

i know exactley, that <xsp-request:get-server-name/> returns localhost, but
"...some code..." never gets executed...

any hint?

bye,
nils


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: xsp:logic question

Posted by defe <de...@free.fr>.
Nils wrote:

>Hi there,
>
>i have:
>
>	if (<xsp-request:get-server-name/> == "localhost") {
>		....some code...
>		}
>
>i know exactley, that <xsp-request:get-server-name/> returns localhost, but
>"...some code..." never gets executed...
>
>any hint?
>
>bye,
>nils
>
>  
>
maybe, try

if ("localhost".equals(<xsp-request:get-server-name/>) ) { ... }

>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: xsp:logic question

Posted by "John L. Webber" <Jo...@jentro.com>.
How about

if (<xsp-request:get-server-name/>.equals("localhost"))


John

Nils wrote:

>Hi there,
>
>i have:
>
>	if (<xsp-request:get-server-name/> == "localhost") {
>		....some code...
>		}
>
>i know exactley, that <xsp-request:get-server-name/> returns localhost, but
>"...some code..." never gets executed...
>
>any hint?
>
>bye,
>nils
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>

-- 
---------------------------------------------------------
 Jentro Technologies GmbH
 John L. Webber, Software Development
---------------------------------------------------------
 Rosenheimer Str. 145e	    81671 München
 Tel. +49 89 189 169 80     mailto:John.Webber@jentro.com 
 Fax  +49 89 189 169 99     http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may otherwise be legally privileged. It is intended for the named recipient only. If you have received it in error, please notify us immediately by reply or by calling the telephone number above and delete this message and all its attachments without any use or further distribution of its contents. Please note that any unauthorised review, copying, disclosing or otherwise making use of the information is strictly prohibited. Thank you. 
---------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


AW: xsp:logic question

Posted by Nils <co...@lolili.de>.
yeah,
thanks for the answers, that works!

bye,
nils

> -----Ursprüngliche Nachricht-----
> Von: gounis@osmosis.gr [mailto:gounis@osmosis.gr] 
> Gesendet: Dienstag, 11. Mai 2004 14:24
> An: users@cocoon.apache.org
> Betreff: Re: xsp:logic question
> 
> 
> 
> 
> use equals() instead
> 
> 
> String o = <xsp-request:get-server-name/>;
> if (o.equals("localhost")){
> 
> ... some code ...
> 
> }
> 
> 
> --stavros
> 
> 
> 
> On Tue, 11 May 2004, Nils wrote:
> 
> > Hi there,
> > 
> > i have:
> > 
> > 	if (<xsp-request:get-server-name/> == "localhost") {
> > 		....some code...
> > 		}
> > 
> > i know exactley, that <xsp-request:get-server-name/> returns 
> > localhost, but "...some code..." never gets executed...
> > 
> > any hint?
> > 
> > bye,
> > nils
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: xsp:logic question

Posted by go...@osmosis.gr.

use equals() instead


String o = <xsp-request:get-server-name/>;
if (o.equals("localhost")){

... some code ...

}


--stavros



On Tue, 11 May 2004, Nils wrote:

> Hi there,
> 
> i have:
> 
> 	if (<xsp-request:get-server-name/> == "localhost") {
> 		....some code...
> 		}
> 
> i know exactley, that <xsp-request:get-server-name/> returns localhost, but
> "...some code..." never gets executed...
> 
> any hint?
> 
> bye,
> nils
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org