package manage;
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import manage.dbcont;
import java.sql.*;
public class login extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=Gb2312");
PrintWriter out=response.getWriter();
String name=request.getParameter("name");
String password=request.getParameter("password");
out.println(name);
out.println(password);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
}
这个是我的severlet,输出来的东西是乱码,请问怎么解决??(netbean4.0+tomcat5.0+jdk1.5) |