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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]