日期:2014-05-17  浏览次数:20791 次

求助jsp处理多个action的问题。
目前我有两个action分别是priorityOptionAction,LocationOptionAction,然后我写了两个jsp页来用selelct形式显示出来,代码如下(目前都能工作), 问题是我怎么把这两个jsp合并成一个也能工作,请问怎么做?我是新手!:
第一个jsp的代码:
<body>
<table width="100%">

<tr>
<td align="right" width="90">
<font color="red">*</font>&nbsp;priority
</td>

<td>
<html:form action="priorityOption.do">
<html:select property="priority">
<html:options collection="priorityOptionList"
labelProperty="displayname" property="id" />
</html:select>
<font color="red"><span id="typeError"></span> </font>
</html:form>
</td>


</tr>
</table>


</body>


第二个jsp是:
<body>
<table width="100%">

<tr>
<td align="right" width="90">
<font color="red">*</font>&nbsp;Location
</td>

<td>
<html:form action="locationOption.do">
<html:select property="location">
<html:options collection="locationOptionList"
labelProperty="displayname" property="id" />
</html:select>
<font color="red"><span id="typeError"></span> </font>
</html:form>
</td>
</tr>
</table>


</body>

------解决方案--------------------
没什么难度。方法很多的。
将两个Action 合并,两个处理分别调用Action里面的不同方法

------解决方案--------------------
把jsp合到一起就可以,action可以不动。
一个jsp可以存在多个form(表单)
------解决方案--------------------
你这不是jsp中怎么做
是xml中怎么做的问题