Arun Thomas wrote:

> Hans,
>
> Thanks for the mail.  My goal with this was to simply access application
> configuration
> data.  Right now, I've already done exactly what you suggest - load this
> information using
> a startup servlet, and use it from the application context.  Nevertheless,
> it seems to me
> that ideally values stored in the application context should have an
> application wide
> function, rather than a function in just one servlet/jsp.

They do.  Objects stored with application scope (i.e. servlet context attributes
from the servlet perspective) are visible to all servlets and JSP pages within your
web application.  The only issue is how to initialize them.


>  The servlet
> initialization
> parameters are quite useful in this way, allowing one to see the direct
> connection between
> changes to the servlet and its associated parameters - parameters that are
> not used elsewhere
> by other pages.  In the same way, I was hoping to initialize the JSP page.
>

There is nothing in the API at present that directly loads servlet context
attributes.  The "startup servlet" approach is convenient, but not the only way to
do it.  However, anything you store as a servlet context attribute here is
definitely visible to your JSP pages, as long as they are in the same web
application.

>
> -AMT
>

Craig

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to