我的主页index.jsp是通过main.jsp跳转的,然后经过下面的Action
public class CompanylistQryAction extends Action {
/*
* Generated Methods
*/
private ICompanyProfileService companyProfileService;
private ICompanyAdService companyAdService; public void setCompanyAdService(ICompanyAdService companyAdService) {
this.companyAdService = companyAdService;
} public void setCompanyProfileService(
ICompanyProfileService companyProfileService) {
this.companyProfileService = companyProfileService;
}
/**
* Method execute
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
System.out.println("Clint IP:"+request.getRemoteAddr()+" time:"+new Date().toLocaleString());
}第次刷新页面都执行两次,在控制台输入打印了两次,而且更奇怪的是我进行别的操作也会跑到上面这个Action中来,我用的是sprint+struts+hibernate框架技术,现在网站能正常运行,就是浪费资源,请高手指点,不胜感激!!!
public class CompanylistQryAction extends Action {
/*
* Generated Methods
*/
private ICompanyProfileService companyProfileService;
private ICompanyAdService companyAdService; public void setCompanyAdService(ICompanyAdService companyAdService) {
this.companyAdService = companyAdService;
} public void setCompanyProfileService(
ICompanyProfileService companyProfileService) {
this.companyProfileService = companyProfileService;
}
/**
* Method execute
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
System.out.println("Clint IP:"+request.getRemoteAddr()+" time:"+new Date().toLocaleString());
}第次刷新页面都执行两次,在控制台输入打印了两次,而且更奇怪的是我进行别的操作也会跑到上面这个Action中来,我用的是sprint+struts+hibernate框架技术,现在网站能正常运行,就是浪费资源,请高手指点,不胜感激!!!
你看下,是否多写了映射路径.