aspose file tools*
The moose likes Struts and the fly likes parameter passing and display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "parameter passing and display" Watch "parameter passing and display" New topic
Author

parameter passing and display

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 370
Using Sturts 2. My main action forwards to main.jsp. In main.jsp there is a link like



<s:param name="linkId" value="%{linkId}"/>
</s:url>" title="link">[Link]


when I click this link it goes to the link.jsp page (I use a tile.xml to describe the
'linkAction" which goes to a tile. the tile consists of the 'link.jsp" page). Also in the url, i saw "linkId=123" as url parameter. make sense. Now in the link.jsp page, I have another link simply going back to the main jsp. it looks like --



</s:url>" title="back to main"> (Back to Main)


when I click this link, it goes back to main.jsp. But on the URL i still saw "linkId=123" ! I don't think it should be there because from link.jsp I am not carrying that parameter at all. Why is it there and how to get rid of it ?

thanks.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags and disable HTML when posting HTML--did you notice your message didn't read particularly well?

The url tag docs include a usage note about the "includeParams" attribute.
ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 370
sorry. second attempt hope it reads better now.

Using Sturts 2. My main action forwards to main.jsp. In main.jsp there is a link like

<code>

<s:param name="linkId" value="123"/>
</s:url>" title="Link">[Link]


</code>

when I click this link it goes to the link.jsp page (I use a tile.xml to describe the
'linkAction" which goes to a tile. the tile consists of the 'link.jsp" page). Also in the url, i saw "linkId=123" as url parameter. make sense. Now in the link.jsp page, I have another link simply going back to the main jsp. it looks like --

<code>


</s:url>" title="Main Action"> (Back to Main Page)


</code>



when I click this link, it goes back to main.jsp. But on the URL i still saw "linkId=123" ! I don't think it should be there because from link.jsp I am not carrying that parameter at all. Why is it there and how to get rid of it ?

thanks.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

No, it doesn't. Does the system not allow you to see your own posts?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: parameter passing and display
 
Similar Threads
Struts 2, Tiles 2 and prototypejs
html buttons in struts
href path changes in jsp on redirecting the servlet to that jsp
url details in javascript
Returning A List Of Variables From A Folder Of Documents And Returning Them Into A New Document