Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bounce! Help!
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic