The moose likes Servlets and the fly likes Implementation for ServletConfig? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Implementation for ServletConfig?" Watch "Implementation for ServletConfig?" New topic

Implementation for ServletConfig?

Amit Das
Ranch Hand

Joined: Mar 05, 2005
Posts: 206
Hi all,

I know that when the Server receives a request for the first time, it calls init(ServletConfig), where the Servlet Container passes the object of ServletConfig to the servlet in consideration.
My question is where can i find the implementation for the object of ServletConfig which is provided by the Servlet Container???

Plz let me know ASAP..........


[cleaned up the topic - Dave]

[ July 19, 2006: Message edited by: David O'Meara ]
[ July 19, 2006: Message edited by: Bear Bibeault ]
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

So many stars, question marks and full stops? Please EaseUp.

A Servlet Context is an interface, but you can always find the concrete type from an instance using getClass(). THis will change depending on your server, but should get you started.

Amit Das
Ranch Hand

Joined: Mar 05, 2005
Posts: 206
thanks David for ease up as well

ServletConfig's reference.getClass() will gimme the Class object for ServletConfig....right....
But i need to see the source code, i.e. say Tomcat's servlet containers implemetation for it....hope u got my point...

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

You can download the Tomcat source code from the Tomcat site.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Implementation for ServletConfig?
It's not a secret anymore!