Title: RE: How to config JSP compiler in tomcat3.2.1 to use jdk1.3

Hi,
thank a lot,
i achieve my form with fallowing code by your helps,
thhanks again,

and i think this can be an example of a login page with an access database for other members,

sincerely
Mehmet Ugur Kuzu

<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%>
<%@ include file="Connections/MYSQL2.jsp" %>
<%@ include file="Connections/deneme.jsp" %>
<%
// *** Validate request to log in to this site.
String MM_LoginAction = request.getRequestURI();
if (request.getQueryString() != null && request.getQueryString().length() > 0) MM_LoginAction += "?" + request.getQueryString();

String MM_valUsername=request.getParameter("textfield2");
if (MM_valUsername != null) {
  String MM_fldUserAuthorization="";
  String MM_redirectLoginSuccess="First.gif";
  String MM_redirectLoginFailed="Last.gif";
  String MM_redirectLogin=MM_redirectLoginFailed;
  Driver MM_driverUser = (Driver)Class.forName(MM_deneme_DRIVER).newInstance();
  Connection MM_connUser = DriverManager.getConnection(MM_deneme_STRING,MM_deneme_USERNAME,MM_deneme_PASSWORD);
  String MM_pSQL = "SELECT USERNAME, USERPASSWORD";
  if (!MM_fldUserAuthorization.equals("")) MM_pSQL += "," + MM_fldUserAuthorization;
  MM_pSQL += " FROM USERS WHERE USERNAME='" + MM_valUsername + "' AND USERPASSWORD='" + request.getParameter("textfield") + "'";

  PreparedStatement MM_statementUser = MM_connUser.prepareStatement(MM_pSQL);
  ResultSet MM_rsUser = MM_statementUser.executeQuery();
  boolean MM_rsUser_isNotEmpty = MM_rsUser.next();
  if (MM_rsUser_isNotEmpty) {
    // username and password match - this is a valid user
    session.putValue("MM_Username", MM_valUsername);
    if (!MM_fldUserAuthorization.equals("")) {
      session.putValue("MM_UserAuthorization", MM_rsUser.getString(MM_fldUserAuthorization).trim());
    } else {
      session.putValue("MM_UserAuthorization", "");
    }
    if ((request.getParameter("accessdenied") != null) && false) {
      MM_redirectLoginSuccess = request.getParameter("accessdenied");
    }
    MM_redirectLogin=MM_redirectLoginSuccess;
  }
  MM_rsUser.close();
  MM_connUser.close();
  response.sendRedirect(response.encodeRedirectURL(MM_redirectLogin));
}
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="<%=MM_LoginAction%>">
  <input type="text" name="textfield2">
  <input type="text" name="textfield">
  <input type="submit" name="Submit" value="Submit">
</form>
<p>&nbsp;</p>
</body>
</html>

-----Original Message-----
From: Steve Mu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 9:27 PM
To: [EMAIL PROTECTED]
Subject: How to config JSP compiler in tomcat3.2.1 to use jdk1.3


I am having problem to config JSP compiler to use jdk1.3. I have gone
through all the document availible to me. I have modified the class path
etc. Which property file should I look into to solve this problem?

Thanks very much,  Steve

Reply via email to