Yeah, that changes things a bit. In this case, I'd think an
application-scope bean would be my choice, but your milage may vary.
Application-scoped beans take up relatively little memory, are persistent,
and allow you to set them however you'd like, so...


>From: "Gerry Scheetz" <[EMAIL PROTECTED]>

>It would be a great idea, but I forgot to mention these values are
>retrieved and stored on the database.
>
> >>> [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]>
> >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?

_________________________________________________________________
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

Reply via email to