Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts forward question

 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Struts, I can forward from an Action to a JSP. But how do I get an Action to forward control to another Action? I am trying to chain several actions together before finally invoking a JSP.
My code looks like this:
invoker.jsp:

Action1.java:

struts-config.xml:

Am I doing this right? When I invoke action1 from invoker.jsp, I get an Error 500 which says, "Cannot get request dispatcher for path null". The Tomcat log file says, "2002-10-18 16:51:34 StandardContext[/portal]: Mapped to servlet 'action' with servlet path '/action2.do' and path info 'null' and update=true"
What does path info 'null' mean?
Thanks for your help.
Geoffrey
[ October 18, 2002: Message edited by: Geoffrey Falk ]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
moved from Servlets -> Frameworks ( aka: the Struts forum)
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geoff,
presumably your Action2.java looks like this:


What version of struts have you got?
Also you don't need to specify the input attribute for the mapping unless attribute validation=true
You have specified the form-beans in struts-config as well?
Adam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic