You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/06/28 21:50:34 UTC

[T5] tapestry-spring and WebApplicationContext

Hi,

In the T5 tapestry-spring documentation it is writed to don't use other 
Spring beans than Singleton ones.
Inject the WebApplicationContext instead.
http://tapestry.apache.org/tapestry5/tapestry-spring/

But howto inject the WebApplicationContext ?

thanks
cyrille

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


Re: [T5] tapestry-spring and WebApplicationContext

Posted by jeffrey ai <jf...@gmail.com>.
> But my injection of the WebApplicationContext is not in a page but in
> another class. Is it a problem ?

I think it will be a problem.
I believe Tapestry will only handle those classes in the package you defined
in tapestry.app-package in web.xml.
You could try to move it to see how things going.

Cheers,
Jeffrey Ai


Stephane Decleire wrote:
> 
> Yes, i've set this configuration.
> But my injection of the WebApplicationContext is not in a page but in
> another class. Is it a problem ?
> 
> Stephane
> 
> Ezra Epstein a écrit :
>> And your web.xml file has:
>>
>>     <listener>
>>      
>> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>>     </listener>
>>
>> And if the application context .xml files aren't in the standard place
>> and named the standard way you've also included:
>>
>>     <context-param>
>>         <param-name>contextConfigLocation</param-name>
>>         <param-value><!-- path to your applicationContext.xml
>> --></param-value>
>>     </context-param>
>>
>> ?
>>
>> Steph <sd...@cariboo-networks.com> wrote: I've tried this but my
>> WebApplicationContext is null ...
>>
>> Stephane
>>
>>
>> SergeEby a �crit :
>>   
>>> Hi,
>>>
>>> Just import and inject the WAC in your page:
>>>
>>> import org.springframework.web.context.WebApplicationContext;
>>>
>>> class Foo {
>>>
>>> ...
>>>  @Inject
>>>  private WebApplicationContext  wac;
>>>
>>> ...
>>> }
>>>
>>>
>>>
>>>
>>> /Serge
>>>
>>>
>>>
>>> cyrille37 wrote:
>>>   
>>>     
>>>> Fidel Chavarria a �crit :
>>>>     
>>>>       
>>>>> Hi
>>>>> I think this willhelp you,
>>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>>   
>>>>>       
>>>>>         
>>>> Thanks,
>>>> but if you had read my mail, I should see that I'm talked about this
>>>> page.
>>>>
>>>> In this page in "Limitations" chapter it is writte that we can't inject 
>>>> Spring session bean but we have to retreive the WebApplicationContext 
>>>> and use it.
>>>> But I don't know howto retreive this so famous WebApplicationContext 
>>>> when I'm in a tapestry code page or component.
>>>>
>>>> cyrille.
>>>>     
>>>>       
>>>>> cyrille37 wrote:
>>>>>   
>>>>>       
>>>>>         
>>>>>> Hi,
>>>>>>
>>>>>> In the T5 tapestry-spring documentation it is writed to don't use
>>>>>> other 
>>>>>> Spring beans than Singleton ones.
>>>>>> Inject the WebApplicationContext instead.
>>>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>>>
>>>>>> But howto inject the WebApplicationContext ?
>>>>>>
>>>>>> thanks
>>>>>> cyrille
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>     
>>>>>>         
>>>>>>           
>>>>>   
>>>>>       
>>>>>         
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>       
>>>   
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>   
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--tapestry-spring-and-WebApplicationContext-tf3996411.html#a13861313
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: [T5] tapestry-spring and WebApplicationContext

Posted by Steph <sd...@cariboo-networks.com>.
Yes, i've set this configuration.
But my injection of the WebApplicationContext is not in a page but in
another class. Is it a problem ?

Stephane

Ezra Epstein a écrit :
> And your web.xml file has:
>
>     <listener>
>       <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>     </listener>
>
> And if the application context .xml files aren't in the standard place and named the standard way you've also included:
>
>     <context-param>
>         <param-name>contextConfigLocation</param-name>
>         <param-value><!-- path to your applicationContext.xml --></param-value>
>     </context-param>
>
> ?
>
> Steph <sd...@cariboo-networks.com> wrote: I've tried this but my WebApplicationContext is null ...
>
> Stephane
>
>
> SergeEby a �crit :
>   
>> Hi,
>>
>> Just import and inject the WAC in your page:
>>
>> import org.springframework.web.context.WebApplicationContext;
>>
>> class Foo {
>>
>> ...
>>  @Inject
>>  private WebApplicationContext  wac;
>>
>> ...
>> }
>>
>>
>>
>>
>> /Serge
>>
>>
>>
>> cyrille37 wrote:
>>   
>>     
>>> Fidel Chavarria a �crit :
>>>     
>>>       
>>>> Hi
>>>> I think this willhelp you,
>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>   
>>>>       
>>>>         
>>> Thanks,
>>> but if you had read my mail, I should see that I'm talked about this page.
>>>
>>> In this page in "Limitations" chapter it is writte that we can't inject 
>>> Spring session bean but we have to retreive the WebApplicationContext 
>>> and use it.
>>> But I don't know howto retreive this so famous WebApplicationContext 
>>> when I'm in a tapestry code page or component.
>>>
>>> cyrille.
>>>     
>>>       
>>>> cyrille37 wrote:
>>>>   
>>>>       
>>>>         
>>>>> Hi,
>>>>>
>>>>> In the T5 tapestry-spring documentation it is writed to don't use other 
>>>>> Spring beans than Singleton ones.
>>>>> Inject the WebApplicationContext instead.
>>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>>
>>>>> But howto inject the WebApplicationContext ?
>>>>>
>>>>> thanks
>>>>> cyrille
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>         
>>>>>           
>>>>   
>>>>       
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>     
>>>       
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

Re: [T5] tapestry-spring and WebApplicationContext

Posted by Ezra Epstein <ez...@yahoo.com>.
And your web.xml file has:

    <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

And if the application context .xml files aren't in the standard place and named the standard way you've also included:

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value><!-- path to your applicationContext.xml --></param-value>
    </context-param>

?

Steph <sd...@cariboo-networks.com> wrote: I've tried this but my WebApplicationContext is null ...

Stephane


SergeEby a �crit :
> Hi,
>
> Just import and inject the WAC in your page:
>
> import org.springframework.web.context.WebApplicationContext;
>
> class Foo {
>
> ...
>  @Inject
>  private WebApplicationContext  wac;
>
> ...
> }
>
>
>
>
> /Serge
>
>
>
> cyrille37 wrote:
>   
>> Fidel Chavarria a �crit :
>>     
>>> Hi
>>> I think this willhelp you,
>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>   
>>>       
>> Thanks,
>> but if you had read my mail, I should see that I'm talked about this page.
>>
>> In this page in "Limitations" chapter it is writte that we can't inject 
>> Spring session bean but we have to retreive the WebApplicationContext 
>> and use it.
>> But I don't know howto retreive this so famous WebApplicationContext 
>> when I'm in a tapestry code page or component.
>>
>> cyrille.
>>     
>>> cyrille37 wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> In the T5 tapestry-spring documentation it is writed to don't use other 
>>>> Spring beans than Singleton ones.
>>>> Inject the WebApplicationContext instead.
>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>
>>>> But howto inject the WebApplicationContext ?
>>>>
>>>> thanks
>>>> cyrille
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   

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



Re: [T5] tapestry-spring and WebApplicationContext

Posted by Steph <sd...@cariboo-networks.com>.
I've tried this but my WebApplicationContext is null ...

Stephane


SergeEby a écrit :
> Hi,
>
> Just import and inject the WAC in your page:
>
> import org.springframework.web.context.WebApplicationContext;
>
> class Foo {
>
> ...
>  @Inject
>  private WebApplicationContext  wac;
>
> ...
> }
>
>
>
>
> /Serge
>
>
>
> cyrille37 wrote:
>   
>> Fidel Chavarria a écrit :
>>     
>>> Hi
>>> I think this willhelp you,
>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>   
>>>       
>> Thanks,
>> but if you had read my mail, I should see that I'm talked about this page.
>>
>> In this page in "Limitations" chapter it is writte that we can't inject 
>> Spring session bean but we have to retreive the WebApplicationContext 
>> and use it.
>> But I don't know howto retreive this so famous WebApplicationContext 
>> when I'm in a tapestry code page or component.
>>
>> cyrille.
>>     
>>> cyrille37 wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> In the T5 tapestry-spring documentation it is writed to don't use other 
>>>> Spring beans than Singleton ones.
>>>> Inject the WebApplicationContext instead.
>>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>>
>>>> But howto inject the WebApplicationContext ?
>>>>
>>>> thanks
>>>> cyrille
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   

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


Re: [T5] tapestry-spring and WebApplicationContext

Posted by SergeEby <sd...@hotmail.com>.
Hi,

Just import and inject the WAC in your page:

import org.springframework.web.context.WebApplicationContext;

class Foo {

...
 @Inject
 private WebApplicationContext  wac;

...
}




/Serge



cyrille37 wrote:
> 
> Fidel Chavarria a écrit :
>> Hi
>> I think this willhelp you,
>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>   
> Thanks,
> but if you had read my mail, I should see that I'm talked about this page.
> 
> In this page in "Limitations" chapter it is writte that we can't inject 
> Spring session bean but we have to retreive the WebApplicationContext 
> and use it.
> But I don't know howto retreive this so famous WebApplicationContext 
> when I'm in a tapestry code page or component.
> 
> cyrille.
>> cyrille37 wrote:
>>   
>>> Hi,
>>>
>>> In the T5 tapestry-spring documentation it is writed to don't use other 
>>> Spring beans than Singleton ones.
>>> Inject the WebApplicationContext instead.
>>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>>
>>> But howto inject the WebApplicationContext ?
>>>
>>> thanks
>>> cyrille
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--tapestry-spring-and-WebApplicationContext-tf3996411.html#a11359690
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: [T5] tapestry-spring and WebApplicationContext

Posted by #Cyrille37# <cy...@gmail.com>.
Fidel Chavarria a écrit :
> Hi
> I think this willhelp you,
> http://tapestry.apache.org/tapestry5/tapestry-spring/
>   
Thanks,
but if you had read my mail, I should see that I'm talked about this page.

In this page in "Limitations" chapter it is writte that we can't inject 
Spring session bean but we have to retreive the WebApplicationContext 
and use it.
But I don't know howto retreive this so famous WebApplicationContext 
when I'm in a tapestry code page or component.

cyrille.
> cyrille37 wrote:
>   
>> Hi,
>>
>> In the T5 tapestry-spring documentation it is writed to don't use other 
>> Spring beans than Singleton ones.
>> Inject the WebApplicationContext instead.
>> http://tapestry.apache.org/tapestry5/tapestry-spring/
>>
>> But howto inject the WebApplicationContext ?
>>
>> thanks
>> cyrille
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   



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


Re: [T5] tapestry-spring and WebApplicationContext

Posted by Fidel Chavarria <fi...@gmail.com>.
Hi
I think this willhelp you,
http://tapestry.apache.org/tapestry5/tapestry-spring/





cyrille37 wrote:
> 
> Hi,
> 
> In the T5 tapestry-spring documentation it is writed to don't use other 
> Spring beans than Singleton ones.
> Inject the WebApplicationContext instead.
> http://tapestry.apache.org/tapestry5/tapestry-spring/
> 
> But howto inject the WebApplicationContext ?
> 
> thanks
> cyrille
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--tapestry-spring-and-WebApplicationContext-tf3996411.html#a11352177
Sent from the Tapestry - User mailing list archive at Nabble.com.


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