JSP:遇到了org.apache.jasper.JasperException
小弟初学JSP,刚到JSTL就遇到问题了,代码<%@page="text/html;charset=GB2312"%><%@taglibprefx="c"uri="/WE...
小弟初学JSP,刚到JSTL就遇到问题了,代码
<%@ page="text/html;charset=GB2312"%>
<%@ taglib prefx="c" uri="/WEB-INF/lib/jstl"%>
<html>
<head><title>i</title></head>
<body><c:forEach var="1" end="10">
${i}<br>
</c:forEach>
</body>
</html>
结果抛出异常
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /myjsp.jsp(1,2) Unterminated <%@ page tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:527)
org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1930)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:118)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
请各位大侠指点一二 展开
<%@ page="text/html;charset=GB2312"%>
<%@ taglib prefx="c" uri="/WEB-INF/lib/jstl"%>
<html>
<head><title>i</title></head>
<body><c:forEach var="1" end="10">
${i}<br>
</c:forEach>
</body>
</html>
结果抛出异常
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /myjsp.jsp(1,2) Unterminated <%@ page tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:527)
org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1930)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:245)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:118)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:171)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
请各位大侠指点一二 展开
展开全部
<%@ taglib prefx="c" uri="/WEB-INF/lib/jstl"%>的prefx="c"写错了
prefix="c"少了和i
不过最好写成下面这样:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
prefix="c"少了和i
不过最好写成下面这样:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询