Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null Pointer in struts

 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

I have one text field and one select box in my jsp page and i have corresponding action class and form bean items to that page and all are mapped well in config file.
my task is to do search based on given values(can give one or more at same time). when i try to get text field value and select box value and doing not null validation
in action class WITHOUT SELECTING select box item, i am getting null pointer exception. and if i select any of the select box item, then program is working fine. I am
using the following code to validate. Please refer and suggest me, is there any better way of doing.



thanks in advance
kishore
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic