哥哥教教我
import java.io.*;
import java.net.*;
import shuj.*;
import java.sql.*;
import javax.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class passwd_xg extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws
ServletException,
IOException {
response.setContentType( "text/html;charset=UTF-8 ");
PrintWriter out = response.getWriter();
try{
String password = request.getParameter( "textfield ");
String username = request.getParameter( "textfield2 ");
String name = request.getParameter( "name8 ");
DBConnection dbc = new DBConnection();
String sqlpw = "update adminzw set 密码= ' "+username+ " ' where 密码 = ' "+password + " ' ";
dbc.executeQuery(sqlpw);
String sql = "selest * from adminzw 账号= ' "+name+ " ' ";
out.println( " <h2> 恭喜你资料修改成功!! </h2> <br> ");
/* ResultSet rs = dbc.executeQuery(sql);
if(rs.next()){
response.sendRedirect( "admin_index.jsp ");
}*/
}
catch(Exception e)
{
out.println( " <h2> &