Re: Getting ServletContext inside service

2009-11-10 Thread P . Stavrinides
Hi Stefan, It is not clear to me exactly what you are trying to do, perhaps show some code or be more precise. Inside a service you can get hold of ServletContext using ApplicationGlobals, but for most things and for what you are trying to do, use Tapestry's Context service. I don'

Re: Getting ServletContext inside service

2009-10-31 Thread Benny Law
Stefan, >> >> Try injecting org.apache.tapestry5.services.Context into your service and >> use its getInitParameter() method to retrieve your context parameters. >> >> Regards, >> >> Benny Law >> >> On Fri, Oct 30, 2009 at 3:56 PM, Stefan wro

Re: Getting ServletContext inside service

2009-10-31 Thread Stefan
.tapestry5.services.Context into your service and use its getInitParameter() method to retrieve your context parameters. Regards, Benny Law On Fri, Oct 30, 2009 at 3:56 PM, Stefan wrote: Hi, is there a way to get access to the ServletContext inside a service bean? I like to configure some paramet

Re: Getting ServletContext inside service

2009-10-30 Thread Benny Law
Hi Stefan, Try injecting org.apache.tapestry5.services.Context into your service and use its getInitParameter() method to retrieve your context parameters. Regards, Benny Law On Fri, Oct 30, 2009 at 3:56 PM, Stefan wrote: > Hi, > > is there a way to get access to the ServletContext

Getting ServletContext inside service

2009-10-30 Thread Stefan
Hi, is there a way to get access to the ServletContext inside a service bean? I like to configure some parameters within the web.xml which i need in some services. How can i retrieve these parameters? Injecting "ApplicationGlobals" does not work. Where is my mistake? Thanks

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-29 Thread Ivano Luberti
Martin Strand ha scritto: > There's a full reference here: > http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/ > > Ok thanks, now I realize that I had already found it but couldn't realize how to use it > I haven't tried it myself but this should work: > > value="service

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-29 Thread Martin Strand
> Shing Hing Man ha scritto: >> Yes it is a typo. I meant HiveMind.xml (instead of .application). >> >> Shing >> >> >> --- On Thu, 28/5/09, Andreas Andreou wrote: >> >> >>> From: Andreas Andreou >>> Subject: Re: [Tapestry 4.1]

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-29 Thread Ivano Luberti
Hing Man ha scritto: > Yes it is a typo. I meant HiveMind.xml (instead of .application). > > Shing > > > --- On Thu, 28/5/09, Andreas Andreou wrote: > > >> From: Andreas Andreou >> Subject: Re: [Tapestry 4.1] how to get ServletContext inside a service >&g

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-28 Thread Shing Hing Man
Yes it is a typo. I meant HiveMind.xml (instead of .application). Shing --- On Thu, 28/5/09, Andreas Andreou wrote: > From: Andreas Andreou > Subject: Re: [Tapestry 4.1] how to get ServletContext inside a service > To: "Tapestry users" > Date: Thursday, 28 May, 2009,

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-28 Thread Andreas Andreou
Inject.html >> >> Shing >> >> Home page : http://www.lombok.demon.co.uk/ >> >> >> >> --- On Thu, 28/5/09, Ivano Luberti wrote: >> >> >>> From: Ivano Luberti >>> Subject: Re: [Tapestry 4.1] how to get ServletContext

solved: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-28 Thread Ivano Luberti
o get the ServletContext to finally get the realPath. > > Anyone can tell me how to do that? > > I have searched for a while without success > > > -- == dott. Ivano Mario Luberti Archimede Informatica societa' cooperativa a r

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-28 Thread Ivano Luberti
> > http://lombok.demon.co.uk/tapestry4Demo/Inject.html > > Shing > > Home page : http://www.lombok.demon.co.uk/ > > > > --- On Thu, 28/5/09, Ivano Luberti wrote: > > >> From: Ivano Luberti >> Subject: Re: [Tapestry 4.1] how to get ServletContext inside

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-28 Thread Shing Hing Man
You might like to try the suggestion on the following page. http://lombok.demon.co.uk/tapestry4Demo/Inject.html Shing Home page : http://www.lombok.demon.co.uk/ --- On Thu, 28/5/09, Ivano Luberti wrote: > From: Ivano Luberti > Subject: Re: [Tapestry 4.1] how to get ServletContext

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-27 Thread Ivano Luberti
the inject/abstract method approach or I'm missing something in your answer. Norman Franke ha scritto: > Here is how I do it: > > @InjectObject("service:tapestry.globals.HttpServletRequest") > public abstract HttpServletRequest getRequest(); > > public

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-27 Thread Norman Franke
Here is how I do it: @InjectObject("service:tapestry.globals.HttpServletRequest") public abstract HttpServletRequest getRequest(); public ServletContext getServletContext() { return getRequest().getSession().getServletContext(); } Norman Franke Answering Service for Dire

[Tapestry 4.1] how to get ServletContext inside a service

2009-05-27 Thread Ivano Luberti
I have implemented a class that Implements IEngineService interface. I need to get the ServletContext to finally get the realPath. Anyone can tell me how to do that? I have searched for a while without success -- == dott. Ivano Mario Luberti

Re: Tapestry 5 and ServletContext

2008-11-06 Thread Thiago H. de Paula Figueiredo
Em Thu, 06 Nov 2008 02:10:41 -0300, Muralidhar Y <[EMAIL PROTECTED]> escreveu: I am not sure of T5 but you can use ASO with global scope. In this way the ASO will store in the servlet context. That might solve your problem. There isn't a global scoped ASO in Tapestry 5. Many things have cha

RE: Tapestry 5 and ServletContext

2008-11-05 Thread Muralidhar Y
: Tapestry users Subject: Tapestry 5 and ServletContext Hi all, I am new comer to tapestry. I am joining a project require using servlet context. I read emails from tapestry-user mail archive. Some info I get is that T5 dev planned to support it. So I want to know that T5 whether support servlet

Tapestry 5 and ServletContext

2008-11-05 Thread Tuan
default) now. http://tapestry.markmail.org/message/5wfqhhg6jm3johpc?q=ServletContext+from:%22Howard+Lewis+Ship%22 Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [T5] How to get to ApplocationGlobals and ServletContext

2008-10-05 Thread Eric Ma
> this.anotherService = anotherService; >} > } > > * Except in the unreleased Tapestry 5.0.16, where this has been added. > See https://issues.apache.org/jira/browse/TAP5-231 for more information. > > -Filip > -- View this message in context: http://w

Re: [T5] How to get to ApplocationGlobals and ServletContext

2008-10-04 Thread Filip S. Adamsen
Hi, Sounds like you tried using @Inject and friends to inject the services? This won't work.* You'll need to use constructor injection instead: public class ServiceImpl implements Service { private final AnotherService anotherService; public ServiceImpl(AnotherService anotherService) {

Re: [T5] How to get to ApplocationGlobals and ServletContext

2008-10-04 Thread Eric Ma
instead or inject ApplicationStateManager (?) into it. -- View this message in context: http://www.nabble.com/-T5--How-to-get-to-ApplicationGlobals-and-ServletContext-tp19797812p19817519.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: [T5] How to get to ApplocationGlobals and ServletContext

2008-10-04 Thread kranga
5] How to get to ApplocationGlobals and ServletContext I have a custom RequestFilter, which authenticates users and checks for user roles, and is applied to all pages. To avoid database hit on every request, authenticated user is cached in Acegi SecurityContextHolder. Now, another part of the app allows

[T5] How to get to ApplocationGlobals and ServletContext

2008-10-03 Thread Eric Ma
removing privileges. When that happens, I set a flag in ServletContext for user roles being dirty, forcing the user to be re-authenticated. So what I need to do is that in my RequestFilter, retrieve the flag from ServletContext. The problem I am running into is that the injected ApplicationGlobals in

Re: Access to ServletContext

2008-05-13 Thread Peter Stavrinides
Thanks Sven !! - Original Message - From: "Sven Homburg" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Tuesday, 13 May, 2008 12:43:40 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Access to ServletContext public static void contributeSched

Re: Access to ServletContext

2008-05-13 Thread Sven Homburg
d("quartz.properties", configPath + "/quartz.properties"); } 2008/5/13 Peter Stavrinides <[EMAIL PROTECTED]>: > Hi everyone, > > How can I get access to the ServletContext, (Not Context), is it possible > through T5 IoC? > > Thanks > Peter > > > >

Access to ServletContext

2008-05-13 Thread Peter Stavrinides
Hi everyone, How can I get access to the ServletContext, (Not Context), is it possible through T5 IoC? Thanks Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: RE: Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-11 Thread Tapestry User List
ation scope from the ServletContext ? It doesn't work. Registry registry = (Registry)context.getAttribute("org.apache.tapestry.Registry:app"); returns null. D. 2007/1/4, James Carman <[EMAIL PROTECTED]>: > I don't think that'll work. The ApplicationStateManager n

Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Shing Hing Man
that implements > ServletContextListener. > In the method public void > contextDestroyed(ServletContextEvent event), > I need to retrieve an Application State Object (ASO) > of tapestry 4 > with an application scope (not session). > > My question is how to retrieve an Appli

RE: Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Ben Dotte
User List [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 9:19 AM To: Tapestry users Subject: Re: Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ? It doesn't work. Registry registry = (Registry)context.getAttr

Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Mahmut Izci
ateObject" is the name of your ASO. > > HTH > > Ben > > -Original Message- > From: Tapestry User List [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 04, 2007 8:45 AM > To: tapestry-user@jakarta.apache.org > Subject: how to retrieve an Application St

Re: Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Tapestry User List
user@jakarta.apache.org > Subject: how to retrieve an Application State Object (ASO) with an > application scope from the ServletContext ? > > Hi, > > Happy new year > > I have created a class that implements ServletContextListener. > In the method public void contex

Re: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread James Carman
7 8:45 AM To: tapestry-user@jakarta.apache.org Subject: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ? Hi, Happy new year I have created a class that implements ServletContextListener. In the method public void contextDestroyed(Ser

RE: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Ben Dotte
Original Message- From: Tapestry User List [mailto:[EMAIL PROTECTED] Sent: Thursday, January 04, 2007 8:45 AM To: tapestry-user@jakarta.apache.org Subject: how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ? Hi, Happy new year I have c

how to retrieve an Application State Object (ASO) with an application scope from the ServletContext ?

2007-01-04 Thread Tapestry User List
retrieve an Application State Object (ASO) from the ServletContext ? public void contextDestroyed(ServletContextEvent event) { ServletContext context = event.getServletContext(); // retrieve myApplicationObject here } In hivemodule.xml

ServletContext

2006-12-28 Thread Dave Kallstrom
can I dynamically construct a url to this servlet? I have the ServletContext that tapestry is running in. but I don't see anyway to generate a url from that to a different servlet. -- Dave Kallstrom

[q] Show image + ServletContext

2006-11-07 Thread corsair
Hello anybody! In my webApp i have a set of images. My logic select one of this image. How to show image on page according servlet context name? i have several ideas 1) Inject ServletContext and add servletContext name to image path. And use Any component for showing. 2) Create ContextAsset and

RE: ServletContext

2006-05-17 Thread Schulte Marcus
esday, May 17, 2006 4:29 PM > To: Tapestry users > Subject: Re: ServletContext > > > I am using Java 6 on the desktop and 5 on the deployment machine. > And tapestry-annotations-4.0.1 is on my classpath. Its > included on the build > path of my Eclipse project. > &g

Re: ServletContext

2006-05-17 Thread Brian K. Wallace
Rui Pacheco [mailto: [EMAIL PROTECTED] >> Sent: Wednesday, May 17, 2006 10:24 AM >> To: Tapestry users >> Subject: Re: ServletContext > >> I want to use annotations, but for some reason the @Inject syntax > isn't >> recognized. I was just wonderi

Re: ServletContext

2006-05-17 Thread Rui Pacheco
s Carman wrote: > > Are you using JDK5? > > > > -Original Message- > > From: Rui Pacheco [mailto: [EMAIL PROTECTED] > > Sent: Wednesday, May 17, 2006 10:24 AM > > To: Tapestry users > > Subject: Re: ServletContext > > > > I want to use annotations, b

Re: ServletContext

2006-05-17 Thread Rui Pacheco
ve the tapestry-annotations jar on your classpath?) James Carman wrote: > Are you using JDK5? > > -Original Message- > From: Rui Pacheco [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 17, 2006 10:24 AM > To: Tapestry users > Subject: Re: ServletContext > > I want

Re: ServletContext

2006-05-17 Thread Jesse Kuhnert
Do you have tapestry-annotations jar in your classpath? On 5/17/06, James Carman <[EMAIL PROTECTED]> wrote: Are you using JDK5? -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 10:24 AM To: Tapestry users Subject: Re: ServletContext

Re: ServletContext

2006-05-17 Thread Brian K. Wallace
To: Tapestry users > Subject: Re: ServletContext > > I want to use annotations, but for some reason the @Inject syntax isn't > recognized. I was just wondering what do I need to have it working. > > On 5/17/06, James Carman <[EMAIL PROTECTED]> wrote: >> If you don't

RE: ServletContext

2006-05-17 Thread James Carman
Are you using JDK5? -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 10:24 AM To: Tapestry users Subject: Re: ServletContext I want to use annotations, but for some reason the @Inject syntax isn't recognized. I was just wondering what

Re: ServletContext

2006-05-17 Thread Rui Pacheco
n your component/page specification file: http://jakarta.apache.org/tapestry/UsersGuide/hivemind.html#hivemind.inject -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 10:15 AM To: Tapestry users Subject: Re: ServletContext What is the exact syntax to do

RE: ServletContext

2006-05-17 Thread James Carman
7, 2006 10:15 AM To: Tapestry users Subject: Re: ServletContext What is the exact syntax to do the injection of the component on the page? The examples on Tapestry's website only talk about using page definitions and I want to inject the DataSource directly on my page component. On the other ha

Re: ServletContext

2006-05-17 Thread Rui Pacheco
[mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 17, 2006 12:55 PM > To: Tapestry users > Subject: Re: ServletContext > > > I am sorry for being so thick, but I still dont understand > how to use my > pool based on the examples on Jakarta's website and yours. > I have a j

RE: ServletContext

2006-05-17 Thread James Carman
CTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 7:37 AM To: 'Tapestry users' Subject: RE: ServletContext Sorry, now I see what you mean. Actually you'll need *both*. 1. the hivemodule snippet configuring the DataSource from you .jar 2. A class like the one sketche

Re: ServletContext

2006-05-17 Thread Rui Pacheco
this make it clearer? > -Original Message- > From: Rui Pacheco [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 17, 2006 12:55 PM > To: Tapestry users > Subject: Re: ServletContext > > > I am sorry for being so thick, but I still dont understand > how to use my >

RE: ServletContext

2006-05-17 Thread Schulte Marcus
y, May 17, 2006 12:55 PM > To: Tapestry users > Subject: Re: ServletContext > > > I am sorry for being so thick, but I still dont understand > how to use my > pool based on the examples on Jakarta's website and yours. > I have a jar file with my connection pool. I h

RE: ServletContext

2006-05-17 Thread Schulte Marcus
2006 12:20 PM > To: Tapestry users > Subject: Re: ServletContext > > > For the sake of simplicity, lets assume I'm also using dbcp > > How do you retrieve a new connection from the Registry? > According to the HiveMind examples, I wound have to create an > instance of &g

Re: ServletContext

2006-05-17 Thread Rui Pacheco
this.dataSource = dataSource; } // MyDao interface methods here... } In your hivemodule.xml file... -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 6:20 AM To: Tapestry users Subject: Re: ServletContext For the sake of simplicit

RE: ServletContext

2006-05-17 Thread James Carman
ataSource ) { this.dataSource = dataSource; } // MyDao interface methods here... } In your hivemodule.xml file... -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 6:20 AM To: Tapestry users Subject: Re: ServletContext For the

Re: ServletContext

2006-05-17 Thread Rui Pacheco
für Testumgebung > -Original Message- > From: Rui Pacheco [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 16, 2006 3:54 PM > To: Tapestry users > Subject: Re: ServletContext > > > I dont doubt HiveMind would be the right way to go, but the > learning

RE: ServletContext

2006-05-16 Thread Schulte Marcus
L PROTECTED] > Sent: Tuesday, May 16, 2006 3:54 PM > To: Tapestry users > Subject: Re: ServletContext > > > I dont doubt HiveMind would be the right way to go, but the > learning curve > seems to be a bit too steep for my timeframe. > Can I insist on an example using Servlet

Re: ServletContext

2006-05-16 Thread Hugo Palma
ta for Proxool, the > > connection > > > > pool I'm using with my application. > > > > > > > > On 5/16/06, James Carman <[EMAIL PROTECTED]> wrote: > > > > > > > > > > First of all, what does that properties file con

Re: ServletContext

2006-05-16 Thread Rui Pacheco
; First of all, what does that properties file contain? You know, > > > HiveMind > > > > is > > > > a configuration microkernel, so you can do a lot of configuration > with > > > > HiveMind. > > > > > > > > -O

Re: ServletContext

2006-05-16 Thread Hugo Palma
ontain? You know, > > HiveMind > > > is > > > a configuration microkernel, so you can do a lot of configuration with > > > HiveMind. > > > > > > -Original Message- > > > From: Rui Pacheco [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, May 16,

Re: ServletContext

2006-05-16 Thread Rui Pacheco
> > First of all, what does that properties file contain? You know, > HiveMind > > is > > a configuration microkernel, so you can do a lot of configuration with > > HiveMind. > > > > -Original Message- > > From: Rui Pacheco [mailto:[EMAIL PRO

Re: ServletContext

2006-05-16 Thread Rui Pacheco
> > First of all, what does that properties file contain? You know, > HiveMind > > is > > a configuration microkernel, so you can do a lot of configuration with > > HiveMind. > > > > -Original Message- > > From: Rui Pacheco [mailto:[EMAIL PROTECTED]

Re: ServletContext

2006-05-16 Thread Hugo Palma
--- > From: Rui Pacheco [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 16, 2006 9:02 AM > To: Tapestry users > Subject: Re: ServletContext > > Could you or someone else give me an example on how to do that? > > On 5/16/06, Hugo Palma <[EMAIL PROTECTED]> wrote: > &

Re: ServletContext

2006-05-16 Thread Rui Pacheco
an do a lot of configuration with HiveMind. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 9:02 AM To: Tapestry users Subject: Re: ServletContext Could you or someone else give me an example on how to do that? On 5/16/06, Hugo Palma <[EMAIL PRO

RE: ServletContext

2006-05-16 Thread James Carman
: ServletContext Could you or someone else give me an example on how to do that? On 5/16/06, Hugo Palma <[EMAIL PROTECTED]> wrote: > > I would implement such a feature using a ServletContextListener. Something > like the HiveUtils SystemPropertyInitListener class. > > Cheers &g

Re: ServletContext

2006-05-16 Thread Rui Pacheco
lt;[EMAIL PROTECTED]> wrote: > > Hi all > > I was planning on storing a properties file inside my WEB-INF directory > and > then read it using getResourceAsStream from ServletContext, but apparently > I > can't access the ServletContext from inside Tapestry. > Is ther

Re: ServletContext

2006-05-16 Thread Hugo Palma
ead it using getResourceAsStream from ServletContext, but apparently I can't access the ServletContext from inside Tapestry. Is there another way to read the properties file or how to get to my ServletContext? -- Cumprimentos, Rui Pacheco

ServletContext

2006-05-16 Thread Rui Pacheco
Hi all I was planning on storing a properties file inside my WEB-INF directory and then read it using getResourceAsStream from ServletContext, but apparently I can't access the ServletContext from inside Tapestry. Is there another way to read the properties file or how to get