Re: global.jsa

2002-09-11 Thread Chris Brown


You seem to have implemented the correct interfaces.  However, I've not seen
your web.xml deployment descriptor.  You'll need to refer to your class in
two separate places in web.xml in order for both event types (session and
application) to be sent to your class.  I suspect that the servlet engine
will create one separate instance of the class for listening to application
start/stop and another for session activation/deactivation.

If you really need to store everything in one instance of the class, you
could always add this (the servlet context listener) as a servlet context
attribute, and then when a session starts or ends, call a method of the
first instance by getting the copy you put in the servlet context.  I'd
personally make two classes, for readability and simplicity though!

- Chris

- Original Message -
From: Felipe Schnack [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 8:14 PM
Subject: Re: global.jsa


   Hi!
   I saw this post of yours in the tomcat list and tried myself. For some
 reason it doesn works... you can help me? I don't know what to do, it
 works for application start/stop, but not for session.

 On Mon, 2002-09-09 at 05:51, Chris Brown wrote:
 
  Hello,
 
  I've seen a few answers to your question suggesting that you use a
servlet
  that loads on startup.  I have another suggestion that you may prefer to
  emulate global.asa: implement ServletContextListener and
  HttpSessionActivationListener.
 
  javax.servlet.ServletContextListener
 
...sends you events when the webapp starts and ends.
 
  javax.servlet.http.HttpSessionActivationListener
 
...sends you events when a session is created or destroyed.
 
  You'll find javadocs for these items in the following path with a
default
  tomcat installation, obviously relative to the root of your
installation:
 
/tomcat-docs/servletapi/index.html
 
  To use them, you'll need to add appropriate XML elements to web.xml
(refer
  to a tutorial or the web.xml DTD).  It's simple and works well.
 
  - Chris
 
  - Original Message -
  From: neal [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, September 03, 2002 10:14 AM
  Subject: global.jsa
 
 
   Is there such a thing as a global.jsa file in Tomcat?
  
   I first saw this concept (an idea taken from ASP's global.asa)
implemented
   in JRUN.
  
   If there is a global.jsa, does anyone know of any docs on this?  If
not,
  is
   there an alternative? The reason I would want to use this is to
  instantiate,
   populate, and cache a few objects upon startup of the application.  If
   Tomcat does not provide a global.jsa...does anyone know how otherwise
to
   achieve the goal?
  
   Thanks.
   Neal
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
 
 
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Faculdade Ritter dos Reis
 www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303328




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: global.jsa

2002-09-11 Thread Felipe Schnack

  That's not the problem. If I comment out ServletContextListener
interface, I still don't get any session notifications.

On Wed, 2002-09-11 at 04:23, Chris Brown wrote:
 
 You seem to have implemented the correct interfaces.  However, I've not seen
 your web.xml deployment descriptor.  You'll need to refer to your class in
 two separate places in web.xml in order for both event types (session and
 application) to be sent to your class.  I suspect that the servlet engine
 will create one separate instance of the class for listening to application
 start/stop and another for session activation/deactivation.
 
 If you really need to store everything in one instance of the class, you
 could always add this (the servlet context listener) as a servlet context
 attribute, and then when a session starts or ends, call a method of the
 first instance by getting the copy you put in the servlet context.  I'd
 personally make two classes, for readability and simplicity though!
 
 - Chris
 
 - Original Message -
 From: Felipe Schnack [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 10, 2002 8:14 PM
 Subject: Re: global.jsa
 
 
Hi!
I saw this post of yours in the tomcat list and tried myself. For some
  reason it doesn works... you can help me? I don't know what to do, it
  works for application start/stop, but not for session.
 
  On Mon, 2002-09-09 at 05:51, Chris Brown wrote:
  
   Hello,
  
   I've seen a few answers to your question suggesting that you use a
 servlet
   that loads on startup.  I have another suggestion that you may prefer to
   emulate global.asa: implement ServletContextListener and
   HttpSessionActivationListener.
  
   javax.servlet.ServletContextListener
  
 ...sends you events when the webapp starts and ends.
  
   javax.servlet.http.HttpSessionActivationListener
  
 ...sends you events when a session is created or destroyed.
  
   You'll find javadocs for these items in the following path with a
 default
   tomcat installation, obviously relative to the root of your
 installation:
  
 /tomcat-docs/servletapi/index.html
  
   To use them, you'll need to add appropriate XML elements to web.xml
 (refer
   to a tutorial or the web.xml DTD).  It's simple and works well.
  
   - Chris
  
   - Original Message -
   From: neal [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Tuesday, September 03, 2002 10:14 AM
   Subject: global.jsa
  
  
Is there such a thing as a global.jsa file in Tomcat?
   
I first saw this concept (an idea taken from ASP's global.asa)
 implemented
in JRUN.
   
If there is a global.jsa, does anyone know of any docs on this?  If
 not,
   is
there an alternative? The reason I would want to use this is to
   instantiate,
populate, and cache a few objects upon startup of the application.  If
Tomcat does not provide a global.jsa...does anyone know how otherwise
 to
achieve the goal?
   
Thanks.
Neal
   
   
--
To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
   
   
   
  
  
  
   --
   To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  --
 
  Felipe Schnack
  Analista de Sistemas
  [EMAIL PROTECTED]
  Cel.: (51)91287530
  Linux Counter #281893
 
  Faculdade Ritter dos Reis
  www.ritterdosreis.br
  [EMAIL PROTECTED]
  Fone/Fax.: (51)32303328
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: global.jsa

2002-09-09 Thread Chris Brown


Hello,

I've seen a few answers to your question suggesting that you use a servlet
that loads on startup.  I have another suggestion that you may prefer to
emulate global.asa: implement ServletContextListener and
HttpSessionActivationListener.

javax.servlet.ServletContextListener

  ...sends you events when the webapp starts and ends.

javax.servlet.http.HttpSessionActivationListener

  ...sends you events when a session is created or destroyed.

You'll find javadocs for these items in the following path with a default
tomcat installation, obviously relative to the root of your installation:

  /tomcat-docs/servletapi/index.html

To use them, you'll need to add appropriate XML elements to web.xml (refer
to a tutorial or the web.xml DTD).  It's simple and works well.

- Chris

- Original Message -
From: neal [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, September 03, 2002 10:14 AM
Subject: global.jsa


 Is there such a thing as a global.jsa file in Tomcat?

 I first saw this concept (an idea taken from ASP's global.asa) implemented
 in JRUN.

 If there is a global.jsa, does anyone know of any docs on this?  If not,
is
 there an alternative? The reason I would want to use this is to
instantiate,
 populate, and cache a few objects upon startup of the application.  If
 Tomcat does not provide a global.jsa...does anyone know how otherwise to
 achieve the goal?

 Thanks.
 Neal


 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-04 Thread Barney Hamish

load-on-startup in your WEB-INF/web.xml is the element. Have a look in the
servlet specifications for a fuller description.
Hamish

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 8:43 PM
 To: Tomcat Users List
 Subject: RE: global.jsa
 
 
 Interesting.  I was aware of the application scope option 
 which is cool ...
 but not exactly what I was looking for.  Running a servlet 
 onStartup is an
 intriquing suggestion though.  I didn't know you could do 
 thatI think
 that's what I'm looking for!  :)
 
 Cool...I'm going to read more about it.  Do you know the 
 syntax of the top
 of your head for specifying an onStartup servlet in the web.xml file?
 
 Thanks for your help.
 
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 2:14 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 Why don't you just declare the object you want to use as 
 having application
 scope? That way the first time you use it it will be initialized?
 
 Alternatively you can specify servlets that should be run on 
 start-up in the
 web.xml if you want some kind of java daemon running.
 
 Hamish
 
  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:56 AM
  To: Tomcat Users List
  Subject: RE: global.jsa
 
 
  Thanks.
 
  No global.jsa, eeh?
 
  The web.xml is a good way to go if you have flat variables
  that you want
  placed into the application object ... but can you 
 instantiate objects
  there?  Can you specify scope of those objects or will it presume
  application scope?
 
  THanks.
  Neal
 
 
  -Original Message-
  From: Barney Hamish [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 1:30 AM
  To: 'Tomcat Users List'
  Subject: RE: global.jsa
 
 
  You can use the WEB-INF/web.xml to similar effect or you can
  also declare
  objects to have application scope, then you have a global
  object that you
  can access anywhere.
  Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:15 AM
   To: Tomcat Users List
   Subject: global.jsa
  
  
   Is there such a thing as a global.jsa file in Tomcat?
  
   I first saw this concept (an idea taken from ASP's
   global.asa) implemented
   in JRUN.
  
   If there is a global.jsa, does anyone know of any docs on
   this?  If not, is
   there an alternative? The reason I would want to use this is
   to instantiate,
   populate, and cache a few objects upon startup of the
  application.  If
   Tomcat does not provide a global.jsa...does anyone know how
   otherwise to
   achieve the goal?
  
   Thanks.
   Neal
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa - Struts

2002-09-04 Thread neal

Micael,

You've mentioned Struts a couple of times and I admit I am curious.

I did look into Struts but to be honost I wasn't all that impressed by what
(I think) I saw. It seemed like it was just offering a lot of lightweight
wrappers around the API.  Case in point, the Cookie utility class didn't
appear to offer any additional functionality over the http.cookie class in
the JDK. It's connection pooling was even pretty rudamentary so I went
around that.  I presume that its XML/XSL, and other such things would also
be rundamentary probably too. And actually, did I say a lot?  I looked at
the API and I didnt think there was a lot there...

All those things I'm saying wouldn't be bad per se, except that I don't want
to learn a whole new API to do basically what Java already does with it's
own standard API (again back to the wrapper thing).

Granted the MVC pattern implementation is apparentlly very good but I'm not
seeing that as a huge stumbling block to write on my own. They also appear
to provide custom tags wrappers around their API so that you can keep your
code totally declarative (code based) at the JSP level. Ok, that would be
cool ... but again I just don't want to be realying on a non-standard API
still for standard functionality.  I'll end up forgetting the JDK API in
lieu of Struts API.  :(

S, this is my initial impression of Struts.  I dont know ... what do you
think?  Am I totally off base with my concerns and/or assessment of the
package?  If so, please let me know.  I am open to being proven wrong here.
I've heard Struts is a great package ... its just the cost-benefit (time to
learn vs. gain in productivity) analysis doesn't seem to be pointing me in
that direction right now. :)

-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 12:36 PM
To: Tomcat Users List
Subject: RE: global.jsa


Why don't you look at a struts application?  They exist, and all
applications with Tomcat do this.

At 11:42 AM 9/3/2002 -0700, you wrote:
Interesting.  I was aware of the application scope option which is cool ...
but not exactly what I was looking for.  Running a servlet onStartup is an
intriquing suggestion though.  I didn't know you could do thatI think
that's what I'm looking for!  :)

Cool...I'm going to read more about it.  Do you know the syntax of the top
of your head for specifying an onStartup servlet in the web.xml file?

Thanks for your help.

Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 2:14 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


Why don't you just declare the object you want to use as having application
scope? That way the first time you use it it will be initialized?

Alternatively you can specify servlets that should be run on start-up in
the
web.xml if you want some kind of java daemon running.

Hamish

  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:56 AM
  To: Tomcat Users List
  Subject: RE: global.jsa
 
 
  Thanks.
 
  No global.jsa, eeh?
 
  The web.xml is a good way to go if you have flat variables
  that you want
  placed into the application object ... but can you instantiate objects
  there?  Can you specify scope of those objects or will it presume
  application scope?
 
  THanks.
  Neal
 
 
  -Original Message-
  From: Barney Hamish [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 1:30 AM
  To: 'Tomcat Users List'
  Subject: RE: global.jsa
 
 
  You can use the WEB-INF/web.xml to similar effect or you can
  also declare
  objects to have application scope, then you have a global
  object that you
  can access anywhere.
  Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:15 AM
   To: Tomcat Users List
   Subject: global.jsa
  
  
   Is there such a thing as a global.jsa file in Tomcat?
  
   I first saw this concept (an idea taken from ASP's
   global.asa) implemented
   in JRUN.
  
   If there is a global.jsa, does anyone know of any docs on
   this?  If not, is
   there an alternative? The reason I would want to use this is
   to instantiate,
   populate, and cache a few objects upon startup of the
  application.  If
   Tomcat does not provide a global.jsa...does anyone know how
   otherwise to
   achieve the goal?
  
   Thanks.
   Neal
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional

RE: global.jsa - Struts

2002-09-04 Thread micael

The point is not for you to use struts.  The point is that struts employs a 
lot of things you say you want to learn about.  Look at struts and you will 
see employed what you are tyring to understand, viz. how to initialize a 
servlet with web.xml at startup.  If you think you can write a whole MVC as 
no big stumbling block, and yet don't know how to initialize a servlet on 
the startup of the server with web.xml, I am confused.  So, please accept 
my apologies once again.

At 08:10 AM 9/4/2002 -0700, you wrote:
Micael,

You've mentioned Struts a couple of times and I admit I am curious.

I did look into Struts but to be honost I wasn't all that impressed by what
(I think) I saw. It seemed like it was just offering a lot of lightweight
wrappers around the API.  Case in point, the Cookie utility class didn't
appear to offer any additional functionality over the http.cookie class in
the JDK. It's connection pooling was even pretty rudamentary so I went
around that.  I presume that its XML/XSL, and other such things would also
be rundamentary probably too. And actually, did I say a lot?  I looked at
the API and I didnt think there was a lot there...

All those things I'm saying wouldn't be bad per se, except that I don't want
to learn a whole new API to do basically what Java already does with it's
own standard API (again back to the wrapper thing).

Granted the MVC pattern implementation is apparentlly very good but I'm not
seeing that as a huge stumbling block to write on my own. They also appear
to provide custom tags wrappers around their API so that you can keep your
code totally declarative (code based) at the JSP level. Ok, that would be
cool ... but again I just don't want to be realying on a non-standard API
still for standard functionality.  I'll end up forgetting the JDK API in
lieu of Struts API.  :(

S, this is my initial impression of Struts.  I dont know ... what do you
think?  Am I totally off base with my concerns and/or assessment of the
package?  If so, please let me know.  I am open to being proven wrong here.
I've heard Struts is a great package ... its just the cost-benefit (time to
learn vs. gain in productivity) analysis doesn't seem to be pointing me in
that direction right now. :)

-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 12:36 PM
To: Tomcat Users List
Subject: RE: global.jsa


Why don't you look at a struts application?  They exist, and all
applications with Tomcat do this.

At 11:42 AM 9/3/2002 -0700, you wrote:
 Interesting.  I was aware of the application scope option which is cool ...
 but not exactly what I was looking for.  Running a servlet onStartup is an
 intriquing suggestion though.  I didn't know you could do thatI think
 that's what I'm looking for!  :)
 
 Cool...I'm going to read more about it.  Do you know the syntax of the top
 of your head for specifying an onStartup servlet in the web.xml file?
 
 Thanks for your help.
 
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 2:14 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 Why don't you just declare the object you want to use as having application
 scope? That way the first time you use it it will be initialized?
 
 Alternatively you can specify servlets that should be run on start-up in
the
 web.xml if you want some kind of java daemon running.
 
 Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:56 AM
   To: Tomcat Users List
   Subject: RE: global.jsa
  
  
   Thanks.
  
   No global.jsa, eeh?
  
   The web.xml is a good way to go if you have flat variables
   that you want
   placed into the application object ... but can you instantiate objects
   there?  Can you specify scope of those objects or will it presume
   application scope?
  
   THanks.
   Neal
  
  
   -Original Message-
   From: Barney Hamish [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 1:30 AM
   To: 'Tomcat Users List'
   Subject: RE: global.jsa
  
  
   You can use the WEB-INF/web.xml to similar effect or you can
   also declare
   objects to have application scope, then you have a global
   object that you
   can access anywhere.
   Hamish
  
-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:15 AM
To: Tomcat Users List
Subject: global.jsa
   
   
Is there such a thing as a global.jsa file in Tomcat?
   
I first saw this concept (an idea taken from ASP's
global.asa) implemented
in JRUN.
   
If there is a global.jsa, does anyone know of any docs on
this?  If not, is
there an alternative? The reason I would want to use this is
to instantiate,
populate, and cache a few objects upon startup of the
   application.  If
Tomcat does not provide a global.jsa...does anyone know how
otherwise

RE: global.jsa - Struts

2002-09-04 Thread micael

I guess what I am saying is that if you don't know how to initialize a 
servlet with web.xml you are totally incapable of this point at assessing 
the value of struts or any other similar application, and I am suggesting 
struts ONLY so that you can look at it as an employment and example of the 
things you keep asking about.  The idea was to give you information, not a 
design choice.  Hope it helped.

At 08:10 AM 9/4/2002 -0700, you wrote:
Micael,

You've mentioned Struts a couple of times and I admit I am curious.

I did look into Struts but to be honost I wasn't all that impressed by what
(I think) I saw. It seemed like it was just offering a lot of lightweight
wrappers around the API.  Case in point, the Cookie utility class didn't
appear to offer any additional functionality over the http.cookie class in
the JDK. It's connection pooling was even pretty rudamentary so I went
around that.  I presume that its XML/XSL, and other such things would also
be rundamentary probably too. And actually, did I say a lot?  I looked at
the API and I didnt think there was a lot there...

All those things I'm saying wouldn't be bad per se, except that I don't want
to learn a whole new API to do basically what Java already does with it's
own standard API (again back to the wrapper thing).

Granted the MVC pattern implementation is apparentlly very good but I'm not
seeing that as a huge stumbling block to write on my own. They also appear
to provide custom tags wrappers around their API so that you can keep your
code totally declarative (code based) at the JSP level. Ok, that would be
cool ... but again I just don't want to be realying on a non-standard API
still for standard functionality.  I'll end up forgetting the JDK API in
lieu of Struts API.  :(

S, this is my initial impression of Struts.  I dont know ... what do you
think?  Am I totally off base with my concerns and/or assessment of the
package?  If so, please let me know.  I am open to being proven wrong here.
I've heard Struts is a great package ... its just the cost-benefit (time to
learn vs. gain in productivity) analysis doesn't seem to be pointing me in
that direction right now. :)

-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 12:36 PM
To: Tomcat Users List
Subject: RE: global.jsa


Why don't you look at a struts application?  They exist, and all
applications with Tomcat do this.

At 11:42 AM 9/3/2002 -0700, you wrote:
 Interesting.  I was aware of the application scope option which is cool ...
 but not exactly what I was looking for.  Running a servlet onStartup is an
 intriquing suggestion though.  I didn't know you could do thatI think
 that's what I'm looking for!  :)
 
 Cool...I'm going to read more about it.  Do you know the syntax of the top
 of your head for specifying an onStartup servlet in the web.xml file?
 
 Thanks for your help.
 
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 2:14 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 Why don't you just declare the object you want to use as having application
 scope? That way the first time you use it it will be initialized?
 
 Alternatively you can specify servlets that should be run on start-up in
the
 web.xml if you want some kind of java daemon running.
 
 Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:56 AM
   To: Tomcat Users List
   Subject: RE: global.jsa
  
  
   Thanks.
  
   No global.jsa, eeh?
  
   The web.xml is a good way to go if you have flat variables
   that you want
   placed into the application object ... but can you instantiate objects
   there?  Can you specify scope of those objects or will it presume
   application scope?
  
   THanks.
   Neal
  
  
   -Original Message-
   From: Barney Hamish [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 1:30 AM
   To: 'Tomcat Users List'
   Subject: RE: global.jsa
  
  
   You can use the WEB-INF/web.xml to similar effect or you can
   also declare
   objects to have application scope, then you have a global
   object that you
   can access anywhere.
   Hamish
  
-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:15 AM
To: Tomcat Users List
Subject: global.jsa
   
   
Is there such a thing as a global.jsa file in Tomcat?
   
I first saw this concept (an idea taken from ASP's
global.asa) implemented
in JRUN.
   
If there is a global.jsa, does anyone know of any docs on
this?  If not, is
there an alternative? The reason I would want to use this is
to instantiate,
populate, and cache a few objects upon startup of the
   application.  If
Tomcat does not provide a global.jsa...does anyone know how
otherwise to
achieve the goal?
   
Thanks.
Neal

RE: global.jsa - Struts

2002-09-04 Thread Felipe Schnack

  My opinion about development: you really should use only tags in JSP,
and never write java code in a jsp file. You should always separate
design from implementation.
  About Struts: yeah, we need lots of taglibs to avoid writing Java code
in JSP. So, taglibs for standard APIs are welcome. But Struts goes too
far, with taglibs to generate form tags, etc. These things (html forms)
normally are generated by dreamweaver users, so i don't like strut's
approach. And there are lots of talibs avaliable on the net, including
jakarta site itself, so I don't need Struts.
  MVC-style programming is great. But I use my own implementation, much
more simple than Struts. I think that kind of API is a cannon to kill a
fly (as we speak here in Brazil) in most cases, if not all.

On Wed, 2002-09-04 at 12:10, neal wrote:
 Micael,
 
 You've mentioned Struts a couple of times and I admit I am curious.
 
 I did look into Struts but to be honost I wasn't all that impressed by what
 (I think) I saw. It seemed like it was just offering a lot of lightweight
 wrappers around the API.  Case in point, the Cookie utility class didn't
 appear to offer any additional functionality over the http.cookie class in
 the JDK. It's connection pooling was even pretty rudamentary so I went
 around that.  I presume that its XML/XSL, and other such things would also
 be rundamentary probably too. And actually, did I say a lot?  I looked at
 the API and I didnt think there was a lot there...
 
 All those things I'm saying wouldn't be bad per se, except that I don't want
 to learn a whole new API to do basically what Java already does with it's
 own standard API (again back to the wrapper thing).
 
 Granted the MVC pattern implementation is apparentlly very good but I'm not
 seeing that as a huge stumbling block to write on my own. They also appear
 to provide custom tags wrappers around their API so that you can keep your
 code totally declarative (code based) at the JSP level. Ok, that would be
 cool ... but again I just don't want to be realying on a non-standard API
 still for standard functionality.  I'll end up forgetting the JDK API in
 lieu of Struts API.  :(
 
 S, this is my initial impression of Struts.  I dont know ... what do you
 think?  Am I totally off base with my concerns and/or assessment of the
 package?  If so, please let me know.  I am open to being proven wrong here.
 I've heard Struts is a great package ... its just the cost-benefit (time to
 learn vs. gain in productivity) analysis doesn't seem to be pointing me in
 that direction right now. :)
 
 -Original Message-
 From: micael [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 12:36 PM
 To: Tomcat Users List
 Subject: RE: global.jsa
 
 
 Why don't you look at a struts application?  They exist, and all
 applications with Tomcat do this.
 
 At 11:42 AM 9/3/2002 -0700, you wrote:
 Interesting.  I was aware of the application scope option which is cool ...
 but not exactly what I was looking for.  Running a servlet onStartup is an
 intriquing suggestion though.  I didn't know you could do thatI think
 that's what I'm looking for!  :)
 
 Cool...I'm going to read more about it.  Do you know the syntax of the top
 of your head for specifying an onStartup servlet in the web.xml file?
 
 Thanks for your help.
 
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 2:14 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 Why don't you just declare the object you want to use as having application
 scope? That way the first time you use it it will be initialized?
 
 Alternatively you can specify servlets that should be run on start-up in
 the
 web.xml if you want some kind of java daemon running.
 
 Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:56 AM
   To: Tomcat Users List
   Subject: RE: global.jsa
  
  
   Thanks.
  
   No global.jsa, eeh?
  
   The web.xml is a good way to go if you have flat variables
   that you want
   placed into the application object ... but can you instantiate objects
   there?  Can you specify scope of those objects or will it presume
   application scope?
  
   THanks.
   Neal
  
  
   -Original Message-
   From: Barney Hamish [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 1:30 AM
   To: 'Tomcat Users List'
   Subject: RE: global.jsa
  
  
   You can use the WEB-INF/web.xml to similar effect or you can
   also declare
   objects to have application scope, then you have a global
   object that you
   can access anywhere.
   Hamish
  
-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:15 AM
To: Tomcat Users List
Subject: global.jsa
   
   
Is there such a thing as a global.jsa file in Tomcat?
   
I first saw this concept (an idea taken from ASP's
global.asa) implemented

RE: global.jsa - Struts

2002-09-04 Thread neal

Good to know.  Thanks for your thoughts on Struts.  Yeah, I'll check out
those taglibs in the Jakarta lirary taglibs.  I already found some great
functionality in their commons library.  :)

Yeah, for MVC implementation I was simply talking about a servelt that takes
an action parameter to determine which JSP to show and which class to use
to process any data coming from that JSP...and maybe this data is mapped
into an XML or props file.  This is pretty much what you're doing too?

Neal


-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 8:21 AM
To: Tomcat Users List
Subject: RE: global.jsa - Struts


  My opinion about development: you really should use only tags in JSP,
and never write java code in a jsp file. You should always separate
design from implementation.
  About Struts: yeah, we need lots of taglibs to avoid writing Java code
in JSP. So, taglibs for standard APIs are welcome. But Struts goes too
far, with taglibs to generate form tags, etc. These things (html forms)
normally are generated by dreamweaver users, so i don't like strut's
approach. And there are lots of talibs avaliable on the net, including
jakarta site itself, so I don't need Struts.
  MVC-style programming is great. But I use my own implementation, much
more simple than Struts. I think that kind of API is a cannon to kill a
fly (as we speak here in Brazil) in most cases, if not all.

On Wed, 2002-09-04 at 12:10, neal wrote:
 Micael,

 You've mentioned Struts a couple of times and I admit I am curious.

 I did look into Struts but to be honost I wasn't all that impressed by
what
 (I think) I saw. It seemed like it was just offering a lot of lightweight
 wrappers around the API.  Case in point, the Cookie utility class didn't
 appear to offer any additional functionality over the http.cookie class in
 the JDK. It's connection pooling was even pretty rudamentary so I went
 around that.  I presume that its XML/XSL, and other such things would also
 be rundamentary probably too. And actually, did I say a lot?  I looked at
 the API and I didnt think there was a lot there...

 All those things I'm saying wouldn't be bad per se, except that I don't
want
 to learn a whole new API to do basically what Java already does with it's
 own standard API (again back to the wrapper thing).

 Granted the MVC pattern implementation is apparentlly very good but I'm
not
 seeing that as a huge stumbling block to write on my own. They also appear
 to provide custom tags wrappers around their API so that you can keep your
 code totally declarative (code based) at the JSP level. Ok, that would be
 cool ... but again I just don't want to be realying on a non-standard API
 still for standard functionality.  I'll end up forgetting the JDK API in
 lieu of Struts API.  :(

 S, this is my initial impression of Struts.  I dont know ... what do
you
 think?  Am I totally off base with my concerns and/or assessment of the
 package?  If so, please let me know.  I am open to being proven wrong
here.
 I've heard Struts is a great package ... its just the cost-benefit (time
to
 learn vs. gain in productivity) analysis doesn't seem to be pointing me in
 that direction right now. :)

 -Original Message-
 From: micael [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 12:36 PM
 To: Tomcat Users List
 Subject: RE: global.jsa


 Why don't you look at a struts application?  They exist, and all
 applications with Tomcat do this.

 At 11:42 AM 9/3/2002 -0700, you wrote:
 Interesting.  I was aware of the application scope option which is cool
...
 but not exactly what I was looking for.  Running a servlet onStartup is
an
 intriquing suggestion though.  I didn't know you could do thatI think
 that's what I'm looking for!  :)
 
 Cool...I'm going to read more about it.  Do you know the syntax of the
top
 of your head for specifying an onStartup servlet in the web.xml file?
 
 Thanks for your help.
 
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 2:14 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 Why don't you just declare the object you want to use as having
application
 scope? That way the first time you use it it will be initialized?
 
 Alternatively you can specify servlets that should be run on start-up in
 the
 web.xml if you want some kind of java daemon running.
 
 Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:56 AM
   To: Tomcat Users List
   Subject: RE: global.jsa
  
  
   Thanks.
  
   No global.jsa, eeh?
  
   The web.xml is a good way to go if you have flat variables
   that you want
   placed into the application object ... but can you instantiate objects
   there?  Can you specify scope of those objects or will it presume
   application scope?
  
   THanks.
   Neal
  
  
   -Original Message-
   From: Barney

RE: global.jsa - Struts

2002-09-04 Thread jeff . guttadauro


If you're looking for a very basic MVC implementation, you can use a small
part of what Struts offers and be able to save the time you would spend
writing your own.  You do pretty much exactly what you wrote in your second
paragraph.  Set up your struts-config.xml file to define your actions and
valid paths that could result from the action (which JSP to show) and
implement the defined action classes to process the data coming from your JSP.
No need to bother with action forms or taglibs at the moment if you do in fact
have a fly in your cannon's crosshairs.  That's about it - voila, an MVC
implementation with very little pain.  Obviously, there are tons more features
available in Struts which you can explore and use as you see fit.  I'm still
in the exploring phase myself.

-Jeff



   

neal 

nealcabage@yTo: Tomcat Users List 
[EMAIL PROTECTED]  
ahoo.comcc:   

 Subject: RE: global.jsa - Struts 

09/04/02   

11:00 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





Good to know.  Thanks for your thoughts on Struts.  Yeah, I'll check out
those taglibs in the Jakarta lirary taglibs.  I already found some great
functionality in their commons library.  :)

Yeah, for MVC implementation I was simply talking about a servelt that takes
an action parameter to determine which JSP to show and which class to use
to process any data coming from that JSP...and maybe this data is mapped
into an XML or props file.  This is pretty much what you're doing too?

Neal


-Original Message-
From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 8:21 AM
To: Tomcat Users List
Subject: RE: global.jsa - Struts


  My opinion about development: you really should use only tags in JSP,
and never write java code in a jsp file. You should always separate
design from implementation.
  About Struts: yeah, we need lots of taglibs to avoid writing Java code
in JSP. So, taglibs for standard APIs are welcome. But Struts goes too
far, with taglibs to generate form tags, etc. These things (html forms)
normally are generated by dreamweaver users, so i don't like strut's
approach. And there are lots of talibs avaliable on the net, including
jakarta site itself, so I don't need Struts.
  MVC-style programming is great. But I use my own implementation, much
more simple than Struts. I think that kind of API is a cannon to kill a
fly (as we speak here in Brazil) in most cases, if not all.

On Wed, 2002-09-04 at 12:10, neal wrote:
 Micael,

 You've mentioned Struts a couple of times and I admit I am curious.

 I did look into Struts but to be honost I wasn't all that impressed by
what
 (I think) I saw. It seemed like it was just offering a lot of lightweight
 wrappers around the API.  Case in point, the Cookie utility class didn't
 appear to offer any additional functionality over the http.cookie class in
 the JDK. It's connection pooling was even pretty rudamentary so I went
 around that.  I presume that its XML/XSL, and other such things would also
 be rundamentary probably too. And actually, did I say a lot?  I looked at
 the API and I didnt think there was a lot there...

 All those things I'm saying wouldn't be bad per se, except that I don't
want
 to learn a whole new API to do basically what Java already does with it's
 own standard API (again back to the wrapper thing).

 Granted the MVC pattern implementation is apparentlly very good but I'm
not
 seeing that as a huge stumbling block to write on my own. They also appear
 to provide custom tags wrappers around their API so that you can keep your
 code totally declarative (code based) at the JSP level. Ok, that would be
 cool ... but again I just don't want

Re: global.jsa - Struts

2002-09-04 Thread Eddie Bush

Struts is *the* de-facto standard MVC framework.  The problem is that 
there is a slight bit of initial learning curve, and it's hard to see 
the benefit until *after* you've used it (my opinion).  You really 
should give it a go -- it's tons better than having to implement 
something analagous yourself.  If you're new to Struts, I recommend you 
go over to http://www.theserverside.com and search for struts book 
review.  That should turn-up Chuck Cavaness' new book chapters (which 
is available to be ordered now, btw; no, I don't get paid to say that - 
it's a good introduction - very good).  If you want a really good Struts 
course, read that book.

... don't judge what you haven't used :-)  Struts is Good Stuff (tm).

Regards,

Eddie

neal wrote:

Good to know.  Thanks for your thoughts on Struts.  Yeah, I'll check out
those taglibs in the Jakarta lirary taglibs.  I already found some great
functionality in their commons library.  :)

Yeah, for MVC implementation I was simply talking about a servelt that takes
an action parameter to determine which JSP to show and which class to use
to process any data coming from that JSP...and maybe this data is mapped
into an XML or props file.  This is pretty much what you're doing too?

Neal




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa - Struts

2002-09-04 Thread Felipe Schnack

  Yes, actually I just pass to a servlet the name of the action and
any extra parameters the specific action handler needs.

On Wed, 2002-09-04 at 13:00, neal wrote:
 Good to know.  Thanks for your thoughts on Struts.  Yeah, I'll check out
 those taglibs in the Jakarta lirary taglibs.  I already found some great
 functionality in their commons library.  :)
 
 Yeah, for MVC implementation I was simply talking about a servelt that takes
 an action parameter to determine which JSP to show and which class to use
 to process any data coming from that JSP...and maybe this data is mapped
 into an XML or props file.  This is pretty much what you're doing too?
 
 Neal
 
 
 -Original Message-
 From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 04, 2002 8:21 AM
 To: Tomcat Users List
 Subject: RE: global.jsa - Struts
 
 
   My opinion about development: you really should use only tags in JSP,
 and never write java code in a jsp file. You should always separate
 design from implementation.
   About Struts: yeah, we need lots of taglibs to avoid writing Java code
 in JSP. So, taglibs for standard APIs are welcome. But Struts goes too
 far, with taglibs to generate form tags, etc. These things (html forms)
 normally are generated by dreamweaver users, so i don't like strut's
 approach. And there are lots of talibs avaliable on the net, including
 jakarta site itself, so I don't need Struts.
   MVC-style programming is great. But I use my own implementation, much
 more simple than Struts. I think that kind of API is a cannon to kill a
 fly (as we speak here in Brazil) in most cases, if not all.
 
 On Wed, 2002-09-04 at 12:10, neal wrote:
  Micael,
 
  You've mentioned Struts a couple of times and I admit I am curious.
 
  I did look into Struts but to be honost I wasn't all that impressed by
 what
  (I think) I saw. It seemed like it was just offering a lot of lightweight
  wrappers around the API.  Case in point, the Cookie utility class didn't
  appear to offer any additional functionality over the http.cookie class in
  the JDK. It's connection pooling was even pretty rudamentary so I went
  around that.  I presume that its XML/XSL, and other such things would also
  be rundamentary probably too. And actually, did I say a lot?  I looked at
  the API and I didnt think there was a lot there...
 
  All those things I'm saying wouldn't be bad per se, except that I don't
 want
  to learn a whole new API to do basically what Java already does with it's
  own standard API (again back to the wrapper thing).
 
  Granted the MVC pattern implementation is apparentlly very good but I'm
 not
  seeing that as a huge stumbling block to write on my own. They also appear
  to provide custom tags wrappers around their API so that you can keep your
  code totally declarative (code based) at the JSP level. Ok, that would be
  cool ... but again I just don't want to be realying on a non-standard API
  still for standard functionality.  I'll end up forgetting the JDK API in
  lieu of Struts API.  :(
 
  S, this is my initial impression of Struts.  I dont know ... what do
 you
  think?  Am I totally off base with my concerns and/or assessment of the
  package?  If so, please let me know.  I am open to being proven wrong
 here.
  I've heard Struts is a great package ... its just the cost-benefit (time
 to
  learn vs. gain in productivity) analysis doesn't seem to be pointing me in
  that direction right now. :)
 
  -Original Message-
  From: micael [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 12:36 PM
  To: Tomcat Users List
  Subject: RE: global.jsa
 
 
  Why don't you look at a struts application?  They exist, and all
  applications with Tomcat do this.
 
  At 11:42 AM 9/3/2002 -0700, you wrote:
  Interesting.  I was aware of the application scope option which is cool
 ...
  but not exactly what I was looking for.  Running a servlet onStartup is
 an
  intriquing suggestion though.  I didn't know you could do thatI think
  that's what I'm looking for!  :)
  
  Cool...I'm going to read more about it.  Do you know the syntax of the
 top
  of your head for specifying an onStartup servlet in the web.xml file?
  
  Thanks for your help.
  
  Neal
  
  
  -Original Message-
  From: Barney Hamish [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 2:14 AM
  To: 'Tomcat Users List'
  Subject: RE: global.jsa
  
  
  Why don't you just declare the object you want to use as having
 application
  scope? That way the first time you use it it will be initialized?
  
  Alternatively you can specify servlets that should be run on start-up in
  the
  web.xml if you want some kind of java daemon running.
  
  Hamish
  
-Original Message-
From: neal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:56 AM
To: Tomcat Users List
Subject: RE: global.jsa
   
   
Thanks.
   
No global.jsa, eeh?
   
The web.xml is a good way

Re: global.jsa - Struts

2002-09-04 Thread Eddie Bush

neal wrote:

Micael,

You've mentioned Struts a couple of times and I admit I am curious.

I did look into Struts but to be honost I wasn't all that impressed by what
(I think) I saw. It seemed like it was just offering a lot of lightweight
wrappers around the API.  Case in point, the Cookie utility class didn't
appear to offer any additional functionality over the http.cookie class in
the JDK. It's connection pooling was even pretty rudamentary so I went
around that.  I presume that its XML/XSL, and other such things would also
be rundamentary probably too. And actually, did I say a lot?  I looked at
the API and I didnt think there was a lot there...

All those things I'm saying wouldn't be bad per se, except that I don't want
to learn a whole new API to do basically what Java already does with it's
own standard API (again back to the wrapper thing).

Granted the MVC pattern implementation is apparentlly very good but I'm not
seeing that as a huge stumbling block to write on my own. They also appear
to provide custom tags wrappers around their API so that you can keep your
code totally declarative (code based) at the JSP level. Ok, that would be
cool ... but again I just don't want to be realying on a non-standard API
still for standard functionality.  I'll end up forgetting the JDK API in
lieu of Struts API.  :(

One point to note:  The JSTL (you can find the RI under the taglibs 
project) - aka the Java Standard Tag Library - can be used in lieu of 
some Struts tags.  If you're worried about forgetting standards, use 
this one.  It's *the* standard, and should be what people adopt in their 
JSP pages (where possible).

(also, Struts doesn't hide the Java API - you work with the same 
request/response you would otherwise.  There are just additional pieces 
around to make your life easier.)

Regards,

Eddie



S, this is my initial impression of Struts.  I dont know ... what do you
think?  Am I totally off base with my concerns and/or assessment of the
package?  If so, please let me know.  I am open to being proven wrong here.
I've heard Struts is a great package ... its just the cost-benefit (time to
learn vs. gain in productivity) analysis doesn't seem to be pointing me in
that direction right now. :)




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-04 Thread neal

Actually, I just checked p 43 ... its talking about the init() and detroy
methods() of a servlet.  You sure that was 2nd edition?  :)

Neal


-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 12:23 PM
To: Tomcat Users List
Subject: RE: global.jsa


Try Jason Hunter's book on servlets, Java Servlet Programming, pp. 43 ff.


At 01:56 AM 9/3/2002 -0700, you wrote:
Thanks.

No global.jsa, eeh?

The web.xml is a good way to go if you have flat variables that you want
placed into the application object ... but can you instantiate objects
there?  Can you specify scope of those objects or will it presume
application scope?

THanks.
Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 1:30 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


You can use the WEB-INF/web.xml to similar effect or you can also declare
objects to have application scope, then you have a global object that you
can access anywhere.
Hamish

  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:15 AM
  To: Tomcat Users List
  Subject: global.jsa
 
 
  Is there such a thing as a global.jsa file in Tomcat?
 
  I first saw this concept (an idea taken from ASP's
  global.asa) implemented
  in JRUN.
 
  If there is a global.jsa, does anyone know of any docs on
  this?  If not, is
  there an alternative? The reason I would want to use this is
  to instantiate,
  populate, and cache a few objects upon startup of the application.  If
  Tomcat does not provide a global.jsa...does anyone know how
  otherwise to
  achieve the goal?
 
  Thanks.
  Neal
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




global.jsa

2002-09-03 Thread neal

Is there such a thing as a global.jsa file in Tomcat?

I first saw this concept (an idea taken from ASP's global.asa) implemented
in JRUN.

If there is a global.jsa, does anyone know of any docs on this?  If not, is
there an alternative? The reason I would want to use this is to instantiate,
populate, and cache a few objects upon startup of the application.  If
Tomcat does not provide a global.jsa...does anyone know how otherwise to
achieve the goal?

Thanks.
Neal


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread Barney Hamish

You can use the WEB-INF/web.xml to similar effect or you can also declare
objects to have application scope, then you have a global object that you
can access anywhere.
Hamish

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:15 AM
 To: Tomcat Users List
 Subject: global.jsa
 
 
 Is there such a thing as a global.jsa file in Tomcat?
 
 I first saw this concept (an idea taken from ASP's 
 global.asa) implemented
 in JRUN.
 
 If there is a global.jsa, does anyone know of any docs on 
 this?  If not, is
 there an alternative? The reason I would want to use this is 
 to instantiate,
 populate, and cache a few objects upon startup of the application.  If
 Tomcat does not provide a global.jsa...does anyone know how 
 otherwise to
 achieve the goal?
 
 Thanks.
 Neal
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread neal

Thanks.

No global.jsa, eeh?

The web.xml is a good way to go if you have flat variables that you want
placed into the application object ... but can you instantiate objects
there?  Can you specify scope of those objects or will it presume
application scope?

THanks.
Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 1:30 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


You can use the WEB-INF/web.xml to similar effect or you can also declare
objects to have application scope, then you have a global object that you
can access anywhere.
Hamish

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:15 AM
 To: Tomcat Users List
 Subject: global.jsa


 Is there such a thing as a global.jsa file in Tomcat?

 I first saw this concept (an idea taken from ASP's
 global.asa) implemented
 in JRUN.

 If there is a global.jsa, does anyone know of any docs on
 this?  If not, is
 there an alternative? The reason I would want to use this is
 to instantiate,
 populate, and cache a few objects upon startup of the application.  If
 Tomcat does not provide a global.jsa...does anyone know how
 otherwise to
 achieve the goal?

 Thanks.
 Neal


 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread Barney Hamish

Why don't you just declare the object you want to use as having application
scope? That way the first time you use it it will be initialized?

Alternatively you can specify servlets that should be run on start-up in the
web.xml if you want some kind of java daemon running.

Hamish

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:56 AM
 To: Tomcat Users List
 Subject: RE: global.jsa
 
 
 Thanks.
 
 No global.jsa, eeh?
 
 The web.xml is a good way to go if you have flat variables 
 that you want
 placed into the application object ... but can you instantiate objects
 there?  Can you specify scope of those objects or will it presume
 application scope?
 
 THanks.
 Neal
 
 
 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 1:30 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa
 
 
 You can use the WEB-INF/web.xml to similar effect or you can 
 also declare
 objects to have application scope, then you have a global 
 object that you
 can access anywhere.
 Hamish
 
  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:15 AM
  To: Tomcat Users List
  Subject: global.jsa
 
 
  Is there such a thing as a global.jsa file in Tomcat?
 
  I first saw this concept (an idea taken from ASP's
  global.asa) implemented
  in JRUN.
 
  If there is a global.jsa, does anyone know of any docs on
  this?  If not, is
  there an alternative? The reason I would want to use this is
  to instantiate,
  populate, and cache a few objects upon startup of the 
 application.  If
  Tomcat does not provide a global.jsa...does anyone know how
  otherwise to
  achieve the goal?
 
  Thanks.
  Neal
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread neal

Interesting.  I was aware of the application scope option which is cool ...
but not exactly what I was looking for.  Running a servlet onStartup is an
intriquing suggestion though.  I didn't know you could do thatI think
that's what I'm looking for!  :)

Cool...I'm going to read more about it.  Do you know the syntax of the top
of your head for specifying an onStartup servlet in the web.xml file?

Thanks for your help.

Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 2:14 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


Why don't you just declare the object you want to use as having application
scope? That way the first time you use it it will be initialized?

Alternatively you can specify servlets that should be run on start-up in the
web.xml if you want some kind of java daemon running.

Hamish

 -Original Message-
 From: neal [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 10:56 AM
 To: Tomcat Users List
 Subject: RE: global.jsa


 Thanks.

 No global.jsa, eeh?

 The web.xml is a good way to go if you have flat variables
 that you want
 placed into the application object ... but can you instantiate objects
 there?  Can you specify scope of those objects or will it presume
 application scope?

 THanks.
 Neal


 -Original Message-
 From: Barney Hamish [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 03, 2002 1:30 AM
 To: 'Tomcat Users List'
 Subject: RE: global.jsa


 You can use the WEB-INF/web.xml to similar effect or you can
 also declare
 objects to have application scope, then you have a global
 object that you
 can access anywhere.
 Hamish

  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:15 AM
  To: Tomcat Users List
  Subject: global.jsa
 
 
  Is there such a thing as a global.jsa file in Tomcat?
 
  I first saw this concept (an idea taken from ASP's
  global.asa) implemented
  in JRUN.
 
  If there is a global.jsa, does anyone know of any docs on
  this?  If not, is
  there an alternative? The reason I would want to use this is
  to instantiate,
  populate, and cache a few objects upon startup of the
 application.  If
  Tomcat does not provide a global.jsa...does anyone know how
  otherwise to
  achieve the goal?
 
  Thanks.
  Neal
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]


 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread micael

Try Jason Hunter's book on servlets, Java Servlet Programming, pp. 43 ff.


At 01:56 AM 9/3/2002 -0700, you wrote:
Thanks.

No global.jsa, eeh?

The web.xml is a good way to go if you have flat variables that you want
placed into the application object ... but can you instantiate objects
there?  Can you specify scope of those objects or will it presume
application scope?

THanks.
Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 1:30 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


You can use the WEB-INF/web.xml to similar effect or you can also declare
objects to have application scope, then you have a global object that you
can access anywhere.
Hamish

  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:15 AM
  To: Tomcat Users List
  Subject: global.jsa
 
 
  Is there such a thing as a global.jsa file in Tomcat?
 
  I first saw this concept (an idea taken from ASP's
  global.asa) implemented
  in JRUN.
 
  If there is a global.jsa, does anyone know of any docs on
  this?  If not, is
  there an alternative? The reason I would want to use this is
  to instantiate,
  populate, and cache a few objects upon startup of the application.  If
  Tomcat does not provide a global.jsa...does anyone know how
  otherwise to
  achieve the goal?
 
  Thanks.
  Neal
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: global.jsa

2002-09-03 Thread micael

Why don't you look at a struts application?  They exist, and all 
applications with Tomcat do this.

At 11:42 AM 9/3/2002 -0700, you wrote:
Interesting.  I was aware of the application scope option which is cool ...
but not exactly what I was looking for.  Running a servlet onStartup is an
intriquing suggestion though.  I didn't know you could do thatI think
that's what I'm looking for!  :)

Cool...I'm going to read more about it.  Do you know the syntax of the top
of your head for specifying an onStartup servlet in the web.xml file?

Thanks for your help.

Neal


-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 2:14 AM
To: 'Tomcat Users List'
Subject: RE: global.jsa


Why don't you just declare the object you want to use as having application
scope? That way the first time you use it it will be initialized?

Alternatively you can specify servlets that should be run on start-up in the
web.xml if you want some kind of java daemon running.

Hamish

  -Original Message-
  From: neal [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 10:56 AM
  To: Tomcat Users List
  Subject: RE: global.jsa
 
 
  Thanks.
 
  No global.jsa, eeh?
 
  The web.xml is a good way to go if you have flat variables
  that you want
  placed into the application object ... but can you instantiate objects
  there?  Can you specify scope of those objects or will it presume
  application scope?
 
  THanks.
  Neal
 
 
  -Original Message-
  From: Barney Hamish [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 03, 2002 1:30 AM
  To: 'Tomcat Users List'
  Subject: RE: global.jsa
 
 
  You can use the WEB-INF/web.xml to similar effect or you can
  also declare
  objects to have application scope, then you have a global
  object that you
  can access anywhere.
  Hamish
 
   -Original Message-
   From: neal [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 03, 2002 10:15 AM
   To: Tomcat Users List
   Subject: global.jsa
  
  
   Is there such a thing as a global.jsa file in Tomcat?
  
   I first saw this concept (an idea taken from ASP's
   global.asa) implemented
   in JRUN.
  
   If there is a global.jsa, does anyone know of any docs on
   this?  If not, is
   there an alternative? The reason I would want to use this is
   to instantiate,
   populate, and cache a few objects upon startup of the
  application.  If
   Tomcat does not provide a global.jsa...does anyone know how
   otherwise to
   achieve the goal?
  
   Thanks.
   Neal
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Global.jsa

2001-01-24 Thread Peter Giannopoulos

Can anyone tell me where I should put me global.jsa for a particular web-app
for tomact 3-2.1 ?

Cheers,


--
 Peter Giannopoulos,Software Developer
 Gemplus Software,  Advanced Projects Group

 Phone: +15147322434
 Fax:   +15147322401
 Gemplus Card International, Http://www.gemplus.fr
---


BEGIN:VCARD
VERSION:2.1
N:Giannopoulos;Peter
FN:Peter Giannopoulos
ORG:Gemplus Canada inc.;CTO Group
TITLE:Software Developer
NOTE;ENCODING=QUOTED-PRINTABLE:=0D=0A--- Codito, ergo sum - "I code, therefore I am" ---
TEL;WORK;VOICE:514-732-2434
TEL;HOME;VOICE:N/A
TEL;CELL;VOICE:N/A
TEL;PAGER;VOICE:N/A
TEL;WORK;FAX:514-732-2301
ADR;POSTAL:;;3 Place du Commerce;Ile des soeurs;Quebec;H3E 1H7;Canada
LABEL;POSTAL;ENCODING=QUOTED-PRINTABLE:3 Place du Commerce=0D=0AIle des soeurs, Quebec H3E 1H7=0D=0ACanada
URL:http://www.gemplus.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:2926T190330Z
END:VCARD



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


RE: Global.jsa

2001-01-24 Thread Ignacio J. Ortega

There is no Global.jsa in the spec , this is an Oracle extension to
spec, IMHO Servlet 2.3 spec adresses some the remaining issues as
application evens, all the other things in Global.jsa are easily
replicable using the standard, things Session events and global objects
..

References:
http://localhost:8080/docs/api/javax/servlet/http/HttpSessionBindingList
ener.html ( this in your standard docs inside Tomcat )
http://java.sun.com/products/servlet/download.html#specs

Hope that helps.

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Peter Giannopoulos [mailto:[EMAIL PROTECTED]]
 Enviado el: mircoles 24 de enero de 2001 16:59
 Para: 'Tomcat-User
 Asunto: Global.jsa
 
 
 Can anyone tell me where I should put me global.jsa for a 
 particular web-app
 for tomact 3-2.1 ?
 
 Cheers,
 
 
 --
  Peter Giannopoulos,Software Developer
  Gemplus Software,  Advanced Projects Group
 
  Phone: +15147322434
  Fax:   +15147322401
  Gemplus Card International, Http://www.gemplus.fr
 ---
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Global.jsa

2001-01-24 Thread Peter Giannopoulos


Thanks.



--
 Peter Giannopoulos,Software Developer
 Gemplus Software,  Advanced Projects Group

 Phone: +15147322434
 Fax:   +15147322401
 Gemplus Card International, Http://www.gemplus.fr
---

-Original Message-
From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]]
Sent: January 24, 2001 11:09 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Global.jsa


There is no Global.jsa in the spec , this is an Oracle extension to
spec, IMHO Servlet 2.3 spec adresses some the remaining issues as
application evens, all the other things in Global.jsa are easily
replicable using the standard, things Session events and global objects
..

References:
http://localhost:8080/docs/api/javax/servlet/http/HttpSessionBindingList
ener.html ( this in your standard docs inside Tomcat )
http://java.sun.com/products/servlet/download.html#specs

Hope that helps.

Saludos ,
Ignacio J. Ortega


 -Mensaje original-
 De: Peter Giannopoulos [mailto:[EMAIL PROTECTED]]
 Enviado el: mircoles 24 de enero de 2001 16:59
 Para: 'Tomcat-User
 Asunto: Global.jsa


 Can anyone tell me where I should put me global.jsa for a
 particular web-app
 for tomact 3-2.1 ?

 Cheers,


 --
  Peter Giannopoulos,Software Developer
  Gemplus Software,  Advanced Projects Group

  Phone: +15147322434
  Fax:   +15147322401
  Gemplus Card International, Http://www.gemplus.fr
 ---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


BEGIN:VCARD
VERSION:2.1
N:Giannopoulos;Peter
FN:Peter Giannopoulos
ORG:Gemplus Canada inc.;CTO Group
TITLE:Software Developer
NOTE;ENCODING=QUOTED-PRINTABLE:=0D=0A--- Codito, ergo sum - "I code, therefore I am" ---
TEL;WORK;VOICE:514-732-2434
TEL;HOME;VOICE:N/A
TEL;CELL;VOICE:N/A
TEL;PAGER;VOICE:N/A
TEL;WORK;FAX:514-732-2301
ADR;POSTAL:;;3 Place du Commerce;Ile des soeurs;Quebec;H3E 1H7;Canada
LABEL;POSTAL;ENCODING=QUOTED-PRINTABLE:3 Place du Commerce=0D=0AIle des soeurs, Quebec H3E 1H7=0D=0ACanada
URL:http://www.gemplus.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:2926T190330Z
END:VCARD



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]