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

    解决办法在从网上寻找中

  • 相关阅读:
    不吐不快之EJB演练——开篇概述
    URL重写:RewriteCond指令与RewriteRule 指令格式
    刚到公司有点压力山大,在此希望有大神给点正能量
    053第449题
    选择排序---简单选择排序 堆排序
    bzoj-1492 货币兑换Cash (2)——CDQ分治
    MySQL 提高Insert性能
    Codeforces Round #313 (Div. 2) 560C Gerald&#39;s Hexagon(脑洞)
    Matlab矩阵基础
    Android 带清除功能的输入框控件EditTextWithDel
  • 原文地址:https://www.cnblogs.com/wangzeyan/p/7418273.html
Copyright © 2011-2022 走看看