InfoCenter Home >
4: Developing applications >
4.2: Building Web applications >
4.2.4: Putting it all together (Web applications) >
4.2.4.2: Obtaining and using database connections >
4.2.4.2.4: Database access by servlets and JSP files

4.2.4.2.4: Database access by servlets and JSP files

Servlets using getConnection() to access a data source

When used without parameters, getConnection() assumes the default user ID and password for a data source. The WebSphere administrative clients do not offer a way to configure a default user ID and password for a data source to be used by a servlet.

Therefore, servlets using getConnection() to access a data source should specify a user ID and password:

getConnection(userid,password);

Go to previous article: Example: Servlet using data access beans Go to next article: Providing ways for clients to invoke applications

 

 
Go to previous article: Example: Servlet using data access beans Go to next article: Providing ways for clients to invoke applications