Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation problem

 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic