• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 9693
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ...
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9693
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic