Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting NullPointerException on calling Action

 
Gopikrishna Gopal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting nullpointerexception after clicking submit button in SignUp.jsp and control goes to Action.
Line number 19 is

Full Details as follows...

Struts Problem Report
Struts has detected an unhandled exception:

Messages:
File: coreservlets/action/SignupAction1.java
Line number: 19

java.lang.NullPointerException
coreservlets.action.SignupAction1.execute(SignupAction1.java:19)

Struts.xml



SignUp.jsp




SignupAction1.java



Please suggest. Thanks in advance !
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look real hard at the code below. See anything?

 
Gopikrishna Gopal
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops sorry my bad !
Thanks
 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could not see the error... can anybody explain it? thanks..

Im a newbie here.

regards,
Vic
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts uses the name of HTML form elements to look up properties of an action. If you name a form element like this:



You need to provide a getter and setter for a property called formBean. If you look at my post above, you can see the getter and setter names do not match.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic