File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Display n number of parameters on jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Display n number of parameters on jsp page" Watch "Display n number of parameters on jsp page" New topic

Display n number of parameters on jsp page

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268

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.

thor aniket
Ranch Hand

Joined: Jan 21, 2012
Posts: 40

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.

I agree. Here's the link:
subject: Display n number of parameters on jsp page
It's not a secret anymore!