• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic