• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Getting NullPointerException on calling Action

 
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 !
 
Bartender
Posts: 9559
12
Mac OS X Linux 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
 
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: 9559
12
Mac OS X Linux 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!