【急急新手在线等】JavaWeb项目源码主页不能正常显示报500错,没走到debug
tomcat报错
TTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException:
File "/WebRoot/control" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:435)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:504)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1568)
org.apache.jasper.compiler.Parser.parse(Parser.java:132)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
进的是index.jsp代码如下:
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page import="cn.edu.bit.business.*,java.util.*,cn.edu.bit.Object.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="control" prefix="control"%>
<html>
<head>
<%String username = (String) request.getSession().getAttribute("username");
if (username == null || username.equals("")) {
// response.sendRedirect("login.jsp");
}
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>科研信息发布平台</title>
<style type="text/css">
------解决方案--------------------自定义标签的包没有被导入。
JSP中有这段话
<%@ taglib uri="control" prefix="control"%>
再看异常:
org.apache.jasper.
子类会不会继承父类的私有属性和方法?该如何处理