How to modify the web.xml in JFreeServlet
How to modify the web.xml in JFreeServlet
Hi all,
I can run the JFreeServlet example one without any problems.
However I fail to run another 2.
I use mysql and I've installed the jdbc driver mm.mysql-2.0.14.
And I've loaded the data in mysql with setuptables.txt successfully.
What I think I have to do next is to configure the web.xml,
so can someone show me how to do so ?
Any other steps for me to work on ?
Thanks a lot.
Artemis
I can run the JFreeServlet example one without any problems.
However I fail to run another 2.
I use mysql and I've installed the jdbc driver mm.mysql-2.0.14.
And I've loaded the data in mysql with setuptables.txt successfully.
What I think I have to do next is to configure the web.xml,
so can someone show me how to do so ?
Any other steps for me to work on ?
Thanks a lot.
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
Yep you are exactly right. Have you read the jdbc_readme.html file that comes in the war? Should be a link to it. If not the reference is : http://coyote.aad.gov.au/JFreeServlet/jdbc_readme.html
Bryan
Yep you are exactly right. Have you read the jdbc_readme.html file that comes in the war? Should be a link to it. If not the reference is : http://coyote.aad.gov.au/JFreeServlet/jdbc_readme.html
Bryan
Re: How to modify the web.xml in JFreeServlet
Hi Bryan,
Yes, I've read this and I just don't know what should I place for the DBurl and DBdriver as I'm using mysql instead of oracle.
Can you show me ?
Thanks again.
Artemis
Yes, I've read this and I just don't know what should I place for the DBurl and DBdriver as I'm using mysql instead of oracle.
Can you show me ?
Thanks again.
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
I am not sure which jdbc driver you are using. There appear to be several implementations of jdbc for mysql (from a google search)
http://mmmysql.sourceforge.net/
http://www.t3-jpn.com/jdbc/jdbcmysql.html
http://www.firstsql.com/java/mysql/
etc
The first one google returns is at http://mmmysql.sourceforge.net/
If you are using this then the parameters are:
DBDriver is org.gjt.mm.mysql.Driver
DBurl is jdbc:mysql://[hostname][:port]/dbname
I am not sure which jdbc driver you are using. There appear to be several implementations of jdbc for mysql (from a google search)
http://mmmysql.sourceforge.net/
http://www.t3-jpn.com/jdbc/jdbcmysql.html
http://www.firstsql.com/java/mysql/
etc
The first one google returns is at http://mmmysql.sourceforge.net/
If you are using this then the parameters are:
DBDriver is org.gjt.mm.mysql.Driver
DBurl is jdbc:mysql://[hostname][:port]/dbname
Re: How to modify the web.xml in JFreeServlet
Hi Bryan,
Yes, I use the 1st JDBC driver you mentioned.
For the DBDriver, it's no problem for me .
But for the DBurl, I use jdbc:mysql://localhost:8080/dbname,
am I correct ?
Can I use the ip instead of "localhost", i.e. 127.0.0.1 ?
I've tried both case and it still fails to load the sample chart (example 2).
What should I do then ?
Thanks
Artemis
Yes, I use the 1st JDBC driver you mentioned.
For the DBDriver, it's no problem for me .
But for the DBurl, I use jdbc:mysql://localhost:8080/dbname,
am I correct ?
Can I use the ip instead of "localhost", i.e. 127.0.0.1 ?
I've tried both case and it still fails to load the sample chart (example 2).
What should I do then ?
Thanks
Artemis
Re: How to modify the web.xml in JFreeServlet
And one more thing, should I do something inside the
control panel->ODBC ?
I cannot locate the mm JDBC driver in it, is that the cause of the failure ?
I'm using Windows 98.
control panel->ODBC ?
I cannot locate the mm JDBC driver in it, is that the cause of the failure ?
I'm using Windows 98.
Re: How to modify the web.xml in JFreeServlet
Artemis
Can you confirm at you are running tomcat and mysql on the same server?
And that this box is win98?
Bryan
Can you confirm at you are running tomcat and mysql on the same server?
And that this box is win98?
Bryan
Re: How to modify the web.xml in JFreeServlet
Bryan
Yes, I am using Tomcat and mysql servers and the OS is win98.
Artemis
Yes, I am using Tomcat and mysql servers and the OS is win98.
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
You should not need to touch the odbc panel as you are not trying to access via odbc.
Yes I would recommend that you utilise your ip address instead of localhost. jdbc:mysql://localhost:8080/dbname
Can you connect over the network to your mysql server from another box, Anyway?
Bryan
You should not need to touch the odbc panel as you are not trying to access via odbc.
Yes I would recommend that you utilise your ip address instead of localhost. jdbc:mysql://localhost:8080/dbname
Can you connect over the network to your mysql server from another box, Anyway?
Bryan
Re: How to modify the web.xml in JFreeServlet
Hi Bryan,
Thanks again for your advice.
No matter I use jdbc:mysql://localhost:8080/dbname or jdbc:mysql://127.0.0.1:8080/dbname,
I still fail to load example 2.
(I don't have problem in loading example 1).
I just don't know what to do.
Can you make some suggestions ?
Artemis
Thanks again for your advice.
No matter I use jdbc:mysql://localhost:8080/dbname or jdbc:mysql://127.0.0.1:8080/dbname,
I still fail to load example 2.
(I don't have problem in loading example 1).
I just don't know what to do.
Can you make some suggestions ?
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
Are you able to establish a jdbc connection to your database from anything else?
Bryan
Are you able to establish a jdbc connection to your database from anything else?
Bryan
Re: How to modify the web.xml in JFreeServlet
Bryan,
Yes, I can because I succeed in running a testing program of jdbc connection.
Artemis
Yes, I can because I succeed in running a testing program of jdbc connection.
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
What are the parameters you used in the testing program of the jdbc connection. They should plug straight into the servlet web.xml file
Bryan
What are the parameters you used in the testing program of the jdbc connection. They should plug straight into the servlet web.xml file
Bryan
Re: How to modify the web.xml in JFreeServlet
Bryan
Yes, I just use the same parameters but they only work in the testjdbc.jsp:
....
java.lang.String strConn;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn= java.sql.DriverManager.getConnection("jdbc:mysql://localhost/try1","user","password");
....
Artemis
Yes, I just use the same parameters but they only work in the testjdbc.jsp:
....
java.lang.String strConn;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn= java.sql.DriverManager.getConnection("jdbc:mysql://localhost/try1","user","password");
....
Artemis
Re: How to modify the web.xml in JFreeServlet
Artemis
DBDriver = org.gjt.mm.mysql.Driver
DBurl = jdbc:mysql://localhost/try1
DBuser = user
DBpwd = password
I presume that these are what you are using and that you have confirmed that these are correct via using a jsp page.
Next what is the actual error being generated? This is probably easiest to see if you do not run tomcat as a service (ie stop it) and start from a command prompt using "tomcat run". You should recieve additional messages in either the http response or the command window running tomcat.
Bryan
DBDriver = org.gjt.mm.mysql.Driver
DBurl = jdbc:mysql://localhost/try1
DBuser = user
DBpwd = password
I presume that these are what you are using and that you have confirmed that these are correct via using a jsp page.
Next what is the actual error being generated? This is probably easiest to see if you do not run tomcat as a service (ie stop it) and start from a command prompt using "tomcat run". You should recieve additional messages in either the http response or the command window running tomcat.
Bryan