This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
War file created by Ant is not working with an exception cannot find global ActionForward for name *
Yolanda Zheng
Greenhorn
Joined: Dec 20, 2010
Posts: 3
posted
0
Can anyone help??? I got the war file created by Ant, and manually deployed it on a server, but when I tested it, an error message occurs:
However, the war file I created through MyEclipse File-->Export-->war file works with no error message.
Anyone know it is because of the wrong struts config or ant??
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find global ActionForward for name loginPage
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find global ActionForward for name loginPage
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
my build.xml file is as below:
The structure of my web application:
RRAdmin
|-- src
|--WebRoot
| |--form
| |--jsp
| |--META-INF
| |--WEB-INF
| | |--lib
| | |--struts-config.xml
| | |-- web.xml - deployment descriptor
|--build.xml
I think your Ant build is probably fine, and the problem is with your Struts configuration. I'm going to move this thread into our Struts forum, where I'm sure someone will be able to help you with that.
Yolanda Zheng
Greenhorn
Joined: Dec 20, 2010
Posts: 3
posted
0
Greg Charles wrote:Hi Yolanda, welcome to JavaRanch!
I think your Ant build is probably fine, and the problem is with your Struts configuration. I'm going to move this thread into our Struts forum, where I'm sure someone will be able to help you with that.
Seems like you're sending user to <your-web-site>/loginPage.do or similar, and you don't have any 'global forward' defined with the name 'loginPage' in your Struts config. If you can post your struts config and the URL for which you get this error, the folks would be able to help you.
Yolanda Zheng
Greenhorn
Joined: Dec 20, 2010
Posts: 3
posted
0
Aditya Jha wrote:Seems like you're sending user to <your-web-site>/loginPage.do or similar, and you don't have any 'global forward' defined with the name 'loginPage' in your Struts config. If you can post your struts config and the URL for which you get this error, the folks would be able to help you.
I defined the global forward for userLogin.jsp and the URL is: http://localhost:8080/RRAdmin/ The war file I created through MyEclipse File-->Export-->war file works with no error message, but the war file created by Ant got this issue.
I am wondering is it because a .jar file missing when i compile the project.
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find global ActionForward for name loginPage
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find global ActionForward for name loginPage
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.jsp.JspException: Cannot find global ActionForward for name loginPage
org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:92)
org.apache.jsp.jsp.index_jsp._jspx_meth_logic_005fforward_005f0(index_jsp.java:168)
org.apache.jsp.jsp.index_jsp._jspx_meth_html_005fhtml_005f0(index_jsp.java:123)
org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:72)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)