jsp向action传值
kln78 2008-06-18 05:34:27 pageAdd.action:
String edit=null;
edit=request.getParameter("edit");
//如果从pagetest.jsp页转过来且点新增,就转向填加页add.jsp
if(edit.equals("new")){
edit="add";
request.setAttribute("edit", edit);
return mapping.findForward("success");
}
add.jsp
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<bean:define id="tempid" name="edit" type="java.lang.String"/>
<html:form action="/pageAdd.do?edit=<%=tempid%>">
名称:<html:text property="title"></html:text>
内容:<html:text property="content"></html:text>
<html:submit>submit</html:submit>
</html:form>
</body>
</html:html>
问题:tempid为空