RE: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-17 Thread Adrian Beech
Hi,

Is initParam[...] JSTL 1.1 specific?  I can get TITLEc:out
value='${initParam[applicationName]}'//TITLE to work under Tomcat 5.0
with JSTL 1.1 but not under Tomcat 4.1.24 with JSTL 1.0.

AB


-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Monday, 13 September 2004 1:16 AM
To: Tag Libraries Users List
Subject: Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP


Adrian Beech wrote:

 TITLEc:out value='${initParams[applicationName]}'//TITLE

... it's initParam -- singular --

c:out value='${initParam[applicationName]}'/
or
c:out value='${initParam.applicationName}'/

HTH,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ NOD32 1.868 (20040910) Information __

This message was checked by NOD32 antivirus system. http://www.nod32.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-17 Thread Hassan Schroeder
Adrian Beech wrote:
Is initParam[...] JSTL 1.1 specific?  I can get TITLEc:out
value='${initParam[applicationName]}'//TITLE to work under Tomcat 5.0
with JSTL 1.1 but not under Tomcat 4.1.24 with JSTL 1.0.
Nope, both of the below work fine on my 4.1.30 systems.
c:out value='${initParam[applicationName]}'/
or
c:out value='${initParam.applicationName}'/
Make sure you're using the appropriate web.xml for each version...
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-12 Thread Adrian Beech
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-PARAMPARAM-NAMEapplicationName/PARAM-NAMEPARAM-VALUERASCAL
- Development/PARAM-VALUE/CONTEXT-PARAM in the web.xml and
TITLEc: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-12 Thread Dima Gutzeit
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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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-PARAMPARAM-NAMEapplicationName/PARAM-NAMEPARAM-VALUERASCAL
- Development/PARAM-VALUE/CONTEXT-PARAM in the web.xml and
TITLEc: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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]