看不懂的错误提示啊!!!!
写的一个JSP程序,运行时提示如下错误,实在是找不出哪里的错误。还请各位大侠们帮忙啊……
right.jsp代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*",import="com.csuft.tieming.connector.Connector",import="com.csuft.tieming.bean.NewsBean"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'right.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%
Connector connect=new Connector();
PreparedStatement statement=connect.conn.prepareStatement("select title,content from news");
ResultSet result=statement.executeQuery();
ArrayList <NewsBean> list=new ArrayList<NewsBean>();
while(result.next()){
NewsBean bean=new NewsBean();
bean.setTitle(result.getString("title"));
bean.setContent(result.getString("content"));
list.add(bean);
}
%>
</head>
<body>
<%
for(int i=0;i<list.size();i++){
NewsBean myBean=list.get(i);
%>
<%= myBean.title %>
<%= myBean.content %>
<%
}
%>
<br>
</body>
</html>
运行时提示如下错误:
HTTP 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: /right.jsp(2,0) Unterminated <%@ page tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:511)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServ