permaculture playing cards
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Null Pointer in struts" Watch "Null Pointer in struts" New topic

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
a kishore
Ranch Hand

Joined: Sep 16, 2009
Posts: 82
i got it.
Have you checked out Aspose?
subject: Null Pointer in struts
It's not a secret anymore!