The Artima Developer Community
Sponsored Link

Java Answers Forum
ServletConfig

2 replies on 1 page. Most recent reply: Oct 27, 2003 4:14 AM by aravinda

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
aravinda

Posts: 3
Nickname: aravinda
Registered: Oct, 2003

ServletConfig Posted: Oct 22, 2003 3:53 AM
Reply to this message Reply
Advertisement
could anybody explain me in detail the significance of ServletConfig


perry arora

Posts: 22
Nickname: perry
Registered: Sep, 2003

Re: ServletConfig Posted: Oct 22, 2003 4:53 AM
Reply to this message Reply
sure!!!

First of all are your aware of what the servlet container is .. if yes then great

But quickly i will explaion when ever you host your application in any server , the server needs specific particular containers to suppot that technology like

Servlets(also jsp),J2ee containers,Applet Containers etc etc

The one most important function of the Container is to provide an environment in which the servlet can perform it task

with that the its the responsibility of the container to give access to few resources needed by the Software component running in it , in this case it will be Servlet.

and any interactiong with out side world! lets say the underlying OS will be done by container which is running for this Servelt. We can have more than one Servlet running in one container!!!

Now coming to the ServletConfig.. as we know that what ever servlets we develop they are being loaded by the server or lets say they are being instantiated , the object is created for it.. and The container that instantiates want to give some information to the servlet about itself..or about container it does that in the form of ServletConfig

Each and every Servlet has its own separate Copy of ServletConfig

Hey dont confuse it with ServletContext that can be shared by the servlets in the application!

So basically this ServletConfig which the container passes to the created Servelt instance includes the intialization of the Servers part and also some information about the container so that if needed the servlet can communicate back with the Container !

I hope it will help u .. if u need any other details abt Conntainers or Context object feel free!

bye

aravinda

Posts: 3
Nickname: aravinda
Registered: Oct, 2003

Re: ServletConfig Posted: Oct 27, 2003 4:14 AM
Reply to this message Reply
Thanks a lot, perry arora

Flat View: This topic has 2 replies on 1 page
Topic: ClassCastException Previous Topic   Next Topic Topic: help!How do i get a java developer's kit?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use