struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam J Samere <asam...@rochester.rr.com>
Subject Re: Use html:link in User defined Tag
Date Tue, 12 Sep 2006 02:18:00 GMT
I'm assuming you are writing your own custom tag and rendering the link 
inside the tag definition. If this is the case you may wish to have a 
look at the org.apache.struts.taglib.TagUtils class. One of the 
overloaded computeURL methods may provide the functionality you are after.

Adam

Dave Kennedy wrote:
> Hi,
> I am trying to create a link on a page with the following URL
>   http://localhost:8080/<context>/<module>/list.do
>
> This JSP code specifies the <module>
>   <html:link module="/upload" action="/upload">Upload</html:link>
> produces this link
>   http://localhost:8080/<context>/upload/upload.do
>
> But, this Java code in a Tag
>   out.print("<a href=\"upload.do\">Upload</a>");
> produces this link 
>   http://localhost:8080/<context>/<module>/upload.do
>
>
> How can I specify the <module> in a user defined Tag?
> Is it possible to use <html:link in a user defined Tag?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>   



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


Mime
View raw message