File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "is this a bug???" Watch "is this a bug???" New topic

is this a bug???

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
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.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: is this a bug???
jQuery in Action, 3rd edition