?? things.java
字號:
package data;
import java.io.IOException;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class things extends HttpServlet {
private static final long serialVersionUID = 2315156614289693989L;
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html; charset=GBK");
HttpSession session = request.getSession();
String soldid=(String)session.getAttribute("id");
String pic=(String)session.getAttribute("shoppic");
String thingname = new String(request.getParameter("thingname").getBytes("iso-8859-1"));
String thingmes = new String(request.getParameter("thingmes").getBytes("iso-8859-1"));
String starttime = new String(request.getParameter("starttime").getBytes("iso-8859-1"));
String endtime = new String(request.getParameter("endtime").getBytes("iso-8859-1"));
String find = new String(request.getParameter("find").getBytes("iso-8859-1"));
String money = request.getParameter("money");
shopdb kk=new shopdb();
try {
kk.addthing(soldid, thingmes, thingname, starttime, endtime, money, pic, find);
response.sendRedirect("myshop.jsp");
}catch (SQLException e) {
// TODO 自動生成 catch 塊
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -