tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i02ma...@uco.es
Subject problems to connect with mySQL
Date Mon, 14 Jun 2004 13:31:31 GMT
I'm trying to make a web application with JSP and servlets that access to a 
MySQL data base. When I call to one of the servlets that access to the DB, the 
browser (mozilla) works for a few seconds but at the end it show nothing (a 
totally blank page) and in the browser status bar appear the following 
message: "Finished". What I have to do in order to it works?

My Enviroment:
Linux Red Hat
Tomcat 5.0.25
MySQL 4.0.17

More information:


********************************************************************************
server.xml (conf) ---->

<?xml version='1.0' encoding='utf-8'?>
<Server>
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
  <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
  <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated 
and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" 
disableUploadTimeout="true" port="80" redirectPort="8443">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" 
redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
      <Host appBase="webapps" name="localhost">
        <DefaultContext 
className="org.apache.catalina.core.StandardDefaultContext" reloadable="true">
        </DefaultContext>
        <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
  </Service>
</Server>

********************************************************************************
*********************************

web.xml (WEB_INF) --->

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
   <display-name>
       Agendita
   </display-name>
   <description>
       Es un ejemplo que muestra el funcionamiento de los Java Servlets con 
MySQL
   </description>
   <servlet-mapping>
       <servlet-name>invoker</servlet-name>
       <url-pattern>/servlet/*</url-pattern>
   </servlet-mapping>
</web-app>

********************************************************************************
***********************************
[root@localhost root]# echo $CLASSPATH
/opt/SUNWappserver/jdk/lib:/usr/local/jakarta-tomcat-
5.0.25/common/lib:/usr/local/mysql-connector-java-3.0.14-
production:/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-
api.jar:/usr/local/jakarta-tomcat-5.0.25/common/lib/mysql-connector-java-3.0.14-
production-bin.jar:/opt/SUNWappserver/jdk/lib:/usr/local/jakarta-tomcat-
5.0.25/common/lib:/usr/local/mysql-connector-java-3.0.14-
production:/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-
api.jar:/usr/local/jakarta-tomcat-5.0.25/common/lib/mysql-connector-java-3.0.14-
production-bin.jar:/opt/SUNWappserver/jdk/lib:/usr/local/jakarta-tomcat-
5.0.25/common/lib:/usr/local/mysql-connector-java-3.0.14-
production:/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-
api.jar:/usr/local/jakarta-tomcat-5.0.25/common/lib/mysql-connector-java-3.0.14-
production-bin.jar:
[[root@localhost root]# echo $CLASSPATH
	/opt/SUNWappserver/jdk/lib:
	/usr/local/jakarta-tomcat-5.0.25/common/lib:
	/usr/local/mysql-connector-java-3.0.14-production:
	/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-api.jar:
	/usr/local/jakarta-tomcat-5.0.25/common/lib/mysql-connector-java-3.0.14-
production-bin.jar:
	/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-api.jar:
	/usr/local/jakarta-tomcat-5.0.25/common/lib/servlet-api.jar:

********************************************************************************
***********************************

[root@localhost root]# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
PID/Program name
tcp        0      0 0.0.0.0:32768           0.0.0.0:*               LISTEN      
3529/rpc.statd
tcp        0      0 127.0.0.1:32769         0.0.0.0:*               LISTEN      
3691/xinetd
tcp        0      0 127.0.0.1:8005          0.0.0.0:*               LISTEN      
4385/java
tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN      
4385/java
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      
3807/mysqld
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      
3510/portmap
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      
4385/java
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      
3922/X
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
3677/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      
3635/cupsd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      
3717/sendmail: acce


Thanks in advance


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message