Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP connection mysql

 
Lins Alford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have been working with jsp and mysql on win for bout a year...now i am migrating to mac osx panther and cant get jsp to connect to a mysql database....

is the connection different? does it use a different driver?? help!!

lins
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should all work the same, but you might to provide some more details. Which version of MySQL are you using? Is it running on the Mac or another box? Which JSP container are you running? Do you have the MySQL drivers in the right place? Are you getting any error messages? etc, etc. Hopefully somebody will be able to help you out if you give them some more info.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, we'll need more details. JDBC per se has no cross-platform issues that I am aware of. I have web apps running on Windows, Mac OS X, and Linux that all connect, using the exact same JDBC code, to a PostgreSQL database running on Solaris.
 
Lins Alford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ok im running mysql 4.1.7 (in usr/Local), Tomcat 4.1 (in Library folder) catalina container,Apache 1.3 on mac os x 10.3.6 panther...

have used mysql connector "mysql-connector-java-3.0.11-stable-bin.jar" in the past with windows but macs so confuse me as they are unix based and i me and unix dont mix!!

so do i need a different connector?? if so where do i put it??

cheers guys for help!!

lins
 
Lins Alford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh and they all are running on the mac box...

lins
 
Venkatraman Kandaswamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the right jar file.

Did you put the mysql jar file in webapps/yourapplication/WEB-INF/lib ?

And what kind of connection error are you getting. Does it say file not found or its some database related connection error? Why dont you post the error for us.
 
Lins Alford
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there is no server error of such...i just have a simple page that has a routine to connect to a database which doesnt connect....it always fails...

yes did have connector in lib file... am i quoting the correct driver tho?? here is my code to connect:



I just get the failed message when i use safari to view page...

Lins
 
Venkatraman Kandaswamy
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try org.gjt.mm.mysql.Driver
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic