.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
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
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
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
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
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
=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
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
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
://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
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
://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
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
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
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
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
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]
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
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
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) {
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
(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
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
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
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
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
: 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
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
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
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
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
/*/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
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
-
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
: 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
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
, 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
, 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
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
: 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
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
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
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
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
: 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
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
, 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
,
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
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
: 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
50 matches
Mail list logo