Firstly let me appologise for the amount of questions im asking...... Can anyone tell me how to add a parameter to a HttpServletRequest. Say for example if i wanted to add a parameter to it and then dispatch it off by forwarding it to another servlet. Do i use something like setAttribute??? What exactly does an attribute mean, is an attribute the same as a parameter etc as they are both stored in the body when using POST???
hi david, other than adding some attributes to your request object, i suggest that you also try to add some attributes to your HttpSession becasue using session to store the "shared object" between jsp and servlet is an important method too. Have fun, hope this help.
HttpServletRequest parameters can not be set. They can only be got.
That statement is not entirely true. You are partially right because we cannot set request parameters within a jsp/servlet with a call like request.setParameter(name, value). However, when we include/forward a page in JSP we can set addtional request parameters. For eg:
Now test1.jsp can retrieve this parameter with request.getParameter("temp"). The container is responsible for passing these run time parameters to the included/forwarded page. It usually appends them as query string to the URL and includes/forwards to the specified page. Ciao, GSS
SCJP, SCJD, SCWCD 1.3, SCWCD 1.4, SCBCD
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com