• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to read the parameter in action class which was passed from the JSP in struts...please help??

 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. what iam doing , there is a main JSP which shows the list of all the employees.
There is link on the emp_id of list. onClick of that, a popup comes for that specific emp_id, so that user can update the profile and calls the update action.
The problem is that , iam able to send the parameter because i can see the emp_id (passed parameter) on URL but iam not sure whether it is going into action or not.

for e.g. :-
http://localhost:8080/SpringSample1/pop.do?id=2342

in above url, id is passed as parameter.
In action class, iam not able to get the id.
UpdateAction.java:-


Please tell me what kind of issue is this?
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I missing something here?? I don't see anywhere that you've taken out the id request parameter from the HttpServletRequest object or from the ActionForm object. Also the request parameter is id not emp_id ...
 
galne vaibhav
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can do simple thing write onclick javascript function and assign value to hidden control and in action class write the getter setters for hidden control.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Galne, the [quote] [/quote] tags are for quoting what someone else writes. Don't put what you write in quote tags...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic