📄 handlere.jsp
字号:
<%-- Document : handlere Created on : 2008-3-16, 18:26:53 Author : Administrator--%><%@page contentType="text/html" pageEncoding="GB2312"%><%@page import="java.sql.*"%><%@page import="java.io.*;"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><% try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch(Exception e){ } Connection con; Statement sql; ResultSet rs; try{ request.setCharacterEncoding("GB2312"); String url="jdbc:mysql://localhost/taotao"; String user="taotao"; String password=".nothing"; con=DriverManager.getConnection(url,user,password); String strId=request.getParameter("tore"); int tt=Integer.parseInt(strId); //byte b[]=str.getBytes("GB2312"); //str=new String(b); String strRecontent=new String(request.getParameter("recontent").getBytes("ISO-8859-1")); //byte b[]=strContent.getBytes("GB2312"); //strContent=new String(b); String updateCondition="update messages set recontent="+"'"+strRecontent+"'"+" where number = "+tt; sql=con.createStatement(); sql.executeUpdate(updateCondition); } catch(SQLException e){ } //response.encodeRedirectURL("handledisplay.jsp"); RequestDispatcher dispatcher=request.getRequestDispatcher("handledisplay.jsp"); dispatcher.forward(request, response);%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -