You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ol...@axa-alert.com on 2001/01/12 18:34:19 UTC

Always the same URL

Hello, 

I always get the same path-info in 'path = request.getServletPath()', the
path of the ActionServlet, although I have invoked 
the following 'http://cgn01ws0012/NASApp/strutsone/logon.do' to get onto the
logon-page in the struts-example. 

Doing so I get difficulties in resolving the correct mapping in
'ActionMapping mapping = processMapping(path);'

I'm using IPlanetApp 6.0 with IPlanet WS4 and my web.xml looks like this: 

  <?xml version="1.0" encoding="UTF-8" ?> 
  <!DOCTYPE web-app (View Source for full doctype...)> 
- <web-app>
- <icon>
  <small-icon /> 
  <large-icon /> 
  </icon>
  <display-name>strutsone</display-name> 
  <description /> 
- <servlet>
  <servlet-name>registration</servlet-name> 
  <jsp-file>registration.jsp</jsp-file> 
  <load-on-startup>0</load-on-startup> 
  </servlet>
- <servlet>
  <servlet-name>mainMenu</servlet-name> 
  <jsp-file>mainMenu.jsp</jsp-file> 
  <load-on-startup>0</load-on-startup> 
  </servlet>
- <servlet>
  <servlet-name>logon</servlet-name> 
  <jsp-file>logon.jsp</jsp-file> 
  <load-on-startup>0</load-on-startup> 
  </servlet>
- <servlet>
  <servlet-name>index</servlet-name> 
  <jsp-file>index.jsp</jsp-file> 
  <load-on-startup>0</load-on-startup> 
  </servlet>
- <servlet>
  <servlet-name>subscription</servlet-name> 
  <jsp-file>subscription.jsp</jsp-file> 
  <load-on-startup>0</load-on-startup> 
  </servlet>
- <servlet>
  <servlet-name>ActionServlet</servlet-name> 
  <description /> 
  <display-name /> 
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> 
- <init-param>
  <param-name>debug</param-name> 
  <param-value>2</param-value> 
  <description>keine</description> 
  </init-param>
- <init-param>
  <param-name>mapping</param-name> 
  <param-value>org.apache.struts.example.ApplicationMapping</param-value> 
  <description>keine</description> 
  </init-param>
- <init-param>
  <param-name>config</param-name> 
  <param-value>WEB-INF/action.xml</param-value> 
  <description>keine</description> 
  </init-param>
- <init-param>
  <param-name>application</param-name> 
  <param-value>org.apache.struts.example.ApplicationResources</param-value> 
  <description>keine</description> 
  </init-param>
  <load-on-startup>2</load-on-startup> 
  </servlet>
- <servlet-mapping>
  <servlet-name>ActionServlet</servlet-name> 
  <url-pattern>*.do</url-pattern> 
  </servlet-mapping>
- <session-config>
  <session-timeout>500</session-timeout> 
  </session-config>
- <taglib>
  <taglib-uri>WEB-INF/struts-bean.tld</taglib-uri> 
  <taglib-location>WEB-INF/struts-bean.tld</taglib-location> 
  </taglib>
- <taglib>
  <taglib-uri>WEB-INF/app.tld</taglib-uri> 
  <taglib-location>WEB-INF/app.tld</taglib-location> 
  </taglib>
- <taglib>
  <taglib-uri>WEB-INF/struts.tld</taglib-uri> 
  <taglib-location>WEB-INF/struts.tld</taglib-location> 
  </taglib>
- <taglib>
  <taglib-uri>WEB-INF/struts-logic.tld</taglib-uri> 
  <taglib-location>WEB-INF/struts-logic.tld</taglib-location> 
  </taglib>
- <login-config>
  <realm-name /> 
- <form-login-config>
  <form-login-page /> 
  <form-error-page /> 
  </form-login-config>
  </login-config>
  </web-app> 

What is wrong ? 

Thanks a lot !
Oliver 

Re: Always the same URL

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Oliver.Lauer@axa-alert.com wrote:

> Hello,
>
> I always get the same path-info in 'path = request.getServletPath()', the
> path of the ActionServlet, although I have invoked
> the following 'http://cgn01ws0012/NASApp/strutsone/logon.do' to get onto the
> logon-page in the struts-example.
>
> Doing so I get difficulties in resolving the correct mapping in
> 'ActionMapping mapping = processMapping(path);'
>

If the context path of your application is "/NASApp/strutsone", then
getServletPath() is supposed to return "/logon.do" in your example URL above,
and getPathInfo() is supposed to return null.  If iPlanet is not doing this, it
isn't following the rules of the 2.2 servlet spec.  Could you please do a little
more testing of what getPathInfo() and getServletPath() return for this URL, and
for a different one like:

    http://cgn01ws0012/NASApp/strutsone/editSubscription.do

Craig