You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Kennedy <jg...@mindspring.com> on 2008/03/11 21:52:28 UTC
accessing path_info
I am using a jboss/tomcat/struts 1.1 combination on a windows server.
I have an action definition defined like so:
<action path="/search"
type="com.je.struts.action.SearchAction"
scope="session"
name="SearchForm"
input="/tmpl_gnmain.jsp?body=/results.jsp"
validate="false">
<set-property property="secure" value="false"/>
<forward name="results" path="/tmpl_gnmain.jsp?body=/results.jsp" />
</action>
So Urls will take the form of http://host/search.go?str=blabla&parm=bla2
I would like to alter the URL to include path_info like this:
http://host/search.go/test/test2
or
http://host/search.go/testme/a/?str=blabla&parm=bla2
Both should be valid.
http://host/search.go?str=blabla&parm=bla2 works great but the URLs with
extra path info do not.
The error I'm getting is a 404 error.
I am thinking the issue I'm having lies with struts and not app server. I
know apache http server has a setting for this, but did not find anything
for Tomcat or JBOSS/Tomcat.
web.xml might also be helpfull:
<servlet>
<servlet-name>ActionServlet</servlet-name>
<display-name>ActionServlet</display-name>
<description>Main Struts Servlet</description>
<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>
<load-on-startup>15</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ActionServlet</servlet-name>
<url-pattern>*.go</url-pattern>
</servlet-mapping>
thanks for any direction.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: accessing path_info
Posted by Lukasz Lenart <lu...@googlemail.com>.
Hi
Maybe this will help
http://www.lunatech-research.com/archives/2005/07/29/struts-urls
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org