[求助]jsp:forward的问题-->静夜思转移
jsp:forward的问题
下面是源文件:
<%@ page language="java" %>
<%!String content="";%>
<%!String link;%>
<%
if (request.getParameter("id")!=null)
content=request.getParameter("id");
else{
link="1.htm";
%>
<jsp: page="ui.htm" />
<%}%>
<html>
<head>
<title>sample2</title>
</head>
<body>
<p>
<a href="ui.htm">
<%out.println(content);%>
</a></p>
</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: /ui.jsp(10,4) Invalid directive org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:506) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203) org.apache.jasper.compiler.Compiler.compile(Compiler.java:470) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.