1.当然可以。
2.这个要在应用服务器(比如Tomcat)中看吧,需要html标签。现在好象还没有支持显示标签的页面工具吧。
3.不是很清楚你所说的“多个提交按钮”的意思,是指类似含有“新增”“修改”“删除”这样功能的按钮吗?如果是的话,只要设置一下提交的方法就可以了。比如postAction.do?postMethod=update
其中,postMethod是在struts-config.xml文件中配置的,对应的是parameter。

解决方案 »

  1.   

    楼主遇到的问题恐怕是在.java的bean里面如何控件页面的调度问题吧?用XXXX.do?action=YY()可以把这个按钮的处理指定到相应的后台文件处理,但处理完结果后怎么再返回给前台的jsp界面是这样吗?
      

  2.   

    1,2问题同1楼
    3.(其实同1楼一样)使用struts的内部类dispatchAction/lookupdispatchAction具体如何使用请自己google。或者自己在form里加1个hidden。思想其实是一样的就是传参(因为struts是把request传来传去的所以可以使用传参)。struts的内部类是通过显示传参。而加hidden是隐式传参。
      

  3.   

    dreamweaver有补丁可以调试struts标签的页面
      

  4.   

    1.2我不确定。不能乱说。呵呵自己没试验过。
    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">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <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
      

  5.   

    1。补充点东西,struts中的标签我感觉只是在和服务器端配合在有错误信息时能更好的交互,例如html:error可以显示错误信息,表单里的标签可以继续保留用户输入的原值等等。不用标签完全都能实现。
    2。标签的调试,我感觉也没啥好调的,一般错误信息都很清楚。3。dispatchAction可以实现加参数就可以了。
      

  6.   

    你看看html:form代码生成的html,就知道这两哥有什么不同了。