zoukankan      html  css  js  c++  java
  • 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

    解决办法在从网上寻找中

  • 相关阅读:
    tr 字符转换命令
    Log4cpp配置文件及动态调整日志级别的方法
    Ubuntu使用总结
    vim安装与配置(进阶版)
    [转载] Linux CC与GCC的区别
    C语言基础总结
    VIM之ctags & Taglist 插件
    vim之基础配置
    使用问题:Chrome卡死崩溃
    Ubuntu16.10安装之后的软件安装
  • 原文地址:https://www.cnblogs.com/wangzeyan/p/7418273.html
Copyright © 2011-2022 走看看