Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Equivalent Global.asa of ASP's in Servlets/JSP's

 
Narendra Kamaraju
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I want to do jumpstart of some operations at the application start up time or new session start up time at global level of the application.I know this can be done by use of global.asa file in ASP's.How do I do this in servlets/JSP's.
Thanks in advance for the answers.
Cheers,
Narendra.
 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI, Narendra,
There are 4 methods in the ServletContext interface that might help:
getInitParameter()
getInitParameterNames()
setAttribute()
getAttribute().
<i>I'm quoting this from the docs as I've only been studying the specs for 3 days now so I've a long way to go.</i>
Now, exactly how to go about implementing the ServletContext interface ....
Hopefully, some wiser soul than me can help you out - I'll be watching this post to see any solutions for myself
Bye,

------------------
Terry Doyle
Sun Certified Programmer for Java 2 Platform
 
Joe Paolangeli
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be accomplished by using the init() method of a servlet. The init() method of a servlet can be automatically started during the server start up. For example in Tomcat you can automatically start up a servlet by including the "<load-on-startup>" tag in the web.xml file:

Hope this helps

[This message has been edited by Joe Paolangeli (edited October 18, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic