Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parameter passing and display

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it doesn't. Does the system not allow you to see your own posts?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic