login页面<%@page language = "java" contentType = "text/html" charset = GB2312"%>
<html>
<head>登录界面</head>
<body>
<form method = "post" action = "loginservlet">
用户名:<input type = "text" name = "username" size = "15"><br><br>
密&nbsp&nbsp码:<input type = "password" name = "password" size = "15"><br><br>
<input type = "submit" name = "submit" value = "登录"><br>
</form>
</body>
</html>
regedit页面<%@page  "contentType = text/html;charset = GB2312"%>
<html>
<head>
<title>注册页面</title>
</head>
<body>
<h1>
<% = session.getAttribute("username")%>,你未能成功登录,现进行注册页面,请注册你的信息!
</h1>
</body>
</html>
main页面<%@page contentType = "text/thml; chareset = GB2312" %>
<html>
<head>
<title>主页</title>
</head>
<body>
<h1>
<% = session.getAttribute("username")%>欢迎光临!!</h1>
</body>
</html>
servlet程序import   javax.servlet.*;   
import   javax.servlet.http.*;   
import   java.io.*;   
import   java.util.*; 
public class loginservlet extends HttpServlet
{
private static final String CONTENT_TYPE = "text/html;charset = GB2312";
public void init()throws ServletException
{
}
public   void   doPost(HttpServletRequest   request,   HttpServletResponse   response)   throws   
                        ServletException,IOException   
{  

String username = request.getParameter("username");
String password = request.getParameter("password");
HttpSession session = request.getSession(true);
session.removeAttribute("username");
session.setAttribute(username,"username");
if(username == "aaa") 
response.sendRedirect("main.jsp");
else
response.sendRedirect("regedit.jsp");

}
public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException,    IOException
{
doPost(request,response);
}
public void destroy()
{
}
}
错误提示type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: charset