> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2005 11:54
> To: Struts Users Mailing List
> Subject: Re: Storing data in session scope
>
>
> On 22/06/05 08:54 Pilgrim, Peter wrote:
> >> What data do I need to store???.
On 22/06/05 08:54 Pilgrim, Peter wrote:
What data do I need to store???. Data that it has to be updated if
the user goes to a module which update that data but in database.
So If the user updates the data, it has to be updated automatically
in the application scope.
This is different kettle o
> -Original Message-
> From: Rafael Taboada [mailto:[EMAIL PROTECTED]
====
>
I am suprise that no body mention a ServletFilter as also
another possibility.
>
> I really appreciate ur help, thanks to everybody for ur reply.
> In my web.xml file I have:
>
> /index.jsp
>
> So when
On 6/21/05, Rafael Taboada <[EMAIL PROTECTED]> wrote:
> Hi folks. I need to store some objects in session scope in order to use
> around the application. What is the best way to do that?
> I need to have TAX value in any place of the application. I thought about
> creating an Action class y call a
Do you truly need this information everywhere in the app? If not you
might be able to quite easily get away with just reading it in every
time you need it. Create a helper class with a single method that
returns some Map or something (or a custom bean, whatever is
appropriate) and use this cl
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
> The only complication in such situations to be aware of is when you
> might need to periodically refresh the data, i.e., maybe the database
> could possibly be updated throughout the day, but not frequently enough
> to hit it every time through.
What
I really appreciate ur help, thanks to everybody for ur reply.
In my web.xml file I have:
/index.jsp
So when the user write the URL http://localhost:8084/SanCristobal... It
calls the index.jsp file.
This file has a frameset (I didn't use tiles).
So, My doubt is how to store some data in app
Hi,
To get stuff in the application scope at startup we extended
org.apache.struts.action.Plugin and overrode the init method put what we
want in the application scope. We then load the plugin in
struts-config.xml. The plugin gets loaded when struts starts.
Since no one else mentioned this
ok, maybe I'll get it right today:
event.getServletContext().setAttribute("tax", "1.23");
-Original Message-
From: Abdullah Jibaly
Sent: Tuesday, June 21, 2005 4:05 PM
To: Struts Users Mailing List
Subject: RE: Storing data in session scope
It sh
From: "Aleksandar Matijaca" <[EMAIL PROTECTED]>
> Wendy, can you please give me the complete class name of that Listener
> object? Is it referenced in the web.xml??
HttpSessionListener and ServletContextListener are interfaces that you
implement. They require a Servlet 2.3 or better container (T
It should be getServletContext().setAttribute("tax", "1.23");
-Original Message-
From: Abdullah Jibaly
Sent: Tuesday, June 21, 2005 4:00 PM
To: 'Struts Users Mailing List'; 'Rafael Taboada'
Subject: RE: Storing data in session scope
in web.xml:
If an example of a ContextListener would be helpful, and perhaps even
something that will do the trick for you, depending on the requirements,
take a look at the code I just checked in to CVS for JavaWebParts:
http://sourceforge.net/projects/javawebparts/
It is available in HEAD. I added a Co
in web.xml:
com.acme.web.listener.StartupListener
StartupListener.java:
public class StartupListener implements ServletContextListener {
public void contextInitialized(ServletContextEvent event) {
context.setAttribute("tax", "1.23");
}
}
in your jsp:
${applicationS
You beat me to punch Wendy, I was just in the middle of tying almost the
same reply :)
The only complication in such situations to be aware of is when you
might need to periodically refresh the data, i.e., maybe the database
could possibly be updated throughout the day, but not frequently enou
Wendy, can you please give me the complete class name of that Listener
object? Is it referenced in the web.xml??
Thanks, Alex.
On 6/21/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
>
> From: "Rafael Taboada" <[EMAIL PROTECTED]>
>
> > I need to store some objects in session scope in order to use
What I would do is, create an index.html, and inside of that index.html, do
redirect to a struts action...
For example:
Then, in your struts, the action mapped through firstAction.do can load up
the session with your TAX info...
Another way would be to create a Filter class, which will get ca
From: "Rafael Taboada" <[EMAIL PROTECTED]>
> I need to store some objects in session scope in order to use
> around the application.
If you need to use them across the entire webapp, then application/context
scope might be more appropriate. But either way, what I do is have a
Listener that is no
17 matches
Mail list logo