|
 |
pro_jsp thread: How to pass web.xml parameter from a JSP to a Bean
Message #1 by "Bachler, Elisabeth (Elisabeth)" <ebachler@l...> on Wed, 18 Jul 2001 12:09:33 +0200
|
|
Hello there,
I have a jsp file . I need to pass a parameter read in the web.xml to a
bean.
I can't seem to manage to make it work..... I always get : "attribute
ConfigFile has no value.
Could you help me please ?
Thanks
Elisabeth
I have :
file.jsp
<jsp:useBean id="myBean" class="MyBean" scope="session"/>
<jsp:setProperty name="conn" property="configFile"
value="{<%= config.getInitParameter("ConfigFile")}" %> />
The problem I am having is that I don't know how to update the Tomcat
web.xml and the Application web.xml
I saw in the Tomcat web.xml that I had to uncomment a few lines but I am not
sure of what I should enter as param-name and param-value!
<!-- uncomment the following to use Jikes for JSP compilation
<init-param>
<param-name>ConfigFile</param-name>
<param-value>/opt/tomcat/etc/config</param-value>
</init-param>
-->
Application web.xml
Do I need to put something here as well ?
>
WEB STRUCTURE
<jakarta-tomcat-3.2.2>
|
----------------------------------------------------------------------------
----------------------
> |
> | |
> <webapps> web.xml <===
> Tomcat web.xml etc
> |
> |
> <proyecto>
> config
> |
> <miaplicacion>
> |
> ---- file.jsp
> |
> | < WEB-INF>
> |
|-------------------------------------
|
|
|
web.xml <== Application web.xml
> <classes>
> *.class
>
|
|
 |