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'
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
.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
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
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
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
> 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]
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
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,
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
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
>
> 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
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
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
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
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
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
: 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
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]
> 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
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) {
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
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
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
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
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
>
>
>
>
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]
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
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
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
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
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
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
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
retrieve an Application State Object (ASO) from
the ServletContext ?
public void contextDestroyed(ServletContextEvent event) {
ServletContext context = event.getServletContext();
// retrieve myApplicationObject here
}
In hivemodule.xml
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
>
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
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
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
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
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
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
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
; 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
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,
> > 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
> > 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]
---
> 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:
> &
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
: 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
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
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
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
66 matches
Mail list logo