This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez 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

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "applicationScope" Watch "applicationScope" New topic


Mike Tabak
Ranch Hand

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


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.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61761

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]
I agree. Here's the link:
subject: applicationScope