tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David M Johnson" <dav...@haht.com>
Subject RE: tomcat and macromedia ultra dev 4.0
Date Thu, 24 May 2001 15:28:00 GMT
tomcat and macromedia ultra dev 4.0This mailing list is really for
developers working on the Tomcat servlet container.

You will have a better chance of getting a useful response on the Tomcat
user mailing list.

It looks like your problem involves some sort of database connection
failure.
You might want to try creating a very simple 'Hello World' type JSP page
with
MacroMedia and then see if that works on Tomcat before you try to run a more
complex page like your 'login.jsp' page.

- Dave


  -----Original Message-----
  From: Mehmet Ugur Kuzu (LinkPlus) [mailto:MehmetK@linkplus.com.tr]
  Sent: Thursday, May 24, 2001 10:38 AM
  To: tomcat-dev@jakarta.apache.org
  Subject: tomcat and macromedia ultra dev 4.0


  Hi everbody,

  I want to run macromedia ultra dev 4.0 generated jsp code under tomcat ,
but i got  a lot of error messages( i paste an example above ) when i tried
to run my pages

  ,  is there any body can say me what version of tomcat , jdk and apache  i
must use together for running macromedia generated jsp pages,

  and in addition i can't find a document how can i configure tomcat 4.0 on
windows 2000 with apache.

  sincerely,
  Mehmet Ugur Kuzu

  This  login.jsp page generates error after submit  the   form,

  <%@page contentType="text/html; charset=iso-8859-1" language="java"
import="java.sql.*"%>
  <%@ include file="Connections/DENEME.jsp" %>
  <%
  Driver DriverRecordset1 =
(Driver)Class.forName(MM_DENEME_DRIVER).newInstance();
  Connection ConnRecordset1 =
DriverManager.getConnection(MM_DENEME_STRING,MM_DENEME_USERNAME,MM_DENEME_PA
SSWORD);
  PreparedStatement StatementRecordset1 =
ConnRecordset1.prepareStatement("SELECT * FROM USERS");
  ResultSet Recordset1 = StatementRecordset1.executeQuery();
  boolean Recordset1_isEmpty = !Recordset1.next();
  boolean Recordset1_hasData = !Recordset1_isEmpty;
  Object Recordset1_data;
  int Recordset1_numRows = 0;
  %>
  <%
  // *** 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="Next.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_PA
SSWORD);
    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>




  after submit, this error generated,

  Internal Servlet Error:
  javax.servlet.ServletException: General error
          at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
          at
ULTRADEVWORKS._0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9._jspService
(_0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9.java:143)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
          at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
          at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
          at org.apache.tomcat.core.Handler.service(Handler.java:286)
          at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
          at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
          at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
          at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)

          at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
          at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
          at java.lang.Thread.run(Thread.java:484)
  Root cause:
  java.sql.SQLException: General error
          at
sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6160)
          at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(JdbcOdbc.java:2742)
          at
sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(JdbcOdbcDriver.java:842)
          at
sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:736)
          at
ULTRADEVWORKS._0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9._jspService
(_0002fULTRADEVWORKS_0002flogin_0002ejsplogin_jsp_9.java:126)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
          at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
          at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
          at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
          at org.apache.tomcat.core.Handler.service(Handler.java:286)
          at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
          at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
          at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
          at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)

          at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
          at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
          at java.lang.Thread.run(Thread.java:484)


Mime
View raw message