You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by swapnil ghiware <sw...@india.hp.com> on 2001/01/12 22:57:12 UTC

Action Servlet Mapping

Hello,
I am using Struts 0.5 version. It seems that there can be only one action servlet mapping in the web.xml file.
for e.g. 
  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/execute/*</url-pattern>
  </servlet-mapping>

can i not have more than mapping. for e.g.

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/execute/*</url-pattern>
  </servlet-mapping>

  <!-- Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

can someone comment on this.

thanks,
swapnil.

Re: Action Servlet Mapping

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
swapnil ghiware wrote:

> Hello,I am using Struts 0.5 version. It seems that there can be only one
> action servlet mapping in the web.xml file.for e.g.  <!-- Action Servlet
> Mapping -->
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/execute/*</url-pattern>
>   </servlet-mapping>can i not have more than mapping. for e.g.   <!-- Action
> Servlet Mapping -->
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>/execute/*</url-pattern>
>   </servlet-mapping>  <!-- Action Servlet Mapping -->
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>can someone comment on this. thanks,swapnil.

You can do this (if your servlet container doesn't support it, that's a bug),
but I guess I do not see a compelling reason to do things that way.

By the way, I would strongly recommend developing against a recent nightly build
-- a beta of 1.0 is going to be released "real soon now", and there are
substantial differences from the 0.5 release.

Craig