I have an 'upload' page in my webapp that allows the user to upload data of her own. Once the user presses the 'submit' button,
I want her to be forwarded to the 'summary' page where I return the result of validation (success or failure). Once the user makes
the request, my servlet will handle it.
When I hit the 'submit' button, I encounter this error:
Terminology matters. A form submission is not a forward. A forward is a very specific thing that occurs on the server and has nothing to do with form submission.
Submitting to a JSP for processing is a very old-fashioned, outdated and discredited practice. The problem you are having is a good example why. Submit to a servlet for processing, and then forward (a real forward this time) to a JSP for the view. Under such a scenario, it's practically impossible to get a NPE in a JSP. If there's a problem, it will be found in the servlet where it's much easier to diagnose and deal with.
Java scriptlets and scriptlet experssions in a JSP are also discredited and out-dated. Update your JSP knowledge to encompass the JSTL and EL.
So you have to ask yourself what on this page is going to be null?
After a quick inspection of the code, the only variable you are really referencing is "props"
I would hypothesize that the request attribute "props" has not been initialized. Where is it supposed to come from?
It looks like you are using it as a source of message resources - the text to print out on the page. Probably to do with translation/i18n.
The preferred JSP approach would be to use a custom tag for that. eg the JSTL <fmt:message> tag.
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
subject: Forwarding users from one JSP to another using a form.