aspose file tools*
The moose likes Struts and the fly likes how to set the module path. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to set the module path." Watch "how to set the module path." New topic
Author

how to set the module path.

Chidanand Chauhan
Ranch Hand

Joined: Nov 10, 2005
Posts: 77
Hi All,

Please solve my simple problem. The problem is
1. I m creating one module(admin) in my struts application named(EmpInfo).
2. In admin module there is a page named "test.jsp".

3. I have made struts-config-admin.xml in WEB-INF applicaition folder.
4. In web.xml file i used
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/struts-config-admin.xml</param-value>
</init-param>

5. In struts-config-admin.xml i wrote.

<action-mappings>
<action name="empbean" path="/second" scope="request" type="com.emp.MyAction2">
<forward name="success" module="/admin" path="/testworld.jsp" redirect="true">
</forward>
<forward name="failure" module="/admin" path="/testuniverse.jsp" redirect="true">
</forward>
</action>

Now PROBLEM IS :
WHEN I USE TO GIVE THE URL http://localhost:8080/EmpInfo/admin/test.jsp
IT GIVES ME AN ERROR
message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot retrieve mapping for action /second
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.admin.test_jsp._jspService(test_jsp.java:80)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Cannot retrieve mapping for action /second
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.admin.test_jsp._jspx_meth_html_form_0(test_jsp.java:98)
org.apache.jsp.admin.test_jsp._jspService(test_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

. PLEASE HELP ME HOW TO USED MODULE STRUTS.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
How is the action attribute specified in your JSP? It should be:

action="/admin/second"


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set the module path.
 
Similar Threads
Trying to execute my First struts app but receiving "ServletException"
Struts Error Help Needed
Struts
Exception creating bean of class
I am getting the follwing Exception in struts