aspose file tools*
The moose likes Struts and the fly likes retrieve request parameters in action class Struts2 URGENT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "retrieve request parameters in action class Struts2 URGENT" Watch "retrieve request parameters in action class Struts2 URGENT" New topic
Author

retrieve request parameters in action class Struts2 URGENT

Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Hi,

I am sending a request parameter named "EmpID" and retrieving it in my Action class

jsp:


Action class:




i cant see EmpId in the url

What am i doing wrong?
Please help.Its vry urgent
Aamir Ali Shah
Greenhorn

Joined: Apr 16, 2009
Posts: 3
Use Hidden Field and then set it's value . And if you want to see parameters that your are posting so change Method from Post to Get Method.
Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Aamir Ali Shah wrote:Use Hidden Field and then set it's value . And if you want to see parameters that your are posting so change Method from Post to Get Method.


I have tried setting hidden field value.
<s:hidden name="EmpID" value="#session.EID" />
when i alert hte value in javascript, i get the value as "#session.EID"

Have also tried value = "%(#session.EID)" but no luck

Please help.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Where/how do you put EID into session?

Note that putting "URGENT" into the subject is kinda... not cool. See this for details. On a personal note, I actually tend to /not/ answer questions marked "URGENT" in the hopes that desperation will drive the asker to figure it out on their own, which is almost always faster than waiting for someone else to do it for them.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: retrieve request parameters in action class Struts2 URGENT