• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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.
 
You showed up just in time for the waffles! And this 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