javax.servlet.ServletException: javax.naming.NameNotFoundException: Name comp is not bound in this Context
I am getting following exception while connecting to a database in spring framework.
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)root cause javax.servlet.ServletException: javax.naming.NameNotFoundException: Name comp is not bound in this Context org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
January 7, 2008 | Filed Under J2ee
Related Post
Comments
One Response to “javax.servlet.ServletException: javax.naming.NameNotFoundException: Name comp is not bound in this Context”
Leave a Reply
You should include java:/ into your datasource path. Your datasource path me be in some datasource xml file or something like that.
e.g.
property name=”jndiName” value=”java:/comp/env/jdbc/mydb”