tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unmesh Joshi <unmeshjo...@gmail.com>
Subject Re: setRequest method on HttpServletRequestWrapper
Date Sat, 17 Apr 2010 03:09:08 GMT
StrutsExecuteFilter is mapped to *

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

SRV.15.2.5 explains RequestDispatcher as follows. It does not say u
can (or can not) get request dispatcher for filters. But I think
Filters do not match definition of 'Resource' in SRV. Resources are
either servlets, jsps or static content.

SRV.15.2.5      RequestDispatcher
  public interface RequestDispatcher
  Defines an object that receives requests from the client and sends them to any
  resource (such as a servlet, HTML file, or JSP file) on the server.
The servlet con-
  tainer creates the RequestDispatcher object, which is used as a
wrapper around a
  server resource located at a particular path or given by a particular name.
  This interface is intended to wrap servlets, but a servlet container
can create
  RequestDispatcher objects to wrap any type of resource.


On Sat, Apr 17, 2010 at 8:03 AM, Konstantin Kolinko
<knst.kolinko@gmail.com> wrote:
> 2010/4/17 Unmesh Joshi <unmeshjoshi@gmail.com>:
>> Yes. On tomcat u get dispatcher for DefaultServlet if there is no
>> servlet mapping for the url. Typically on Struts2 all the urls get
>> handled in StrutsExecuteFilter and u dont get dispatcher go that
>> filter.
>>
>> On Sat, Apr 17, 2010 at 7:11 AM, Konstantin Kolinko
>> <knst.kolinko@gmail.com> wrote:
>>> 2010/4/17 Unmesh Joshi <unmeshjoshi@gmail.com>:
>>>>> Filters can be called for forwarded and included requests, if you map
>>>>> them in certain way (something like <dispatcher>INCLUDE</dispatcher>).
>>>>> See the Servlet spec for details.  SRV.6.2.5
>>>> But you cant get dispatchers for filters. UrlRewriteFilter gets a
>>>> dispatcher (so rewrtten url must have a servlet or jsp handler).
>>>
>>> Have you tried?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>
>
> And how your StrutsExecuteFilter is mapped in web.xml ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message