我用这个文件
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@import="java.util.*;"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="file:///C|/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/myjsp/d.jsp">
请输入你的姓名
<label>
<input name="usename" type="text" id="usename" />
</label>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</form>
<%!
public String zi(String str){
String s=str;
try{
byte [] t=s.getBytes("ISO-8859-1");
s=new String (t);
return s;
}catch(Exception e){
return s;
}
}
%>
<%
out.println("你输入的是:"+zi(request.getParameter("usename")));
%>
<% Date dd=new Date();
out.println(dd.toString());
%>
</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: /d.jsp(2,3) 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)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
怎么会事啊,我该怎么弄啊,好象是没配置好吧,要怎么弄啊,帮忙啊