Basic HTML version of Foils prepared April 15 1997

Foil 12 JDBC Servlet Example (contd.)

From Examples of JDBC -- Microsoft Access CPS616 -- Information Track of CPS -- Spring Semester 97. by Sangeeta Aggarwal,Tom Pulikal,Udayan Pravate(Nancy McCracken) *

Implementation :
public class DBServlet extends HttpServlet {
//overriding service method
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
//fetch the parameters from the form input
String username = req.getParameter("username");
String password = req.getParameter("password");
String query = req.getParameter("query");
PrintStream out = new PrintStream (res.getOutputStream() );
String url = "jdbc:weblogic:oracle"; // JDBC driver url



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Aug 14 1997