File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 689


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
I agree. Here's the link:
subject: strukts 2 post parameter
It's not a secret anymore!