You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Carr <ja...@gmail.com> on 2008/07/29 23:35:14 UTC
[s2] Do I need to define the struts2 filter?
In all the examples of tiles2+struts2 I find online, they only show
using the struts2-tiles-plugin listener in the web.xml (they always
omit the rest of the web.xml). Do I still need to include the struts2
filter? When i deploy, it breaks. Claiming the filter is undefined,
and only does this in presence of the listener. :(
Thanks,
James
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] Do I need to define the struts2 filter?
Posted by ManiKanta G <ma...@sifycorp.com>.
Hi,
You always need to include S2 FilterDispatcher as it is the front
controller in S2. In those tiles example the authors assume that the
reader is having basic usage knowledge of S2. Thats why they might have
excluded the S2 filter config.
for ex, consider this...
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
Regards,
ManiKanta
James Carr wrote:
> In all the examples of tiles2+struts2 I find online, they only show
> using the struts2-tiles-plugin listener in the web.xml (they always
> omit the rest of the web.xml). Do I still need to include the struts2
> filter? When i deploy, it breaks. Claiming the filter is undefined,
> and only does this in presence of the listener. :(
>
> Thanks,
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin@sifycorp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] Do I need to define the struts2 filter?
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Dave Newton wrote:
> (Ignore the billing part--for some reason this message wasn't caught by my filter and hit my inbox.)
>
> Dave
>
I had the same issue because it was addressed to struts-user@apache not
user@struts.apache or Struts Users Mailing List
James - Yes, you need both the Struts 2 filter and the Tiles 2 Listener
if you want to use both. Ensure they're in the correct position in
web.xml according to the DTD and that you have all the dependencies for
the tiles plugin (if using the plugin) as missing jars will prevent the
filter from starting.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [s2] Do I need to define the struts2 filter?
Posted by Dave Newton <ne...@yahoo.com>.
(Ignore the billing part--for some reason this message wasn't caught by my filter and hit my inbox.)
Dave
--- On Tue, 7/29/08, James Carr <ja...@gmail.com> wrote:
> From: James Carr <ja...@gmail.com>
> Subject: [s2] Do I need to define the struts2 filter?
> To: struts-user@apache.org
> Date: Tuesday, July 29, 2008, 5:35 PM
> In all the examples of tiles2+struts2 I find online, they
> only show
> using the struts2-tiles-plugin listener in the web.xml
> (they always
> omit the rest of the web.xml). Do I still need to include
> the struts2
> filter? When i deploy, it breaks. Claiming the filter is
> undefined,
> and only does this in presence of the listener. :(
>
> Thanks,
> James
>
> ---------------------------------------------------------------------
> 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
Re: [s2] Do I need to define the struts2 filter?
Posted by Dave Newton <ne...@yahoo.com>.
In general, you'll want to post to the list instead of emailing list participants directly. Especially me; I bill ;)
--- On Tue, 7/29/08, James Carr <ja...@gmail.com> wrote:
> In all the examples of tiles2+struts2 I find online, they
> only show using the struts2-tiles-plugin listener in the web.xml
> (they always omit the rest of the web.xml). Do I still need to
> include the struts2 filter? When i deploy, it breaks. Claiming
> the filter is undefined, and only does this in presence of the
> listener. :(
Yes, you still need to define the S2 filter, otherwise there's nothing to process incoming requests. As you discovered, this is bad; the reason it claims it's undefined is because... it isn't defined.
The Tiles listener is a ServletContextListener, which just pays attention to container startup, and AFAIK is for reading the tiles config file on startup.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org