继承DispatchAction,在配置文件中定你的参数:
<action input="" name=""
parameter="yourParam" path="" type="">
<forward name="" path=""/>
<forward name="" path=""/>
...
</action>
<action input="" name=""
parameter="yourParam" path="" type="">
<forward name="" path=""/>
<forward name="" path=""/>
...
</action>
解决方案 »
- java ServerSocket的问题
- 整合 struts 2+ spring + hibernate 所需要的jar包
- jbpm4.3 task.getFormResourceName() 为空,怎么回事啊?
- 看过v512SSH视频的朋友说说,服务层有什么用?
- php服务端,xfire客户端,webservice开发的问题
- 带参数的方法配置成action的问题
- 弱的一下,不用jsp界面,而直接放servlet在配置文件中的映射,doget()是如何被调用的?
- 请问weblogic集群下,指定server处理请求的问题
- tomcat 5.59 运行一个多月就要死一次,知道什么原因吗??
- apache 和tomcat的问题
- 如何在Struts标签的属性里面嵌套JSP脚本?
- 请教一循环语句问题??
type="dtt.icp.web.content.ContentAddAction"
validate="true"
input="/contentAdd.jsp"
scope="request"
path="/contentAdd">
<forward name="success" path="/success.jsp" />
<forward name="cancel" path="/contentMain.jsp" />
</action>
我觉得这种方式比较容易理解,实现也很简单
可以!
在上面框架中建立对应操作的函数,内容为
function oper_delete()
{
var oper_delete=parent.contentFrame.document.forms[0].oper1.value;
parent.contentFrame.document.forms[0].action = oper_delete;
parent.contentFrame.document.forms[0].submit();
}
function oper_edit()
{
var oper_edit=parent.contentFrame.document.forms[0].oper2.value;
parent.contentFrame.document.forms[0].action = oper_edit;
parent.contentFrame.document.forms[0].submit();
}
按钮调用函数,即可以实用通用了,条件是下面框架页面中都需加入隐藏框.现又有一问题,想赋单选按钮的值为后台取出的数据,要怎样才能做到,象这样<html:radio property="selectRecord" value='+ <bean:write name="loop" property="hou_id" /> +' />
但是会报错,请问应该如何实现?
<html:radio property="selectRecord" value="1" name="session_bean_name"/>
javabean初始化后,选定的radio就会被选择,不用赋值了
<input type="radio" name="selectRecord" value='<bean:write name="loop" property="hou_id" />'>
就可以执行了.还有一问题,在Action里定义了query和delete, 需要运行delete后立即运行query,就问如何能实现.
public class HousQueryAction extends DispatchAction { public ActionForward query(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
HouseManage hm = new HouseManage();
String hou_cardNo = ((HousQueryForm) form).getHou_CardNo();
String hou_Hold = ((HousQueryForm) form).getHou_Hold();
......... public ActionForward delete(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
HouseManage hm = new HouseManage();
String hou_Id = ((HousQueryForm)form).getSelectRecord() ;
.......