charset:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>联接:
<td align="center" width="47" ><a href="patient_delete.jsp?id=<%=id%>">delete</a></td>patient_delete.jsp中的代码为:String myid=request.getParameter("id");
int yid=java.lang.Integer.parseInt(myid);
if (yid!=null)
{
  Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
  Connection con=java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=expdocsvc","sa","");
  Statement stmt=con.createStatement();
  String sql=" delete from PATIENT_INFO where PATIENT_ID=" + yid; 
  try{
       stmt.executeUpdate(sql);
       out.print("<script>");
       out.print("alert('success!');");
       out.print("window.location.href='index.jsp';");
       out.print("</script>");
     }catch(Exception e)
      {
         out.print("wrong!");
      }      
}
else
{
 out.println("sorry! you are wrong!!");
} 部分错误报告:type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /first/patient_delete.jsp(8,2) Unterminated &lt;% 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.parseScriptlet(Parser.java:796)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1555)
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)