You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dirk <st...@pandora.be> on 2004/01/05 14:19:04 UTC

simple question

How can i have a dynamic value in the action ?

The following is not working .

<bean:define id="url" value="/setUp.do?action=all" type="String"/>

<html:form action="<%=url%>">



Thanks !

Re: simple question

Posted by Mark Lowe <ma...@talk21.com>.
Here are some random guesses.. Looks like it should work to me.

I use

<html-el:form action="${url}">

usually url is defined in a tiles def but what you're doing should work 
fine..

what about

<c:set var="url" value="/foo.do" />

to test if its some problem with the bean:define tag you could try.

<%
java.lang.String url = "/foo.do";
pageContext.setAttribute("url",url);
%>

or perhaps your container is storing your variable as an object. so

<html:form action="<%= url.toString() %>">

Cheers Mark

On 5 Jan 2004, at 15:15, Camron G. Levanger wrote:

> I think it may depend on the servlet container.  Currently i am unable 
> to do it (tomcat 5) however I know I have done it before in one of the 
> 4.x versions.
>
> Camron G. Levanger
> The Dreamlab
> www.dreamlabmedia.com
> (866) 890-3705
> On Jan 5, 2004, at 7:12 AM, dirk wrote:
>
>> I can write
>> <bean:write name="url"/>
>>
>> but not <%=url%>
>>
>> then i get an
>>
>>  org.apache.jasper.JasperException: Unable to compile class for JSP
>>
>> any idea ?
>>
>> Thanks !
>>
>>
>> ----- Original Message -----
>> From: "Nicolas De Loof" <ni...@cgey.com>
>> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>> Sent: Monday, January 05, 2004 2:40 PM
>> Subject: Re: simple question
>>
>>
>>> It should work (I use it !)
>>>
>>> Did you include the taglib directive for struts-bean ?
>>>
>>> Nico.
>>>
>>>
>>>
>>> How can i have a dynamic value in the action ?
>>>
>>> The following is not working .
>>>
>>> <bean:define id="url" value="/setUp.do?action=all" type="String"/>
>>>
>>> <html:form action="<%=url%>">
>>>
>>>
>>>
>>> Thanks !
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: simple question

Posted by "Camron G. Levanger" <ca...@dreamlabmedia.com>.
I think it may depend on the servlet container.  Currently i am unable 
to do it (tomcat 5) however I know I have done it before in one of the 
4.x versions.

Camron G. Levanger
The Dreamlab
www.dreamlabmedia.com
(866) 890-3705
On Jan 5, 2004, at 7:12 AM, dirk wrote:

> I can write
> <bean:write name="url"/>
>
> but not <%=url%>
>
> then i get an
>
>  org.apache.jasper.JasperException: Unable to compile class for JSP
>
> any idea ?
>
> Thanks !
>
>
> ----- Original Message -----
> From: "Nicolas De Loof" <ni...@cgey.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, January 05, 2004 2:40 PM
> Subject: Re: simple question
>
>
>> It should work (I use it !)
>>
>> Did you include the taglib directive for struts-bean ?
>>
>> Nico.
>>
>>
>>
>> How can i have a dynamic value in the action ?
>>
>> The following is not working .
>>
>> <bean:define id="url" value="/setUp.do?action=all" type="String"/>
>>
>> <html:form action="<%=url%>">
>>
>>
>>
>> Thanks !
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>

Re: simple question

Posted by dirk <st...@pandora.be>.
I can write 
<bean:write name="url"/>

but not <%=url%>

then i get an

 org.apache.jasper.JasperException: Unable to compile class for JSP

any idea ?

Thanks !


----- Original Message ----- 
From: "Nicolas De Loof" <ni...@cgey.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, January 05, 2004 2:40 PM
Subject: Re: simple question


> It should work (I use it !)
> 
> Did you include the taglib directive for struts-bean ?
> 
> Nico.
> 
> 
> 
> How can i have a dynamic value in the action ?
> 
> The following is not working .
> 
> <bean:define id="url" value="/setUp.do?action=all" type="String"/>
> 
> <html:form action="<%=url%>">
> 
> 
> 
> Thanks !
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: simple question

Posted by dirk <st...@pandora.be>.
No thats not it,

It's not working with or without type... org.apache.jasper.JasperException

Thx

----- Original Message ----- 
From: "Matthias Wessendorf" <ma...@matthias-wessendorf.de>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Monday, January 05, 2004 2:42 PM
Subject: RE: simple question


> hi,
> 
> perhaps it is this:
> (look at:
> http://jakarta.apache.org/struts/userGuide/struts-bean.html#define )
> 
> type:
> Specifies the fully qualified class name of the value to be exposed as
> the id attribute.
> [ java.lang.String (if you specify a value attribute) or
> java.lang.Object otherwise. ] [RT Expr]
> 
> 
> greetings
> 
> -----Original Message-----
> From: Nicolas De Loof [mailto:nicolas.deloof@cgey.com] 
> Sent: Monday, January 05, 2004 2:41 PM
> To: Struts Users Mailing List
> Subject: Re: simple question
> 
> 
> It should work (I use it !)
> 
> Did you include the taglib directive for struts-bean ?
> 
> Nico.
> 
> 
> 
> How can i have a dynamic value in the action ?
> 
> The following is not working .
> 
> <bean:define id="url" value="/setUp.do?action=all" type="String"/>
> 
> <html:form action="<%=url%>">
> 
> 
> 
> Thanks !
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: simple question

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
hi,

perhaps it is this:
(look at:
http://jakarta.apache.org/struts/userGuide/struts-bean.html#define )

type:
Specifies the fully qualified class name of the value to be exposed as
the id attribute.
[ java.lang.String (if you specify a value attribute) or
java.lang.Object otherwise. ] [RT Expr]


greetings

-----Original Message-----
From: Nicolas De Loof [mailto:nicolas.deloof@cgey.com] 
Sent: Monday, January 05, 2004 2:41 PM
To: Struts Users Mailing List
Subject: Re: simple question


It should work (I use it !)

Did you include the taglib directive for struts-bean ?

Nico.



How can i have a dynamic value in the action ?

The following is not working .

<bean:define id="url" value="/setUp.do?action=all" type="String"/>

<html:form action="<%=url%>">



Thanks !


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: simple question

Posted by Nicolas De Loof <ni...@cgey.com>.
It should work (I use it !)

Did you include the taglib directive for struts-bean ?

Nico.



How can i have a dynamic value in the action ?

The following is not working .

<bean:define id="url" value="/setUp.do?action=all" type="String"/>

<html:form action="<%=url%>">



Thanks !


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org