I'm running Tomcat 5.5 - The mysql port is 3306 - I made that change to the 
server.xml file 
   
  "jdbc:mysql://localhost:3306/everycitizen
   
  Still get the same result - page not found or 
  ...."Cannot create JDBC driver of class '' for connect URL 'null' ".


Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
  On 2/26/06, David McMinn wrote:
>
> I had not added an error-page tag to the web.xml - The default behavior
> would be a stack trace which would be fine w/ me - In my jsp, I have @ page
> errorPage="errorpg.jsp"......
>
> I don't get a stack trace but I get a page w/ this message...."Cannot
> create JDBC driver of class '' for connect URL 'null' ".
>
>
> Here is my original posting.
>
> I'm stepping through the example Professional Apache Tomcat 5 book by
> Wrox in Chapter 14 - I have set up the mysql database and confirmed it works
> and set up the tomcat server and confirmed that I can see my index.jsppage. 
> When I try to go to
> http://localhost:8070/jsp-examples/wroxjdbc/JDBCTest.jsp
> I get a standard The page cannot be displayed page.
>
> I've included all my steps below. Anyone that can help is most
> appreciated. Thanks in advance.....Dave
>
> Steps I have done
>
> 1) Created a DB called everycitizen and a table called test with a
> column called pk. Created user everyuser w/ a password and granted Select
> privileges to that user.
> 2) Copied the mysql-connector-java-3.1.12-bin.jar into
> $CATALINA_HOME/common/lib.
> 3)Added the following to the $CATALINA_HOME/conf/server.xml just before
> the . Password is blotted out.
>
> 
> 
> > javax.sql.Datasource" name="jdbc/WroxTC5" 
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost/everycitizen"


what is the port u run the mysql server?
the default is 3306

"jdbc:mysql://localhost:3306/test?autoReconnect=true"

username="everyuser" password="everypass" maxActive="20" maxIdle="30000"
> maxWait="100"/>
> 
> 4) Added the following to the
> $CATALINA_HOME/webapps/jsp-examples/WEB-INF web.xml file at the bottom
> just before the entry after the last env-entry.
>
> 
> jdbc/WroxTC5
> javax.sql.DataSource
> Container
> 
>
> 5) Added the JDBCTest.jsp file and the errorpg.jsp file to
> $CATALINA_HOME/webapps/jsp-examples/wroxjdbc directory. I created the
> wroxjdbc folder. The JDBC Test is:
>
> 
> 
> >    import="java.sql.*,
>      javax.sql.*,
>      java.io.*,
>      javax.naming.InitialContext,
>      javax.naming.Context" %>
> 
>   JDBC JNDI Resource Test
> >   InitialContext initCtx = new InitialContext();
>   DataSource ds =
> (DataSource)initCtx.lookup("java:comp/env/jdbc/WroxTC5");
>   Connection conn = ds.getConnection();
>   Statement stmt = conn.createStatement();
>   ResultSet rset = stmt.executeQuery("select * from test;");
>   %>
>   
>     
>   XXXX
> 
> >    while (rset.next())
>    {
>    %>
>     
> >    rset.close();
>    stmt.close();
>    conn.close();
>    initCtx.close();
>    %>
> 
> 
>
>
> and the errorpg is:
>
> 
> 
>   An error has occurred 
> 
> 
>
>
> Glen Mazza wrote:
> David McMinn escribió:
> >
> > Unfortunately the logs don't say anything - I just get a page not found.
> If I take that out (and all subsequent jsp) it works fine. So right up to
> that point the jsp page renders fine - When I include that one more line, it
> blows up. I'm still looking but if someone knows please chime in. Thanks,
> >
>
> OK, then, perhaps the error page to forward to *that you have defined in
> the webapp's web.xml file) doesn't exist. TC is trying to forward to
> that error page, can't find it, and hence returns the page not found
> error.
>
> Glen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>

Reply via email to