[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Get application context from within a BasePage subclass
From:       Kaspar Fischer <fischerk () inf ! ethz ! ch>
Date:       2007-11-20 17:42:25
Message-ID: 762410A3-D1D1-463C-9BF8-635CB8B3A778 () inf ! ethz ! ch
[Download RAW message or body]

Hi,

The Tapestry reference,

   http://static.springframework.org/spring/docs/2.0.x/reference/ 
webintegration.html#webintegration-common

says that "[...] one can use the following code snippet to get access
to this 'business context' ApplicationContext created by the
ContextLoaderListener":

   WebApplicationContext ctx =  
WebApplicationContextUtils.getWebApplicationContext(servletContext);

How would I do this from within a page (i.e., a subclass of BasePage)?

IIUC, a page need not have an associated servletContext. So what sort
of indirection would I use?

I am trying to get the Spring WebApplicationContext service that
(apparently) the tapestry-spring.jar,

   http://tapestry.apache.org/tapestry5/tapestry-spring/

adds. My finally goal is to load a Spring bean from a page to do
some processing.

Many thanks and sorry for the simple question (I am a Tapestry newbie!),
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic