You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rick Roberts <te...@ait-web.com> on 2003/08/10 07:00:18 UTC

ServletContext.getInitParameter() for a Bean?

What is recomended technique for reading initialization parameters from a Bean?

-- 
*******************************************
* Rick Roberts                            *
* Advanced Information Technologies, Inc. *
* http://www.ait-web.com                  *
*******************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: ServletContext.getInitParameter() for a Bean?

Posted by Bill Barker <wb...@wilshire.com>.
I'm sure that other people will offer their favorites, but I'm going to
offer:
  <jsp:useBean id="foo" class="com.ait-web.MyBean">
      <jsp:setProperty name="foo" property="bar" value="<%=

application.getAttribute("foobar") %>" />
  </jsp:useBean>

"Rick Roberts" <te...@ait-web.com> wrote in message
news:3F35D162.8050904@ait-web.com...
>
> What is recomended technique for reading initialization parameters from a
Bean?
>
> -- 
> *******************************************
> * Rick Roberts                            *
> * Advanced Information Technologies, Inc. *
> * http://www.ait-web.com                  *
> *******************************************




Re: ServletContext.getInitParameter() for a Bean?

Posted by Bill Barker <wb...@wilshire.com>.
I'm sure that other people will offer their favorites, but I'm going to
offer:
  <jsp:useBean id="foo" class="com.ait-web.MyBean">
      <jsp:setProperty name="foo" property="bar" value="<%=

application.getAttribute("foobar") %>" />
  </jsp:useBean>

"Rick Roberts" <te...@ait-web.com> wrote in message
news:3F35D162.8050904@ait-web.com...
>
> What is recomended technique for reading initialization parameters from a
Bean?
>
> -- 
> *******************************************
> * Rick Roberts                            *
> * Advanced Information Technologies, Inc. *
> * http://www.ait-web.com                  *
> *******************************************




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: ServletContext.getInitParameter() for a Bean?

Posted by Ben Souther <bp...@adelphia.net>.
On Sunday 10 August 2003 01:00 am, you wrote:
> What is recomended technique for reading initialization parameters from a
> Bean?

I get the init params from web.xml in a servlet's init method and pass them 
to the beans setXxx methods.

I prefer to control all of the beans state/lifecycle... from the servlets.

Re: ServletContext.getInitParameter() for a Bean?

Posted by Ben Souther <bp...@adelphia.net>.
On Sunday 10 August 2003 01:00 am, you wrote:
> What is recomended technique for reading initialization parameters from a
> Bean?

I get the init params from web.xml in a servlet's init method and pass them 
to the beans setXxx methods.

I prefer to control all of the beans state/lifecycle... from the servlets.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org