As long as you have the classes111.zip in your
classpath, you should not have a problem. I just
created a simple form that allowed a user to enter
information and login. You could also hardcode these
values and they would work. Here's a little snippet of
code that works fine. You have catch the exceptions,
but the connection will work for you.

  private String url;
  private String user;
  private String password;
  private Connection conn;
  private boolean conn_s;
  private boolean hasClosed;
  public void init(ServletConfig config) throws
ServletException {
    super.init(config);
    conn_s=false;
    hasClosed=true;

  }
  /**Process the HTTP Get request*/
  public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException
  {
   
url="jdbc:oracle:thin:@"+request.getParameter("hostString");
    user=request.getParameter("userName");
    password=request.getParameter("password");
    try
    {
      System.out.println("Current connection status:
"+hasClosed);
      DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
     
conn=DriverManager.getConnection(url,user,password);
      conn_s=true;
      System.out.println("Connection made
succesfully");
    }

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to