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. 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.
-AMT
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Hans Bergsten
> Sent: Friday, December 17, 1999 8:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: FW: Initialization Parameters for JSPs
>
>
> Arun Thomas wrote:
> >
> > Hello all,
> >
> > I posted this earlier, but didn't receive a copy from the list. So I'm
> > posting again in the hopes of some suggestions.
> >
> > I'm trying to find out how to setup initialization parameters for a jsp.
> > The config implicit object exists, and is obviously meant to make it
> > possible to access these parameters from the JSP, but how do I identify
> > the values for these parameters in servelet.properties? I don't really
> > have a name to use for each particular jsp, as the actual servlet
> > used is generated dynamically.
>
> Yes, the config object is there, but I'm not so sure it should be ;-)
> Even though JSP pages are turned into servlets, I don't think it makes
> much sense to set init params for a page. Can you tell us what type of
> init params you have in mind?
>
> If you need to access application configuration data (i.e. info that
> applies to the application as opposed to a specific page), you can use
> servlet context (mapped to the "application" object) attributes.
>
> You can use a servlet that loads on startup to initialize the context
> attributes (for instance using its init params). In Servlet 2.2/JSP 1.1
> simple string based servlet context init params can also be defined in the
> web.xml file.
>
> --
> Hans Bergsten [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
>
> ==================================================================
> =========
> 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
>
===========================================================================
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