1.当然可以。
2.这个要在应用服务器(比如Tomcat)中看吧,需要html标签。现在好象还没有支持显示标签的页面工具吧。
3.不是很清楚你所说的“多个提交按钮”的意思,是指类似含有“新增”“修改”“删除”这样功能的按钮吗?如果是的话,只要设置一下提交的方法就可以了。比如postAction.do?postMethod=update
其中,postMethod是在struts-config.xml文件中配置的,对应的是parameter。
2.这个要在应用服务器(比如Tomcat)中看吧,需要html标签。现在好象还没有支持显示标签的页面工具吧。
3.不是很清楚你所说的“多个提交按钮”的意思,是指类似含有“新增”“修改”“删除”这样功能的按钮吗?如果是的话,只要设置一下提交的方法就可以了。比如postAction.do?postMethod=update
其中,postMethod是在struts-config.xml文件中配置的,对应的是parameter。
解决方案 »
- http://schemas.xmlsoap.org/soap/envelope/}Server.userException
- 崩溃的IE浏览器
- 各位大虾好,小弟在用hibernate中出现了一个问题,请帮助解决一下!
- IXXXDao 存在的意义
- spring事务aop配置问题
- struts+hibernate+mysql3.1的乱码问题,困饶多天,请高手指点!!!
- 第二次发贴,希望DX们能给予帮助.
- 关于ant??
- 谁做过更改java.c来保护JAVA源代码?急!!!
- hibernate 访问oracle ORA-12505,
- 对J2EE的几个问题请教大家。
- Java中表示Nubmer的数据类型
3.(其实同1楼一样)使用struts的内部类dispatchAction/lookupdispatchAction具体如何使用请自己google。或者自己在form里加1个hidden。思想其实是一样的就是传参(因为struts是把request传来传去的所以可以使用传参)。struts的内部类是通过显示传参。而加hidden是隐式传参。
3你可以用脚本写。给你个我以前写的小东西。看了就懂
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ include file="head.txt" %>
<html:html locale="true">
<head>
<script language="JavaScript">
function searchButton(){
window.document.forms[0].action="SearchBook.do";
window.document.forms[0].submit();
}
function buyButton(){
window.document.forms[0].action="buyOrderList.do";
window.document.forms[0].submit();
}
</script>
</head>
<body bgcolor =Teal> <br>
<br> <br> <br>
<html:form action="/SearchBook.do">
<bean:message key="Hello"/>
<bean:write name="UserID"/>
<center>
<table border='10'>
<bean:message key="in.put.bookISBN"/>
<html:text property="bookISBN" size="8" maxlength="8"/>
<html:button property="search" onclick="searchButton();">
<bean:message key="search.submit"/>
</html:button>
<br>
<br>
<br>
<logic:equal name="aaa" value="tableHeader">
<tr>
<td><bean:message key="bookList.bookISBN"/></td>
<td><bean:message key="bookList.bookName"/></td>
<td><bean:message key="bookList.author"/></td>
<td><bean:message key="bookList.publishName"/></td>
<td><bean:message key="bookList.category"/></td>
<td><bean:message key="bookList.price"/></td>
<td><bean:message key="bookList.quantity"/></td>
<td><bean:message key="bookList.submit"/></td>
</tr>
</logic:equal>
<logic:iterate id="q" name="resultList" >
<tr>
<td><bean:write name="q" property="bookISBN"/></td>
<td><html:hidden name="q" property="bookName" write="true"/></td>
<td><bean:write name="q" property="author"/></td>
<td><bean:write name="q" property="publishName"/></td>
<td><bean:write name="q" property="category"/></td>
<td><bean:write name="q" property="price"/></td> <td><html:text property="quantity" size="4" maxlength="4"/> </td>
<td>
<html:button property="buy" onclick="buyButton();">
<bean:message key="bookList.submit"/>
</html:button>
</td>
</tr>
</logic:iterate>
</table>
</center>
</html:form>
<html:errors/>
</body>
</html:html>
其中有两个按钮
一个查询,一个修改。这里用BUTTON不是用submit
2。标签的调试,我感觉也没啥好调的,一般错误信息都很清楚。3。dispatchAction可以实现加参数就可以了。