我正在尝试打开JSP,但我遇到了错误. HTTP Status 500 – org.apache.jasper.JasperException: Unable to compile class for JSP java.lang.IllegalArgumentException: Page directive: invalid value for import org.apache.jasper.compiler.N
HTTP Status 500 – org.apache.jasper.JasperException: Unable to compile
class for JSP
java.lang.IllegalArgumentException: Page directive: invalid value for import org.apache.jasper.compiler.Node$PageDirective.validateImport(Node.java:610) org.apache.jasper.compiler.Node$PageDirective.addImport(Node.java:591) org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:354) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:468) org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1787) org.apache.jasper.compiler.Parser.parse(Parser.java:136) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227) org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:117) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194) org.apache.jasper.compiler.Compiler.compile(Compiler.java:356) 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:585) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363) 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:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
它指的是我的JSP中的这一行
<%@page import="Basiccalculator.*;" %>
这是怎么造成的,如何解决?
尝试删除’;’从你的导入.我不确定你使用的服务器,但我发现这是tomcat版本7.057及更高版本.看看 this