org.apache.jasper.JasperException: /life.jsp(2,0) Unterminated <%@ page t

解决办法:

 1:根据上面的错误提示可以看出是在life.jsp的网页上由于第2行发生了的异常,一看就知道是某个

     符号引起了程序的中断;

     原代码如下:

    <%@ page language="java" pageEncoding="GBK"%>
<%@ page import="studynote.*" ,import="java.util.*"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
  <head>
    <html:base />
    <title>study.jsp</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">
 -->
<%
/*
先接受StudyAction中传过来的参数studynote
*/
ArrayList studylist=(ArrayList)request.getAttribute("studynote");
%>
  </head>

2:仔细检查发现在红色标注的一行中多出了一个“,”。当把其删除以后测试,程序就可以运行

你可能感兴趣的:(apache,jsp,bean,struts,css)