• 500错误 javax.servlet.ServletException: javax.naming.NameNotFoundException: Name [happy] is not bound in this Context. Unable to find [happy].


    HTTP Status 500 – Internal Server Error
    
    Type Exception Report
    
    Message An exception occurred processing JSP page [/index.jsp] at line [29]
    
    Description The server encountered an unexpected condition that prevented it from fulfilling the request.
    
    Exception
    
    org.apache.jasper.JasperException: An exception occurred processing JSP page [/index.jsp] at line [29]
    
    26: <hr />
    27: <%
    28:    Context ctx=new InitialContext();
    29:    String value=(String)ctx.lookup("java:comp/env/happy");
    30:    
    31: %>
    32: <%=value %>
    
    
    Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Root Cause
    
    javax.servlet.ServletException: javax.naming.NameNotFoundException: Name [happy] is not bound in this Context. Unable to find [happy].
        org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
        org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:303)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Root Cause
    
    javax.naming.NameNotFoundException: Name [happy] is not bound in this Context. Unable to find [happy].
        org.apache.naming.NamingContext.lookup(NamingContext.java:816)
        org.apache.naming.NamingContext.lookup(NamingContext.java:159)
        org.apache.naming.NamingContext.lookup(NamingContext.java:827)
        org.apache.naming.NamingContext.lookup(NamingContext.java:159)
        org.apache.naming.NamingContext.lookup(NamingContext.java:827)
        org.apache.naming.NamingContext.lookup(NamingContext.java:173)
        org.apache.naming.SelectorContext.lookup(SelectorContext.java:163)
        javax.naming.InitialContext.lookup(InitialContext.java:417)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:151)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Note The full stack trace of the root cause is available in the server logs.
    
    Apache Tomcat/8.5.20

    解决办法在从网上寻找中

  • 相关阅读:
    微软WP7本地数据库之Sqlite编程技巧(转)
    AutoResetEvent详解
    桥接模式的简单分析
    解决VS2008 调试启动特别慢
    软件概要设计
    解决windows8不能安装ZUNE的问题
    CDATA的对特殊字符作用说明
    DataTable对象在内存中的使用(二)
    DataTable对象在内存中的使用(一)
    关于MVC3 CODE FIRST的安装
  • 原文地址:https://www.cnblogs.com/wangzeyan/p/7418273.html
Copyright © 2020-2023  润新知