You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Feisal Jaffer <fe...@shazamteam.com> on 2001/11/21 18:16:56 UTC
RESEND (ignore prev): problem w/ multiple servlet mappings in web.xml
All:
I am sure this is a simple issue but I am having problems if I specify
multiple servlet mappings in my web.xml. I was working on an application
that did not have struts and have added struts for a part of the
application. I would like only certain mappings to be handled by the Struts
action servlet and the rest of the system to remain as is for now...
My web.xml file is attached to this msg. As far as I can see it, the
mappings should not conflict, but they do...If I comment out all the other
servlet mappings, then everything is cool with the struts part of the
application. Otherwise my urls get rewritten w/ the name of the parent
directory only.
Now that I have tracked the problem down, I know I can package these two
parts of the system (one with struts and one without) as 2 separate web
apps. But is there a way to specify multiple servlet mappings without a
conflict arising? I am not at all attached to the urls and would have no
problem changing them in the JSP files.
thanks in advance...
f.
Re: RESEND (ignore prev): problem w/ multiple servlet mappings in web.xml
Posted by Sean Owen <sr...@yahoo.com>.
The path mappings take precedence over the extension mappings (incidentally
I think the mapping to the Struts servlet needs to be just "*.do"). So I
think that if none of the other servlets map to a prefix that is used by any
of your Struts actions you'll be OK... for example you can't map a Struts
servlet to "/buymusic/action.do" since the other servlet's mapping will pick
that up first.
Sean
----- Original Message -----
From: "Feisal Jaffer" <fe...@shazamteam.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, November 21, 2001 5:16 PM
Subject: RESEND (ignore prev): problem w/ multiple servlet mappings in
web.xml
> All:
>
> I am sure this is a simple issue but I am having problems if I specify
> multiple servlet mappings in my web.xml. I was working on an application
> that did not have struts and have added struts for a part of the
> application. I would like only certain mappings to be handled by the
Struts
> action servlet and the rest of the system to remain as is for now...
>
> My web.xml file is attached to this msg. As far as I can see it, the
> mappings should not conflict, but they do...If I comment out all the other
> servlet mappings, then everything is cool with the struts part of the
> application. Otherwise my urls get rewritten w/ the name of the parent
> directory only.
>
> Now that I have tracked the problem down, I know I can package these two
> parts of the system (one with struts and one without) as 2 separate web
> apps. But is there a way to specify multiple servlet mappings without a
> conflict arising? I am not at all attached to the urls and would have no
> problem changing them in the JSP files.
>
> thanks in advance...
>
> f.
>
----------------------------------------------------------------------------
----
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>