tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dima Gutzeit" <d...@mailvision.net>
Subject Re: [JSTL] Exposing <CONTEXT-PARAM> defined elements in a JSP
Date Sun, 12 Sep 2004 10:03:54 GMT
The following will work on 1.1:
<c:out value='<%=
config.getServletContext().getInitParameter("applicationName") %>'/>


I know that it is not that elegant, but it works :-)


----- Original Message ----- 
From: "Adrian Beech" <a.beech@bigpond.net.au>
To: <taglibs-user@jakarta.apache.org>
Sent: Sunday, September 12, 2004 12:32
Subject: [JSTL] Exposing <CONTEXT-PARAM> defined elements in a JSP


G'day all,

I have a context parameter defined in the web.xml file and was wondering how
to get it into the JSP?  For example, I have
"<CONTEXT-PARAM><PARAM-NAME>applicationName</PARAM-NAME><PARAM-VALUE>RASCAL
- Development</PARAM-VALUE></CONTEXT-PARAM>" in the web.xml and
"<TITLE><c:out value='${initParams["applicationName"]}'/></TITLE>" in the
JSP.  The resulting HTML yields "<TITLE></TITLE>".

Have I misinterpreted something here?  I have tried both standard 1.0 and
1.1 under Tomcat 4.1.24 and 5.0.28 with the same results.

I would greatly appreciate it someone could steer me in the right direction.

AB



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




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


Mime
View raw message