Yes, access them in a servlet or JSP and pass them to the bean in a set method.
Here's an example from a book I've been writing with some other folks. The only
difference for your case is that you would have an expression set the "value"
attribute of the setProperty tag instead of a literal String, e.g., value="<%=
application.getInitParameter("foo") %>"
<%@ page import="FirstBean" %>
<jsp:useBean id="fb" class="FirstBean" />
<jsp:setProperty name="fb" property="stringThing" value="Hello World" />
<html>
<head><title>First Bean JSP</title></head>
<body>
The value of FirstBean's stringThing property is:
<br />"<jsp:getProperty name="fb" property="stringThing" />"
</body>
</html>
*************************************
public class FirstBean
{
private String stringVar;
public String getStringThing()
{
return stringVar;
}
public void setStringThing(String bar)
{
stringVar = bar;
}
public FirstBean()
{
stringVar = "";
}
}
Scott Stirling
> -----Original Message-----
> From: Fabian Panthen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 25, 2000 4:25 PM
> To: [EMAIL PROTECTED]
> Subject: Bean not EJBs
>
>
> Does anyone know how to access the application init parameters
> from within a bean (no EJB that is)?
> I tried to access it in about a million ways, no success.
>
> --
>
> Fabian Panthen
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.