You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mikkel Lindhard <ml...@gmail.com> on 2008/07/15 11:01:34 UTC

S2: web.xml servlet/filter-mappings

Hello list

I have an web-application which use both Struts 2 and Axis 2.

Before struts 2.1 i didn't have a problem using the following  
configuration in web-xml

     	<servlet-mapping>
         	<servlet-name>AxisServlet</servlet-name>
         	<url-pattern>/services/*</url-pattern>
     	</servlet-mapping>

	<filter-mapping>
         	<filter-name>struts2</filter-name>
         	<url-pattern>/*</url-pattern>
     	</filter-mapping>

The problem with Struts2.1.x is that the /service/xxx calls are taken  
over by the struts filter even though it doesnt have a mapping for it.

is there a way i can configure struts to not handle the request if the  
mapping doesnt exist?

Or might there be another solution? :)

Thanks in advance.

Mikkel


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: S2: web.xml servlet/filter-mappings

Posted by "Alberto A. Flores" <aa...@gmail.com>.
Also, please remember that the order of the <filter-mapping> in web.xml 
is VERY important.

Don Brown wrote:
> Could you post more information?  Struts should only be responding to
> URI's that contain configured extensions via the
> struts.action.extension setting, which defaults to "action".
> 
> Don
> 
> On Tue, Jul 15, 2008 at 7:01 PM, Mikkel Lindhard <ml...@gmail.com> wrote:
>> Hello list
>>
>> I have an web-application which use both Struts 2 and Axis 2.
>>
>> Before struts 2.1 i didn't have a problem using the following configuration
>> in web-xml
>>
>>        <servlet-mapping>
>>                <servlet-name>AxisServlet</servlet-name>
>>                <url-pattern>/services/*</url-pattern>
>>        </servlet-mapping>
>>
>>        <filter-mapping>
>>                <filter-name>struts2</filter-name>
>>                <url-pattern>/*</url-pattern>
>>        </filter-mapping>
>>
>> The problem with Struts2.1.x is that the /service/xxx calls are taken over
>> by the struts filter even though it doesnt have a mapping for it.
>>
>> is there a way i can configure struts to not handle the request if the
>> mapping doesnt exist?
>>
>> Or might there be another solution? :)
>>
>> Thanks in advance.
>>
>> Mikkel
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

-- 

Alberto A. Flores
http://www.linkedin.com/in/aflores



Re: S2: web.xml servlet/filter-mappings

Posted by Don Brown <do...@gmail.com>.
Could you post more information?  Struts should only be responding to
URI's that contain configured extensions via the
struts.action.extension setting, which defaults to "action".

Don

On Tue, Jul 15, 2008 at 7:01 PM, Mikkel Lindhard <ml...@gmail.com> wrote:
> Hello list
>
> I have an web-application which use both Struts 2 and Axis 2.
>
> Before struts 2.1 i didn't have a problem using the following configuration
> in web-xml
>
>        <servlet-mapping>
>                <servlet-name>AxisServlet</servlet-name>
>                <url-pattern>/services/*</url-pattern>
>        </servlet-mapping>
>
>        <filter-mapping>
>                <filter-name>struts2</filter-name>
>                <url-pattern>/*</url-pattern>
>        </filter-mapping>
>
> The problem with Struts2.1.x is that the /service/xxx calls are taken over
> by the struts filter even though it doesnt have a mapping for it.
>
> is there a way i can configure struts to not handle the request if the
> mapping doesnt exist?
>
> Or might there be another solution? :)
>
> Thanks in advance.
>
> Mikkel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org