File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes validation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation problem " Watch "validation problem " New topic
Author

validation problem

Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401



When I write validation for the above code like below mentioned it is showing null pointer exception may i know why.




And my Jsp contains <html:errors/ > tag too.

thanks in advance
regards,
rahul
[ July 30, 2007: Message edited by: Rauhl Roy ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Please show us the stack trace for this error. Also, please tell us the circumstances for the error. Do you get it when the page is first attempting to display, or do you get it when you press the submit button from this page?


Merrill
Consultant, Sima Solutions
Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

this is the first page of my application when i click on submit button insted of showing the error messge it is leading to nullpointer exception.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Ninety-nine percent of the time, a Null Pointer Exception indidcates that something is wrong in your own application, not in Struts. Look at the stack trace that was produced with the NPE, and look at the last method that was executed before the NPE occurred. That should give you an idea what caused it. If you compiled with debugging enabled, it will even tell you what line number in the source code to look for.
 
Consider Paul's rocket mass heater.
 
subject: validation problem