f



get parameter values from web.xml inside of a bean

Is there a way for me to get parameter values from web.xml file inside
of a bean?
I have parameters like the following in my web.xml file:
<context-param>
  <param-name>userName</param-name>
  <param-value>xxxx</param-value>
</context-param>
<context-param>
  <param-name>password</param-name>
  <param-value>yyyy</param-value>
</context-param>

How do I get these values inside of a bean thats used in a JSP page. I
am using WAS 4.0.5 app server (its servlet 2.2 specs). I do not want
to use sessions.
0
ezaffar (14)
6/1/2004 7:01:35 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

1 Replies
332 Views

Similar Articles

[PageSpeed] 9

"Eqbal Z" <ezaffar@unisap.com> wrote in message
news:ae06bd68.0406011101.79eb538d@posting.google.com...
> Is there a way for me to get parameter values from web.xml file inside
> of a bean?
> I have parameters like the following in my web.xml file:
> <context-param>
>   <param-name>userName</param-name>
>   <param-value>xxxx</param-value>
> </context-param>
*snip*

Context parameters are accessed via a ServletContext. You have to have one
of those to get the parameters.


0
zzanNOtozz (928)
6/2/2004 11:06:16 PM
Reply: