Meaningless Drivel is fun!
The moose likes Struts and the fly likes data source problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "data source problem" Watch "data source problem" New topic

data source problem

Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
hai ,

i am using <data-source> tag to connect mysql.This is my first application using data-source. i tried this small application. i got the error "SERVLET ACTION IS CURRENTLY UNAVAILABLE"

i entered user next page i want to display is password in next page which is in mysql database.

my coding:
In action class:

DataSource datasource = getDataSource(request);
Connection myConnection = datasource.getConnection();
rs=stmt.executeQuery("select password from login where name=\""+name1+"\"");

in my struts-config


i dont know why the error occurs. plzzz help me to find out the solution.

Thanks in Advance
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
the setup that works for me (at least on one machine) is:

you might also want to try using a different jdbc driver

Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
Thaku Tad

i Got it. it works fine.thanku for ur help. i changed my jdbc as mysql connector.

thanks a lot
I agree. Here's the link:
subject: data source problem
jQuery in Action, 3rd edition