Re: Getting ServletContext inside service

2009-10-31 Thread Stefan
.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 ste...@wammel.com wrote: Hi, is there a way to get access to the ServletContext inside a service bean? I like to configure some

Re: Getting ServletContext inside service

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

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 in advance

Re: Getting ServletContext inside service

2009-10-30 Thread Benny Law
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 in advance. Stefan

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

2009-05-29 Thread Ivano Luberti
Then there is another typo, I guess. These two lines will make tapestry throw an no entry point excpetion: set-object property=httpRequest value=service:tapestry.globals.HttpServletRequest set-object property=servletContext value=service:tapestry.ServletContext

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

2009-05-29 Thread Martin Strand
There's a full reference here: http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/ I haven't tried it myself but this should work: set-object property=servletContext value=service:tapestry.globals.ServletContext / see http://tapestry.apache.org/tapestry4.1/tapestry-framework

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

2009-05-29 Thread Ivano Luberti
=servletContext value=service:tapestry.globals.ServletContext / I have done it and I can confirm I have got the no entry point exception. While this: set-object property=context value=infrastructure:context/ works properly

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

2009-05-28 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 ServletContext getServletContext() { return

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

2009-05-28 Thread Shing Hing Man
4.1] how to get ServletContext inside a service To: Tapestry users users@tapestry.apache.org Date: Thursday, 28 May, 2009, 2:54 PM Thanks Norman, but I guess you use that inside a class that extends BasePage as I do. But here I have a concrete class that implements IEngineService. I use

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

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

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

2009-05-28 Thread Ivano Luberti
Luberti ha scritto: 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

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

2009-05-28 Thread Andreas Andreou
://www.lombok.demon.co.uk/ --- On Thu, 28/5/09, Ivano Luberti lube...@archicoop.it wrote: From: Ivano Luberti lube...@archicoop.it Subject: Re: [Tapestry 4.1] how to get ServletContext inside a service To: Tapestry users users@tapestry.apache.org Date: Thursday, 28 May, 2009, 2:54 PM Thanks

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 andy...@di.uoa.gr wrote: From: Andreas Andreou andy...@di.uoa.gr Subject: Re: [Tapestry 4.1] how to get ServletContext inside a service To: Tapestry users users@tapestry.apache.org

[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 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 Directors, Inc

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

Tapestry 5 and ServletContext

2008-11-05 Thread Tuan
in 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: Tapestry 5 and ServletContext

2008-11-05 Thread Muralidhar Y
To: 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

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

2008-10-05 Thread Eric Ma
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://www.nabble.com/-T5--How-to-get-to-ApplicationGlobals-and-ServletContext-tp19797812p19831048.html Sent from

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) {

[T5] How to get to ApplocationGlobals and ServletContext

2008-10-03 Thread Eric Ma
or 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

Re: Access to ServletContext

2008-05-13 Thread Sven Homburg
(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

Re: Access to ServletContext

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

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
an Application State Object (ASO) with an application 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

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

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

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 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

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

2007-01-04 Thread James Carman
: 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(ServletContextEvent event), I need to retrieve an Application

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

2007-01-04 Thread Tapestry User List
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 State Object (ASO) with an application scope from the ServletContext ? Hi, Happy new

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

2007-01-04 Thread Mahmut Izci
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 created a class that implements ServletContextListener

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

2007-01-04 Thread Ben Dotte
this would work. Ben -Original Message- From: Tapestry 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

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

2007-01-04 Thread Shing Hing Man
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 Application State Object (ASO) from the ServletContext ? public void contextDestroyed

ServletContext

2006-12-28 Thread Dave Kallstrom
/*/url-pattern how 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

RE: ServletContext

2006-05-17 Thread Schulte Marcus
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 ServletContextListener, ie, something that being all in Java would be more in my reach

Re: ServletContext

2006-05-17 Thread Rui Pacheco
- 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 curve seems to be a bit too steep for my timeframe. Can I insist on an example using

RE: ServletContext

2006-05-17 Thread James Carman
: Wednesday, May 17, 2006 6:20 AM 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 DataSource and retrieve that from

Re: ServletContext

2006-05-17 Thread Rui Pacheco
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 DataSource and retrieve that from the registry, and then go

Re: ServletContext

2006-05-17 Thread Rui Pacheco
, 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 have defined the service

RE: ServletContext

2006-05-17 Thread James Carman
, 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 hand

Re: ServletContext

2006-05-17 Thread Rui Pacheco
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 the injection

Re: ServletContext

2006-05-17 Thread Brian K. Wallace
: 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 want to use annotations, you'll have to use an inject element in your

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 I want

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 to my

Re: ServletContext

2006-05-16 Thread Hugo Palma
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

Re: ServletContext

2006-05-16 Thread Rui Pacheco
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 there another way to read the properties file or how to get

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 Hugo On 5/16/06, Rui

Re: ServletContext

2006-05-16 Thread Rui Pacheco
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, 2006 9:02 AM To: Tapestry users Subject: Re: ServletContext Could you or someone else give me an example

Re: ServletContext

2006-05-16 Thread Hugo Palma
, 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: I would implement such a feature using a ServletContextListener. Something like the HiveUtils

Re: ServletContext

2006-05-16 Thread Rui Pacheco
, 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, 2006 9:02 AM To: Tapestry users Subject: Re: ServletContext Could you or someone else give me

Re: ServletContext

2006-05-16 Thread Hugo Palma
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: I would implement such a feature using a ServletContextListener

Re: ServletContext

2006-05-16 Thread Rui Pacheco
: 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