This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all, relatively new to jsp and servlets so bear with me please... I am trying to create a jsp page with a simple form, this form then calls a servlet to validate the fields and if they have not been filled in correctly then it forwards back to the form page. I am having trouble though detecting on the jsp page as to whether the form has been checked already. I have tried setAttribute for the session but this is causing nullPointer problems when I first access the form as I think it is trying to access attributes from the session that don't currently exist ? If anyone has a simple solution to this problem then I'd be grateful for some help, apologies for the lack of code but I think it best if maybe someone just hints out the proper way of doing it and I'll try that before posting anything. Thanks in advance Jon
Joined: Oct 11, 2002
Found the answer, easy when you know how !! Just need to use the Boolean isNew() method for session..... d'oh!! Jon