-
1. Re: connecting mysql into JBoss
jimmywu Feb 22, 2004 10:01 PM (in response to jimmywu)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