• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp sql error

 
Marco Cattaneo
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i write a simple jsp page (my first for exactly!! )



I've this error:

javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
org.apache.jsp.index_jsp._jspService(index_jsp.java:117)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


What's the error??
The db is on an other machine (testdb) and the name of the db is test...

Sorry for the question but on the manual i don't find nothing....thanks a lot!
jsp
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco Cattaneo wrote:The db is on an other machine (testdb) and the name of the db is test...

This sounds like the problem. The machine name or IP isn't specified anywhere. What database are you using? The format of "jdbcdbc:testdb.TEST" varies by database.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4031
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PLEASE DO NOT PUT JDBC CODE INSIDE JSP PAGES! It's really bad. I know its your first, but you should still make a class that uses JDBC, then have the JSP call that class for data. It's a good technique to learn early on, trust me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic