Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieve request parameters in action class Struts2 URGENT

 
Deeps Mistry
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic