1 Reply Latest reply on Feb 22, 2004 10:01 PM by jimmywu

    connecting mysql into JBoss

    jimmywu Newbie

      Hi guys,

      i am trying out Jboss for creating a web portal, and i need to connect the database to the jboss server. I have searched the web for tutorials regarding these but all are either too confusing or too outdated. would appriciate it if someone were to help me out here.thx in advance

      regards
      Jimmy
      Singapore

        • 1. Re: connecting mysql into JBoss
          jimmywu Newbie

          here's my file calling for the database... anything wrong with it?

          login.html:



          My Login Form









          Login
          <table border=0 align="left">

          Username:





          Password:

















          login2.jsp:

          <%@ page
          import = "javax.servlet.http.*,
          java.sql.*"

          try
          {
          Statement Stmt = Conn.createStatement();
          thisStatement = "SELECT Username, Password FROM Users WHERE Username = request.getParameter("name"), Password = request.getParameter("pass")";

          // get the form variable
          String username2 = request.getParameter("name");
          String password2 = request.getParameter("pass");

          // create a session
          session.putValue("username2", username);

          // set a timeout period
          session.setMaxInactiveInterval(180);


          }
          catch (SQLException E)
          {
          out.println("<b style=\"color: red;\">No such record");

          }

          %>




          <basefont face="Arial"




          Thank you for using this service.
          Click <a href=rootshell.jsp>here for root access