HTTP Status 500

WBOY
Release: 2016-06-24 11:53:05
Original
2087 people have browsed it

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: [14] in the generated java file: [E:\apache-tomcat-8.0.15-windows-x86\apache-tomcat-8.0.15\work\Catalina\localhost\MVC_PIMS\org\apache\jsp\friendManage\updateFriendMessage_jsp.java]
Only a type can be imported. javax.enterprise.inject.New resolves to a package

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.15 logs.
以上是错误信息。 下面是无法编译文件的程序
<%@page import="javax.enterprise.inject.New"%>
<%@page import="friendManage.lookFriendBean"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>



  
    My JSP 'updateFriendMessage.jsp' starting page
  
  
    



    

    
    
    
    
    
    
    
    

     增加联系人
    

     查看联系人
    

     修改联系人
    

     删除联系人
    

    

    
    


    
    
     <%
     lookFriendBean ff = null;
     ArrayList updateFriendList = (ArrayList)session.getAttribute("updateFriendList");
     if(updateFriendList==null||updateFriendList.size()==0){
     response.sendRedirect("friendManage/lookFriend.jsp");
     }
     else{
     ff = (lookFriendBean)updateFriendList.get(0);
      %>
    
     联系人姓名
     " disabled="disabled">
    
    
     联系人电话
     ">
    
    
     联系人邮箱
     ">
    
    
     联系人单位
     ">
    
    
     联系人住址
     ">
    
    
     联系人QQ
     ">
    
    
    
    
            
    
         
    
     <%
     } 
     %>
    
   
  

错误在哪里,为啥不能编译·····


回复讨论(解决方案)

一种方法就是不断一小段代码
去都某一段 错误消失了
接下来 你懂的

一种方法就是不断一小段代码
去都某一段 错误消失了
接下来 你懂的

Nani? What do you mean~ There is nothing wrong no matter how you look at it, why can’t it be compiled? It shouldn't be an environmental problem. Other jsp files run normally, but this one doesn't. . .

Found it out, it’s the reason for this sentence<%@page import="javax.enterprise.inject.New"%>. The auto-prompt function caused this class to be imported accidentally. . . But why is the error reported? I haven’t used it. Check it out~~~~It hurts


One way is to continue a small piece of code
and go to a certain section The error disappeared
Next thing you know

Nani? What do you mean~ There is nothing wrong no matter how you look at it, why can’t it be compiled? It shouldn't be an environmental problem. Other jsp files run normally, but this one doesn't. . .

Found it out, it’s the reason for this sentence<%@page import="javax.enterprise.inject.New"%>. The auto-prompt function caused this class to be imported accidentally. . . But why is the error reported? I don’t use it. Check it out~~~~It hurts



Haha, this is my way to troubleshoot js errors, because I write a lot of js, and there are smart prompts Poor, so I chose the method of constantly removing code segments. Locate where the error is
Once you find the error, it will be solved~
I am doing .net and I am not familiar with Java
But if you locate the error, it should be easy to solve
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template