This week's book giveaway is in the Open Source forum.
We're giving away four copies of Programmers Guide to Apache Thrift and have Randy Abernethy on-line!
See this thread for details.
Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

ActionForward not forwarding to a page  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Check the File for any misspellings or any case mismatch
 
zoheb siddiqui
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
please buy my thing and then I'll have more money:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!