• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Display n number of parameters on jsp page

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

I have a problem. I am forwarding a page in which n number of texfields are made dynamically, they can have any random name. By using the method getParameterNames() I am able to retrieve values in other jsp. Now i want the same thing to happen in struts 2. how should I use setter an getter methods there. I have used many times setter and getter in other apps but this is some different situation. I have tried like this.





to be more clear I want this statement "System.out.println(ParameterName+":"+request.getParameter(ParameterName));" to print values on page. Note: the parameters can be n in number. I want to print them all I am able to do in jsp. Someone please show me the correct way.


Thanks and regards.

Adeeb
 
Ranch Hand
Posts: 40
Hibernate jQuery
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
configure a JSP for result SUCCESS in struts.xml and in that JSP, use tag to print the values you have defined in action class. Make sure that you write simple getter and setter method in action class for that property.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic