• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Ranch Hand
Posts: 477
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bounce! Help!
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic