Ok, so web.xml may not be the best place for that :-).
If you can guarantee that one resource (jsp or servlet) will be accessed at least once 
before your first
request then you can
add the info to the ServletContext there.


Gerry Scheetz wrote:

> It would be a great idea, but I forgot to mention these values are retrieved and 
>stored on the database.
>
> Gerry Scheetz
> Web Application Development
> Global Information Technology Division
> TRW - S&ITG
> Helena, Montana, USA
> [EMAIL PROTECTED]
> (406) 594-1878
>
> >>> [EMAIL PROTECTED] Friday, May 04, 2001 9:00:23 AM >>>
> You could also set the application name in the web.xml, as environment
> variables for the web application (or, if you like, my new favorite word -
> "weblication.")
>
> Personally, that'd be the route I chose.
>
> >From: Gerry Scheetz <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> >     reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Application wide data globals
> >Date: Fri, 4 May 2001 10:33:48 -0400
> >
> >Hello group,
> >
> >I am coding a web application using the MVC design.  My controller is a
> >servlet.  My model are some JavaBeans and a couple Java classes to access
> >the database.  My view is JSP files.  I have a couple values that are
> >constant throughout the application like application title and length of
> >time before a password expires.  These values are accessed within JavaBeans
> >and within JSP files.  I can think of about 3 ways I can code this,
> >   1)  JavaBean put in the application scope (tough to retrieve in another
> >JavaBean)
> >   2)  Singleton class (trying to minimize code in JSP and this takes a
> >couple of lines)
> >   3)  class with all static variables and functions (just unfamiliar with
> >this, I guess)
> >
> >Anyway in this whole development effort, I am also setting up standards for
> >our team to code to in the future, so I want to do this right the first
> >time.  Advise on which of my options to pursue or is there a better option?
> >
> >Thanks,
> >
> >
> >Gerry Scheetz
> >Web Application Development
> >Global Information Technology Division
> >TRW - S&ITG
> >Helena, Montana, USA
> >[EMAIL PROTECTED]
> >(406) 594-1878
> >
> >===========================================================================
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> >DIGEST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

--
Erik I Morton
Software Developer
------------------
CommerceHub
http://www.commercehub.com
518-886-0704
21 Corporate Drive
Clifton Park, NY 12065

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to