You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/09/20 15:00:43 UTC
DO NOT REPLY [Bug 12861] New: -
URL address changed when I use path-mapping on servlet
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12861>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12861
URL address changed when I use path-mapping on servlet
Summary: URL address changed when I use path-mapping on servlet
Product: Struts
Version: 1.1 Beta 2
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: steveleung.geo@yahoo.com
Hi, In my web.xml. There are
<servlet-mapping>
<servlet-name>front</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>front</servlet-name>
<url-pattern>/path/*</url-pattern>
</servlet-mapping>
The request.getContextPath() is /web.
When I access the page with http://127.0.0.1/web/login.jsp, the URL address on
the address bar changed to http://127.0.0.1/web/path/loginServlet.
Actually, in the struts-config.xml, there are only
<action
path="/loginServlet"
type="servlet.action.LoginAction"
name="loginForm"
scope="request"
validate="true"
input="/WEB-INF/jsp/login.jsp">
<forward name="InvalidLogin" path="/WEB-INF/jsp/login.jsp"
redirect="false" />
<forward name="Success" path="/WEB-INF/jsp/main.jsp"
redirect="false"/>
</action>
I don't know why the URL is changed to http://127.0.0.1/web/path .
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>