File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes null pointer exception in struts2... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic

null pointer exception in struts2...

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
We all know that the variable name in Action class should be name of the html tag...

I have something like this

The variable names in action class:
private String conceptName;
private String attributeName;
private String addDTList;

I also have get,set methods for these...

On click on submit

When I print the above values its only printing addDTList while the other 2 are null,,,why is that so??

Ankit Garg

Joined: Aug 03, 2008
Posts: 9466

Duplicate Topic, closing this one...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: null pointer exception in struts2...
It's not a secret anymore!