public SqlDataSourceServlet() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public Capabilities getCapabilities() {
return Capabilities.SQL;
}
@Override
public DataTable generateDataTable(Query query, HttpServletRequest
request)
throws DataSourceException {
SqlDatabaseDescription dbDescription = new SqlDatabaseDescription(
request.getParameter("jdbc:mysql://10.0.0.230:3306/test"),//url
request.getParameter("atuser"),//user
request.getParameter("***"),//pass
request.getParameter("userk"));//table
return SqlDataSourceHelper.executeQuery(query, dbDescription);
}
try servlet ext http implements datatablegenerator{}
On Wed, Jul 7, 2010 at 10:55 AM, Ad <[email protected]> wrote:
> Anybody?
>
> On Jul 6, 5:06 pm, Ad <[email protected]> wrote:
> > Hey guys,
> >
> > Ive been following the tutorials on the below link..
> >
> > http://code.google.com/apis/visualization/documentation/dev/dsl_get_s...
> >
> > Im finding it really hard to connect the Servlet up to the MySQL
> > database already in place!
> > From what I understand the java files are stored inside .Jar files,
> > which reside in the /mywebapp/WEB-INF/lib directory?
> > Ive edited the HTML file with the correct Javascript, and ive added
> > what I think is the correct snippets of code for SQL in the web.xml
> > file.
> >
> > Is it a case of opening the .jar and editing the
> > "SqlDataSourceServlet.class" file within? and if so how??
> >
> > Thanks guys, im abit of a novice at this...
> >
> > :) Ads.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>
--
regards,
Akshay .Y. Dange.
MS in Computer Science
State University of New York, Binghamton
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.