File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Newbie to struts....help with ActionForward error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Newbie to struts....help with ActionForward error" Watch "Newbie to struts....help with ActionForward error" New topic
Author

Newbie to struts....help with ActionForward error

s logeson
Greenhorn

Joined: Jan 14, 2004
Posts: 2
I am new to struts and I just can't figure out why I'm getting this error message: org.apache.jasper.JasperException: Cannot find global ActionForward for name welcome
Here is my struts-config.xml:
<struts-config>
<form-beans/>
<global-forwards>
<forward name="welcome" path="/test.jsp" redirect="true" />
</global-forwards>

<action-mappings>
<action path="/home"
type="ematrix.framework.EmatrixBaseAction"
scope="request"
validate="false"
input="welcome.jsp">
<forward name="Success" path="/test.jsp"/>
</action>
</action-mappings>
<controller processorClass="org.apache.struts.action.RequestProcessor"
contentType="text/html;charset=UTF-8"/>
<message-resources parameter="EmatrixMessageResources"/>
</struts-config>
Here is my welcome.jsp:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<html>
<body>
<logic:forward name="welcome"/>
</body>
</html>

I'm just trying to forward to a test.jsp. Any help would be appreciated.
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
If my memory servers me correctly.... the logic:forward does a request distpacther forward. Just for kicks try removing the redirect attribute from your welcome forward in you struts config file.
It could also be that the JSP page you specify in the forward is spelled wrong. Try forwarding directly to the jsp with <jsp:forward instead.
BTW logic:forward breaks the model 2/MVC framework as it allows the view to select the next view. Only the controller should select the next view.


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
Did that help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Newbie to struts....help with ActionForward error