• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Null Pointer in struts

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got it.
reply
    Bookmark Topic Watch Topic
  • New Topic