aspose file tools*
The moose likes Struts and the fly likes Null Pointer in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Null Pointer in struts" Watch "Null Pointer in struts" New topic
Author

Null Pointer in struts

a kishore
Ranch Hand

Joined: Sep 16, 2009
Posts: 82

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

Joined: Sep 16, 2009
Posts: 82
i got it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null Pointer in struts