jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes servlet with MYsql database problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet with MYsql database problem" Watch "servlet with MYsql database problem" New topic

servlet with MYsql database problem


Joined: Jul 24, 2001
Posts: 14
I am trying to get some values from a html page into a MYSQL databse through a servlet , my problem is when i enter a value a press submit , the illegal access exception is thrown ,I had the same problem with MSaccess database , but if we give a blank user and password in the getConnection() method , then it works fine . but when i try the same with MYSQL , it still throws a IllegalAccessException,I tried to do this as a simple database application passing the value to be inserted in the commandline parameter it worked fine , it throws this exception only when done as a servlet. Does anybody knows how to create a system dsn entry for MYsql in (controlpanel->odbc) like we do for MSaccess database.Any comments will be appreciated.
SoonAnn Lim
Ranch Hand

Joined: Jun 21, 2001
Posts: 155
You need to get an appropriate driver for mysql. mmmysql driver is very good. Try to search for it on the web. There are even some examples show you how to set up jdbc connection using this driver.
I agree. Here's the link: http://aspose.com/file-tools
subject: servlet with MYsql database problem
It's not a secret anymore!