This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes problem with url rewriting in sturts link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with url rewriting in sturts link" Watch "problem with url rewriting in sturts link" New topic
Author

problem with url rewriting in sturts link

Tirthankar Dutta Chaudhuri
Ranch Hand

Joined: Feb 26, 2005
Posts: 48
Hi ,

I need to generate a url dynamically with the values coming from bean .
I have written the following code

[CODE<logic:iterate id="user" name="users">
<TR>

<TD><html:link page='/AddUser.do?userid='>
<bean:write name="user" property="userId" />
</html:link>

<bean:write name="user" property="userId" /></TD>
<TD><bean:write name="user" property="userDescription" /></TD>
</TR>
</logic:iterate>
[/CODE]

But its getting tranlated to

but i want something like <a href="/App54_Prototype_UI/AddUser.do?userid=PSS011"</a>

Please let me know what changes i need to make to my code .

Tirthankar
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You will find the answer by looking closely at the information on the <html:link> tag in the Struts Taglib documentation.

[ April 11, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
 
subject: problem with url rewriting in sturts link
 
Similar Threads
Using bean:write with html:link
Using bean:write with html:link
Problem with html:link paramName and paramId
html:link in logic:iterate
JSP Dynamically generated link needs to be associated with different form and submitted