[求助]为什么用struts2.0的默认 jsp页面发送请求不知道传到什么地方去了
这是JSP页面的原代码:<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>updateradicate.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<html:form action="radicateAction?r=queryAll">
<table border="0">
<html:hidden property="rid" />
<tr>
<td>
项目名称:
</td>
<td>
<html:text property="name" />
</td>
</tr>
<tr>
<td>
项目类型:
</td>
<td>
<html:text property="type" />
</td>
</tr>
<tr>
<td>
用户名称:
</td>
<td>
<html:text property="uname" />
</td>
</tr>
<tr>
<td>
客户名称:
</td>
<td>
<html:text property="cname" />
</td>
</tr>
<tr>
<td>
总金额:
</td>
<td>
<html:text property="saleMoney" />
</td>
</tr>
<tr>
<td>
开发周期:
</td>
<td>
<html:text property="periods" />
</td>
</tr>
<tr>
<td>
预算费用:
</td>
<td>
<html:text property="budgerMoney" />
</td>
</tr>
<tr>
<td>
立项时间:
</td>
<td>
<html:text property="liDate" />
</td>
</tr>
<tr>
<td>
大概利润:
</td>
<td>
<html:text property="gainMoney" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit>更新项目</html:submit>
</td>
<td>
<html:reset>重置</html:reset>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
下面是action代码:
package com.aptech.pz.struts.action;
import java.sql.Connection;
import java.sql.Statement;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.hibernate.Session;
import com.aptech.hbm.HibernateSessionFactory;
import com.aptech.pz.service.IRadicateService;
import com.aptech.pz.service.RadicateService;
import com.aptech.pz.struts.form.RadicateForm;
import com.aptech.pz.vo.RadicateVo;
import com.aptech.tools.ConsoleDate;
public class RadicateAction extends DispatchAction {
private IRadicateService rservice = new RadicateService();
public ActionForward queryAll(ActionMapping mapping, ActionForm action,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
List<RadicateVo> listvo = rservice.queryAll();
request.setAttribute("list", listvo);
return new ActionForward("/radicatelist.jsp");
}
public ActionForward loadRadicate(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
RadicateForm radicateform = (RadicateForm) form;
String strid = request.getParameter("rid");
int rid = Integer.parseInt(strid);
RadicateVo rvo = rservice.loadRadicate(rid);
radicateform.setRid(rid);
radicateform.setName(rvo.getName());
radicateform.setType(rvo.getType());
radicateform.setCid(rvo.getCid());
radicateform.setUid(rvo.getUid());
radicateform.setCname(rvo.getCname());
radicateform.setUname(rvo.getUname());
radicateform.setSaleMoney(rvo.getSaleMoney());
radicateform.setBudgerMoney(rvo.getBudgerMoney());
radicateform.setLiDate(ConsoleDate.String2Date(rvo.getLiDate()));
radicateform.setPeople(rvo.getPeople());
radicateform.setPeriods(rvo.getPeriods());
radicateform.setGainMoney(rvo.getGainMoney());
return new ActionForward("/updateradicate.jsp");
}
public ActionForward updateRadicate(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
RadicateForm radicateForm = (RadicateForm) form;
String strid = request.getParameter("rid");
int rid = Integer.parseInt(strid);
RadicateVo rvo = rservice.loadRadicate(rid);
System.out.println(radicateForm.getCid());
rvo.setRid(rid); rvo.setName(radicateForm.getName());
rvo.setType(radicateForm.getType());
rvo.setCid(radicateForm.getCid());
rvo.setCname(radicateForm.getCname());
rvo.setUid(radicateForm.getUid());
rvo.setUname(radicateForm.getUname());
rvo.setSaleMoney(radicateForm.getSaleMoney());
rvo.setPeriods(radicateForm.getPeriods());
rvo.setBudgerMoney(radicateForm.getBudgerMoney());
rvo.setLiDate(ConsoleDate.Date2String(radicateForm.getLiDate()));
rvo.setPeople(radicateForm.getPeople());
rvo.setGainMoney(radicateForm.getGainMoney());
rservice.updateRadicate(rvo);
return new ActionForward("/radicateAction.do?r=queryAll");
}
public ActionForward deleteRadicate(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
RadicateForm radicateform = (RadicateForm) form;
String strid = request.getParameter("rid");
int rid = Integer.parseInt(strid);
RadicateVo rvo = rservice.loadRadicate(rid);
rservice.deleteRadicate(rvo.getRid());
System.out.println("删除项目成功!!!");
return new ActionForward("/radicateAction.do?r=queryAll");
}
}
不知道怎么搞的,当点更新的时时候就不知道请求发送到那里去了,搞了好久都没搞出来,请教各位大虾