Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why "Cannot find global ActionForward for name welcome"

 
yu scott
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I'm using Tomcat5.0.3 & Struts1.1, and i use the example LOGON.WAR, shipping with <<struts in Action>> .
My Struts-configure.xml is :
...........
<global-forwards>
<forward
name="welcome"
path="/Welcome.do"/>
</global-forwards>
<action-mappings>
<action
path="/Welcome.do"
type="org.apache.struts.actions.ForwardAction"
parameter="/pages/Welcome.jsp"/>
...........
</action-mappings>
</struts-config>
When i execute my application as http://localhost:8080/logon and i got following error:
javax.servlet.ServletException: Cannot find global ActionForward for name welcome
at org.apache.jasper.runtime.PageContextImpl. handlePageException(PageContextImpl.java:685)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)

Why ???
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch "linuxz". I hope someone can give you a solution to your problem. While you are waiting, please review the JavaRanch Naming Policy and change your displayed name. You can change it here.
Thanks,
-Barry
[ December 02, 2003: Message edited by: Barry Gaunt ]
[ December 02, 2003: Message edited by: Barry Gaunt ]
 
Baochuan Lu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi scott:
I met the same problem as you did. Please check your struts-config.xml VERY carefully. I had an extra character in the file which caused the problem.
Hope it will help. Let me know if you are not clear about what I'm saying.
God luck!
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the slash from your path attribute.
 
Jean-Sebastien Abella
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't!
 
Jean-Sebastien Abella
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I fixed this problem by updating my lib. (Struts.jar and apache-commons-???.jar)
 
Sammy Chen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is version conflict problem. Check if your the version of jdk in the server is same as the jdk in your development IDE. please note some IDE like Myeclipse set a default version jdk.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic