wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts- Error while java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts- Error while java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null." Watch "Struts- Error while java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null." New topic
Author

Struts- Error while java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null.

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi All ,
Ive been trying to develop a simple web app that consists of 2 webpages , the first page redirecting to the second . However, when i try to redirect from the first page to the second , it doesnt do so , and throws the following error --"java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null" .. I have placed my action classes and jsp's below . It would be great if anyone could point out what im missing here . I m relatively new to Java and J2EE . Any advice would be appreciated.


The first jsp-- test.jsp .


The Second jsp-- test1.jsp



Action class--




Struts-config.xml



Learning and Learning!-- Java all the way!
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Bounce! Help!
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I don't see an "execute" method in your action class, is it in your parent class(DispatchAction)? If so, can I see the code that it uses to call the methods in DomainAction. What exactly are you doing to trigger this error? More of the stack trace might help.
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi tom ,
Im not using an execute() method and configured struts config to point to addDomain method from the action class .
I changed the structure of the jsp and am trying to use a single jsp to address my issue now
 
wood burning stoves
 
subject: Struts- Error while java.lang.IllegalArgumentException: setAttribute: name parameter cannot be null.
 
Similar Threads
How to hide url: in struts
Equivalent of logic iterate in Struts 2
Is it possible to pass a bean(struts) through javascript.???
doubt regarding <html:select>
Struts config error , controller not redirecting to required screen.