File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes request parameters in Struts-Tiles app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "request parameters in Struts-Tiles app" Watch "request parameters in Struts-Tiles app" New topic

request parameters in Struts-Tiles app

Juarez Alvares Barbosa Junior
Ranch Hand

Joined: Mar 18, 2002
Posts: 80
I need to check the request parameters in a Struts-Tiles app and I am doing so as below:
Enumeration enum = request.getParameterNames();
while (enum.hasMoreElements()){
String currentParam = (String)enum.nextElement();
System.out.println("PARAMETER: " + currentParam + " VALUE: " + request.getParameter(currentParam ));
I don't know why but I can't see any values (textfields and checkboxes ones), considering that
HttpServletRequest encapsulates all request information (headers, parameters...) but they are not present, perhaps there is a issue I am not aware of.
Looking forward to some help. Thks !!!
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

It would help if we know a little bit more about the context in which this code is executed. Where is the code you gave found? Is it in an Action.perform(), an ActionForm.validate(), or in a JSP scriptlet or some other place? At what point in the processing of a request is this code executed? Is it being executed at all (maybe it's getting bypassed)?

Junilu - [How to Ask Questions] [How to Answer Questions]
Juarez Alvares Barbosa Junior
Ranch Hand

Joined: Mar 18, 2002
Posts: 80
I have it in my customized RequestProcessor and in a subclass of DynaValidatorActionForm as well.
It is sorta covered in the JavaRanch Style Guide.
subject: request parameters in Struts-Tiles app
It's not a secret anymore!