This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes strukts 2 post parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "strukts 2 post parameter" Watch "strukts 2 post parameter" New topic

strukts 2 post parameter

asif rafique

Joined: Mar 25, 2007
Posts: 8
Hi everyone

i am opening a popup window when a link is clicked what i am doing is
<s:url value="someAction">
<s:param name="id" value="someID"/>
<s:a href"%{someAction}">Link</s:a>

where id is property in my action class with getter and setter i got the value too on which i can get data from database but this is a HTTP GET and parameter is appended at the end of url with value and my problem is i want to hide the parameter any idea is appreciated
thanks in advance

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


when you use anchor tag and use struts 2 url tag then your parameter value and parameter pass with url.

If you don't want to pass it with url you have to submit form on click link and set one form hidden value using java script.

Otherwise call with url it always pass with query string.

So, submit form on click url and set hidden value.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Don't get me started about those stupid light bulbs.
subject: strukts 2 post parameter