permaculture playing cards*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet with MYsql database problem" Watch "servlet with MYsql database problem" New topic
Author

servlet with MYsql database problem

Raghav
Greenhorn

Joined: Jul 24, 2001
Posts: 14
hi,
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.
thanks
raghav
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.
 
jQuery in Action, 2nd edition
 
subject: servlet with MYsql database problem