Worked for me all my life.

E.g., in web.xml:

  <context-param>
    <param-name>open-port</param-name>
    <param-value>7180</param-value>
    <description>Port for regular HTTP via Apache</description>
  </context-param>
  <context-param>
    <param-name>secure-port</param-name>
    <param-value>7143</param-value>
    <description>Port for HTTPS via Apache</description>
  </context-param>

and in the jsp page:

<HTML>
<BODY>
parameters are:<BR>
open-port=<%= application.getInitParameter("open-port") %><BR>
secure-port=<%= application.getInitParameter("secure-port") %><BR>
</BODY>
</HTML>




On Tue, 6 Feb 2001, Rauschuber, Chris wrote:

> I just tried that, but no luck.  I still get no InitParameters.
> I tried using both the getInitParameterNames() and
> context.getInitParameterNames() in the JSP.  Is the first one just an
> implicit version of the second?
> 
> Chris
> 
> 
> > From: Brian Tol [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, February 06, 2001 9:52 AM
> > Have your tryed putting your params in the context?
> > 
> > ---------snip--------------
> > <web-app>
> > 
> >     <!-- MySQL host -->
> >     <context-param>
> >        <param-name>dbhost</param-name>
> >        <param-value>localhost</param-value>
> >     </context-param>
> > 
> >     <!-- MySQL database -->
> >     <context-param>
> >        <param-name>dbname</param-name>
> >        <param-value>blah</param-value>
> >     </context-param>
> > 
> >     <!-- more stuff here -->
> > </web-app>
> > --------/snip--------------
> > 
> > These are in the context (the overall application), instead of a
> > particular servlet. You can access them via the getInitParameter()
> > method of the context...
> > 
> > Hope that helps,
> > 
> > Brian
> > [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: [EMAIL PROTECTED] 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to