📄 golist.java
字号:
package com.store.action.gOm;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.bean.DAO.ProductoutputDAO;
import com.bean.DTO.ProductoutputDTO;
import com.bean.DTO.UserinforDTO;
import com.bean.DTO.dpageDTO;
import com.database.DataSourceFactory;
import com.servlet.AbstractAction;
import com.system.action.popedomCheck;
public class goList extends AbstractAction {
public String process(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String path = "storeManage/gOm/GOManage.jsp";
UserinforDTO udt = (UserinforDTO) request.getSession().getAttribute(
"userinfor");
popedomCheck pc = new popedomCheck(udt);
if (pc.storeCheck2()) {
ProductoutputDAO pd = new ProductoutputDAO();
dpageDTO dpt = new dpageDTO();
int pageindex = 1;
Connection con;
try {
con = DataSourceFactory.getDataSource().getConnection();
dpt.setMaxpage(pd.getmaxpage(con));
String pagestr = (String) request.getParameter("pageindex");
if (pagestr != null) {
pageindex = Integer.parseInt(pagestr);
dpt.setPageindex(pageindex);
}
List<ProductoutputDTO> plist = pd.getAlllist(
dpt.getPageindex(), con);
request.setAttribute("dpt", dpt);
request.setAttribute("plist", plist);
con.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} else {
path = "User/login.jsp";
}
return path;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -