?? openshop.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 openshop 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 xinyong="0";
String shoppic=(String)session.getAttribute("shoppic");
String shopname = new String(request.getParameter("shopname").getBytes("iso-8859-1"));
String shopmes = new String(request.getParameter("shopmes").getBytes("iso-8859-1"));
shopdb kk=new shopdb();
try {
if(request.getParameter("open") != null&&kk.checkshopname(shopname)){
kk.openshop(soldid, xinyong, shopmes, shoppic, shopname);
response.sendRedirect("openok.jsp");
}else{
session.setAttribute("shopname", shopname);
response.sendRedirect("error.jsp");
}
} catch (SQLException e) {
// TODO 自動生成 catch 塊
e.printStackTrace();
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -