You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike Leonardo <mi...@ifactory.com> on 2012/01/26 17:52:41 UTC
Dynamically contributing a ServletContextListener
Hi,
I'm working with integrating WURFL into my Tapestry app but I need to conditionally add WURFL's ServletContextListener through Tapestry but I can't figure out the right "hooks" or contribution that would make this possible. I want to avoid anything in my web.xml since my project is also used as a library for other projects with their own web.xml files overriding this one.
Is it possible to contribute a ServletContextListener through AppModule in some way?
Thanks,
Mike
Michael Leonardo
Senior Software Engineer
iFactory, A Division of RDW Group, Inc.
Innovative, inspiring, intelligent interactive solutions
for the world’s leading institutions
33 Farnsworth Street, 4th Floor
Boston, MA 02210
Main: 617.426.8600
Direct: 617.235.5852
Fax: 617.426. 0539
www.ifactory.com
@iFactoryBoston
Re: Dynamically contributing a ServletContextListener
Posted by Howard Lewis Ship <hl...@gmail.com>.
Nice to see iFactory participating on the user mailing list!
On Thu, Jan 26, 2012 at 8:52 AM, Mike Leonardo <mi...@ifactory.com> wrote:
> Hi,
>
>
> I'm working with integrating WURFL into my Tapestry app but I need to conditionally add WURFL's ServletContextListener through Tapestry but I can't figure out the right "hooks" or contribution that would make this possible. I want to avoid anything in my web.xml since my project is also used as a library for other projects with their own web.xml files overriding this one.
>
>
> Is it possible to contribute a ServletContextListener through AppModule in some way?
>
>
> Thanks,
> Mike
>
>
>
>
>
> Michael Leonardo
> Senior Software Engineer
> iFactory, A Division of RDW Group, Inc.
> Innovative, inspiring, intelligent interactive solutions
> for the world’s leading institutions
>
>
>
>
> 33 Farnsworth Street, 4th Floor
> Boston, MA 02210
> Main: 617.426.8600
> Direct: 617.235.5852
> Fax: 617.426. 0539
> www.ifactory.com
> @iFactoryBoston
>
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Dynamically contributing a ServletContextListener
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 26 Jan 2012 14:52:41 -0200, Mike Leonardo <mi...@ifactory.com>
wrote:
> Hi,
Hi, Mike!
> I'm working with integrating WURFL into my Tapestry app but I need to
> conditionally add WURFL's ServletContextListener through Tapestry but I
> can't figure out the right "hooks" or contribution that would make this
> possible. I want to avoid anything in my web.xml since my project is
> also used as a library for other projects with their own web.xml files
> overriding this one.
> Is it possible to contribute a ServletContextListener through AppModule
> in some way?
I'd try adding an HttpServletRequestFilter (before:*) which calls (or not,
depending on the needed logic) the contextInitialized() method of WIRFL's
ServletContextListener implemention just once in the webapp lifetime.
Cheers!
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org