Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2006, 12:40 PM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem accessing Context Variable

Hi,

I have the following code in web.xml for initialising context parameter.

<context-param>
<param-name>myContextParamName</param-name>
<param-value>myContextParamValue</param-value>
</context-param>

I am trying to access it in JSTL using
${initParam["myContextParamName"]}
and it does not work.

I am not sure if the changes to web.xml are being recognized. I tried to use a JNDI name that was set up on the server as a resource in web.xml and even that is not recognized by the code. Restarting the server did not help.

Any ideas please ?

Thanks
vmrao
 
Old August 5th, 2006, 10:28 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aadz5
Default

Hi,

have you tried ${initParam.myCOntextParamName} this should do the trick. If id does not then build and redeploy the application.

Thanks


Adz - Its all about the JSPs baby!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing ASP variable from Javascript sasidhar79 Classic ASP Basics 2 March 8th, 2017 05:31 PM
Accessing nodes contained in a variable geoGregory3 XSLT 2 March 12th, 2008 02:57 PM
Context Menu Shell Extension problem aldwinenriquez .NET Framework 2.0 1 December 18th, 2007 07:35 AM
Problem accessing global variable inside functions jedijr88 Beginning PHP 3 June 29th, 2007 12:51 PM
Accessing a variable from different context meetjag JSP Basics 1 January 19th, 2005 05:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.