You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by brian jf <br...@hotmail.com> on 2003/05/28 00:55:21 UTC

html:link - a real pain!

Hi all,

I've had it with html:link. I just can't get the thing to work how I want.

I have created a String within my jsp which I want to forward to my action 
using html:link

eg:
<% String myString = "some value" %>

<html:link page="/category.do" paramId="categoryId" paramName="myString">
      some text
</html:link>

doesn't work - says it can't find a bean named myString

I've tried EVERY possible thing eg:

<html:link page="/category.do" paramId="categoryId" 
paramName="<%=myString%>">
      some text
</html:link>

doesn't work - it looks for a bean named "some value"

Help please!

thanks,
Brian

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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


RE: html:link - a real pain!

Posted by Steve Raeburn <st...@ninsky.com>.
It wants a bean, so give it a bean ;-)

<bean:define id="myString" value="some value"/>
<html:link page="/category.do" paramId="categoryId" paramName="myString">
      some text
</html:link>

Steve

> -----Original Message-----
> From: brian jf [mailto:brian_jf_275@hotmail.com]
> Sent: May 27, 2003 3:55 PM
> To: struts-user@jakarta.apache.org
> Subject: html:link - a real pain!
>
>
> Hi all,
>
> I've had it with html:link. I just can't get the thing to work how I want.
>
> I have created a String within my jsp which I want to forward to
> my action
> using html:link
>
> eg:
> <% String myString = "some value" %>
>
> <html:link page="/category.do" paramId="categoryId" paramName="myString">
>       some text
> </html:link>
>
> doesn't work - says it can't find a bean named myString
>
> I've tried EVERY possible thing eg:
>
> <html:link page="/category.do" paramId="categoryId"
> paramName="<%=myString%>">
>       some text
> </html:link>
>
> doesn't work - it looks for a bean named "some value"
>
> Help please!
>
> thanks,
> Brian
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> 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