日期:2014-05-17 浏览次数:20714 次
<%
int id = rs.getInt("clientId");
%>
<td><input type="hidden" name="clientId" value="<%= id %>"/></td>
<td height="22" colspan="4" bgcolor="#FFFFFF" class="STYLE3"><div align="center"><input type="submit" name="submit" value="修改" onclick="alert('<%=id %>')"/></div></td>
package com.orange.khglxt;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.orange.khglxt.beans.DbDao;
public class ChangeClient extends HttpServlet {
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException,IOException {
request.setCharacterEncoding("GBK");
response.setContentType("text/html");
String clientId = request.getParameter("clientId");
System.out.println(clientId);
RequestDispatcher rd;
request.setAttribute("clientId", clientId);
rd = request.getRequestDispatcher("/change.jsp");
rd.forward(request,response);
}
}
<input type="hidden" name="clientId" value="<%= id %>"/>