Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My First Servlet....

Status
Not open for further replies.

henpat123

Programmer
Apr 14, 2005
35
0
0
US
HI,
I am new to Java and I am doing my First Servelt. In the init function in a Servlet defined as below:
public void init(ServletConfig config) throws ServletException


What exactly is the ServletConfig Object. Is there a External XML Configuration file from where this objet gets initialized?

henry
 
The ServletConfig object is not generated by you, but by the servlet container.

If you want to use the init() function (which gets called once and only once during that servlet's lifetime), then just add :

public void init() throws ServletException {
// stuff
}



--------------------------------------------------
Free Database Connection Pooling Software
 
Please do NOT cross-post between forums : thread695-1083962

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top