Hello, I'm trying to make a connection without DriverManager, of
course
I'm a newbie....I'm using gwt 1.7 with Eclipse 3.5

With GWTshell:
import javax.naming.InitialContext;
import javax.naming.Context;
Context context = new InitialContext();
javax.sql.DataSource ds =(javax.sql.DataSource)context.lookup
("java:comp/env/jdbc/mydb");
Connection connection = ds.getConnection();

I have also defined the
webapps\ROOT\WEB-INF\web.xml with this:

  <resource-ref>
     <description>Mysql Connection</description>
     <res-ref-name>jdbc/tableappcheck</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <res-auth>Container</res-auth>
   </resource-ref>

But I continue to get the:
javax.naming.NamingException: Cannot create resource instance

Well...I don't know where to put the context xml part.... :-(
With DriverManager no problem, so I would like how to put the context
part.

I tried also to convert to HostedMode ... too many problem, so...

I would like also to understand how to setup a local tomcat
installation that I have made.
Trying to add a new resource to Server listed in Eclipse I get the
error message
"There are no resource that can be added or removed from the server".
My problem was that I begun to add code and resourse to an existing
project
found on gwt-eample: com.tribling.gwt.test.mysqlconn.

Of course I have already searching on the web, but many examples have
made into
me just more confusion...

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to