aspose file tools
The moose likes Struts and the fly likes ActionForward not forwarding to a page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "ActionForward not forwarding to a page" Watch "ActionForward not forwarding to a page" New topic
Author

ActionForward not forwarding to a page

zoheb siddiqui
Greenhorn

Joined: May 08, 2008
Posts: 11
i am developing an application in struts 1.3 in net beans i have a link on clicking on that link i am forwarding to a login page if the session of the user has expired here i am making use of struts org.apache.struts.action.ActionForward class but when i click on it the it gives me error invalid path requested my JSP page

<tr>
<td class="text">
<html:link page="/gotoLogin.do">Click here to login again</html:link>
</td>

</tr>
my mapping

<action
path="/gotoLogin.do"
type="org.apache.struts.action.ActionForward"
parameter="Login.jsp"
input="/welcomStruts.jsp"
scope="request"
validate="false">
</action>
i am not understanding why this happening
saahil gupta
Ranch Hand

Joined: Dec 26, 2011
Posts: 56
Hi Check the File for any misspellings or any case mismatch
zoheb siddiqui
Greenhorn

Joined: May 08, 2008
Posts: 11
i found the solution action config shouldn't have the extension in it and one more thing to be corrected in this post
type="org.apache.struts.actions.ForwardAction"
candid java
Greenhorn

Joined: Jan 13, 2012
Posts: 14
<action
path="/gotoLogin.do"
type="org.apache.struts.action.ActionForward"
parameter="Login.jsp"
input="/welcomStruts.jsp"
scope="request"
validate="false">
</action>

here i found the solution you have to correct the type="org.apache.struts.action.ActionForward" in action tage. it will work fine
then if you are not cleared refer this link
http://candidjava.com/struts-1x-forward-action-with-example-program-in-eclipse
Sp Wong
Greenhorn

Joined: Jan 29, 2012
Posts: 3
The correct way should be

<action
path="/gotoLogin"
type="org.apache.struts.action.ActionForward"
parameter="Login.jsp"
input="/welcomStruts.jsp"
scope="request"
validate="false">
</action>

*please not that path=/gotoLogin instead of /gotoLogin.do
 
IntelliJ Java IDE
 
subject: ActionForward not forwarding to a page
 
Threads others viewed
javax.servlet.jsp. JspException: Cannot find message resources under key
Passing values in a form with multiple actions
struts internationalization problem
How to find method in Sturts
Passing value with multiple actions in same form
IntelliJ Java IDE