public class Page
{
private int startRow;
private int pageSize; public int getStartRow()
{
return startRow;
} public void setStartRow(int startRow)
{
this.startRow = startRow;
} public int getPageSize()
{
return pageSize;
} public void setPageSize(int pageSize)
{
this.pageSize = pageSize;
}}
{
private int startRow;
private int pageSize; public int getStartRow()
{
return startRow;
} public void setStartRow(int startRow)
{
this.startRow = startRow;
} public int getPageSize()
{
return pageSize;
} public void setPageSize(int pageSize)
{
this.pageSize = pageSize;
}}
{
public String currentPage;
public String pagerMethod; public PageAction()
{
} public String getCurrentPage()
{
return currentPage;
} public void setCurrentPage(String currentPage)
{
this.currentPage = currentPage;
} public String getPagerMethod()
{
return pagerMethod;
} public void setPagerMethod(String pagerMethod)
{
this.pagerMethod = pagerMethod;
} public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
currentPage = request.getParameter("currentPage");
pagerMethod = request.getParameter("pagerMethod");
if (null == currentPage)
currentPage = "1";
if (null == pagerMethod)
pagerMethod = "first"; return mapping.findForward("suc");
}
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
String currentPage = request.getParameter("currentPage");
String pagerMethod = request.getParameter("pagerMethod");
if (null == currentPage)
currentPage = "1";
if (null == pagerMethod)
pagerMethod = "first";
..........
}
子类
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
super.execute(mapping, form, request, response);
................
}