This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes is this a bug??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "is this a bug???" Watch "is this a bug???" New topic
Author

is this a bug???

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
In my tomcat server, i edited the web.xml to include a context parameter.when i used the config implicit object to get the parameter it gave null, but when i accessed the servletcontext and called the getInitParameter method on it it returned the value. What is going on???


jasmine kaur
danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
config can only retreive the initial parameters of one servelt.
dan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61084
    
  66

Since the config implicit variable is a reference to the ServletConfig for the servlet created on behalf of the JSP page, I'm not sure why you expected to be able to access context parameters from it.
As documented, context parameters are available from the ServletContext.
[ May 11, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is this a bug???