This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes applicationScope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "applicationScope" Watch "applicationScope" New topic
Author

applicationScope

Mike Tabak
Ranch Hand

Joined: Mar 31, 2012
Posts: 43
In my application web.xml file I have the following:

<context-param>
<param-name>custServEmail</param-name>
<param-value>custserv@murach.com</param-value>
</context-param>

under the <jsp-config> tag

Shouldn't I be able to access this on a jsp as follows:

${applicationScope.initParam.custServEmail} ?

It works when I leave off the applicationScope, but I was testing the applicationScope and when I include it I get a null string.

Thanks
Mike
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Shouldn't I be able to access this on a jsp as follows:

No. Because initParam is it's own implicit object and is not in application scope.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: applicationScope