jsp引入java包,不知道为什么就是运行不了,具体错误如下:
(tomcat和java都可以启用,配置应该没问题)descriptionTheserverencounteredaninternalerror()thatprevent...
(tomcat和java都可以启用,配置应该没问题)
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: 16 in the jsp file: /netteaching/login.jsp
op_user cannot be resolved to a type
13: String password=request.getParameter("password");
14: String usercode=request.getParameter("user");
15: String type=request.getParameter("type");
16: op_user ope=new op_user();//构造用户管理对象
17: if(ope.isLogin(usercode,password,type)){//调用isLogin方法判断是否允许用户登录
18: user us=ope.getUserByUserCode(usercode,type);//允许用户登录则取得用户信息
19: session.setAttribute("usercode",usercode);//把用户编号写入session
(有两个错误,和上面的类似}
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the
Apache Tomcat/6.0.18 logs.
这是开头及引入语句
<%@ page contentType="text/html; charset=UTF-8" %><!--指定本页文字编码为UTF-8>
<%@ page import="grad.util.user.*;"%><!--引入user包下的user和op_user类-->
<%@ page session="true" %><!--设置session有效--> 展开
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: 16 in the jsp file: /netteaching/login.jsp
op_user cannot be resolved to a type
13: String password=request.getParameter("password");
14: String usercode=request.getParameter("user");
15: String type=request.getParameter("type");
16: op_user ope=new op_user();//构造用户管理对象
17: if(ope.isLogin(usercode,password,type)){//调用isLogin方法判断是否允许用户登录
18: user us=ope.getUserByUserCode(usercode,type);//允许用户登录则取得用户信息
19: session.setAttribute("usercode",usercode);//把用户编号写入session
(有两个错误,和上面的类似}
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the
Apache Tomcat/6.0.18 logs.
这是开头及引入语句
<%@ page contentType="text/html; charset=UTF-8" %><!--指定本页文字编码为UTF-8>
<%@ page import="grad.util.user.*;"%><!--引入user包下的user和op_user类-->
<%@ page session="true" %><!--设置session有效--> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询