struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjib Mulepati <anji...@hotmail.com>
Subject [S1.3.8] Mapping problem
Date Tue, 22 Mar 2011 16:38:50 GMT
I have
1. web.xml
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
...........
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
.............
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
.................

2.  struts-config.xml as
<action path="/Login" 
type="gov.ma.itd.grouping.actions.GetAgencyListAction">
<forward name="success" path="loginPage"/>
<forward name="error" path="errorPage"/>
</action>

3. index.jsp
<jsp:forward page="Login.do"/>

Now when I am trying to run the application it giving me error

java.lang.IllegalArgumentException: Path loginPage does not start with a "/" character
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
	org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295)
	org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396)
	org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:347)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:57)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

I try to put "/" but that doesn't solve the problem.

Can anyone tell me what I am doing wrong?

Thanks
Anjib





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message