首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

小弟我的action如何没执行啊

2012-03-26 
我的action怎么没执行啊?急啊!!!我的页面是tiaojia.jsp%@pagelanguage java import java.util.* pa

我的action怎么没执行啊?急啊!!!
我的页面   是
tiaojia.jsp
<%@   page   language= "java "   import= "java.util.* "   pageEncoding= "GB2312 "%>
<%
response.setHeader( "Pragma ",   "No-cache ");
response.setHeader( "Cache-Control ",   "no-cache ");
response.setHeader( "Expires ",   "0 ");
String   path=request.getContextPath();
%>
<%@   include   file= "/taglibs.jsp "%>
<%@   include   file= "/checkSession.jsp "%>
<html>
    <head>
        <title> 加中科技医院信息系统 </title>
        <link   href= "inc/style.css "   rel= "stylesheet ">
    </head>
    <body   >
    <form   action= "tiaojiaAction.do "   method= "post ">  
    <table   width= "100% "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "1 "   height= "100 "   class= "tableborder ">
      <tr>
      <th   class= "th "   height= "30 "   colspan= "7 "> 调价盈亏统计 </th>
      </tr>
      <tr   align= "center ">
      <td   class= "row "   height= "30 "   > 时间段: </td>
      <td   class= "row "   height= "30 "   > <input   name= "timefrom "   type= "text "   style= "width:100px "> 至 </td>
      <td   class= "row "   height= "30 "   > <input     name= "timeto "   type= "text "   style= "width:100px "> </td>
      <td   class= "row "   height= "30 "   > 消耗品名称: </td>
      <td   class= "row "   height= "30 "   > <input   name= "customername "   type= "text "   style= "width:100px "> </td>
     
      </tr>
      <tr   align= "center ">
      <td   class= "row "   height= "30 "   > 消耗品分类: </td>
      <td   class= "row "   height= "30 ">
<select     name= "customersort "     style= "width:100px "     >

    <option   value= "xiyao "   selected= "selected "> xiyao </option>
    </select>
</td>
<td   class= "row "   height= "30 ">
<input   type= "submit "   name= "Submit "   value= "统计 "   />
</td>
<td   class= "row "   height= "30 ">
<input   type= "submit "   name= "Submit "   value= "统计全部 "   />
</td>
<td     class= "row "   height= "30 ">


<input   type= "submit "   name= "Submit "   value= "打印 "   />
</td>
      </tr>
     
      <tr>
      <td   colspan= "7 ">
      <table   align=center   border= "0 "     cellspacing= "1 "   cellpadding= "0 "   class= "tableborder "   width= "100% ">
      <tr   align= "center ">
      <td   class= "th "   height= "30 "   > 调价日期 </td>
      <td   class= "th "   height= "30 "   > 名称 </td>
      <td   class= "th "   height= "30 "   > 规格 </td>
      <td   class= "th "   height= "30 "   > 厂家 </td>
      <td   class= "th "   height= "30 "   > 单位 </td>
      <td   class= "th "   height= "30 "   > 调价数量 </td>
      <td   class= "th "   height= "30 "> 原零售价 </td>
      <td   class= "th "   height= "30 "   > 零售金额 </td>
      <td   class= "th "   height= "30 "   > 现零售价 </td>
      <td   class= "th "   height= "30 "   > 零售金额 </td>
      <td   class= "th "   height= "30 "   > 调价盈亏 </td>
      </tr>
      <logic:present   name= "list ">
<logic:iterate   id= "element "   name= "list ">
      <tr   align= "center ">
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'timefrom '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'timeto '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customername '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customername '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customersort '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customersort '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customersort '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customername '/> </td>


      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'timefrom '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'customersort '/> </td>
      <td   class= "row "   height= "30 "   > <bean:write   name= 'element '   property= 'timefrom '/> </td>
      </tr>
      </logic:iterate>
</logic:present>
      </table>
      </td>
      </tr>
      </table>
      </form>
    </body>
</html>


我的struts的配置文件是

<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<!DOCTYPE   struts-config   PUBLIC   "-//Apache   Software   Foundation//DTD   Struts   Configuration   1.2//EN "   "http://struts.apache.org/dtds/struts-config_1_2.dtd ">

<struts-config>
    <data-sources   />
    <form-beans   >
        <form-bean   name= "userloginForm "   type= "com.cader.web.form.UserloginForm "   />
        <form-bean   name= "tiaojiaForm "   type= "com.cader.web.form.TiaojiaForm "   />
    </form-beans>

    <global-exceptions   />
    <global-forwards   >
    <forward   name= "sessionFailure "   path= "/checkSession.jsp "   />
    </global-forwards>
    <action-mappings   >
        <action   attribute= "userloginForm "   input= "/userlogin.jsp "   name= "userloginForm "   parameter= "modelname "   path= "/userlogin "   scope= "request "   type= "org.springframework.web.struts.DelegatingActionProxy ">
            <forward   name= "success "   path= "/h_index.jsp "   />
            <forward   name= "failure "   path= "/userlogin.jsp "   />
            <forward   name= "info "   path= "/information.jsp "   />
        </action>
        <action   path= "/modleflagFind "   type= "org.springframework.web.struts.DelegatingActionProxy ">
            <forward   name= "menuGo "   path= "/menu.jsp "   />
            <forward   name= "failGo "   path= "/fail.jsp "   />
        </action>
       
          <action   input= "/tiaojia.jsp "   name= "tiaojiaForm "   path= "/tiaojiaAction "   scope= "request "   type= "org.springframework.web.struts.DelegatingActionProxy "   validate= "true ">


              <forward   name= "success "   path= "/tiaojia.jsp "   />
            <forward   name= "failure "   path= "/failure.jsp "   />
        </action>
       
     

    </action-mappings>

    <message-resources   parameter= "ApplicationResources "   />
   
    <plug-in   className= "org.springframework.web.struts.ContextLoaderPlugIn ">
        <set-property   property= "contextConfigLocation "   value= "/WEB-INF/applicationContextT.xml,/WEB-INF/applicationContextB.xml,/WEB-INF/applicationContextA.xml,/WEB-INF/applicationContextF.xml,/WEB-INF/applicationContextC.xml,/WEB-INF/applicationContextE.xml,/WEB-INF/applicationContextD.xml,/WEB-INF/applicationContextG.xml,/WEB-INF/applicationContextX.xml,/WEB-INF/applicationContextH.xml,/WEB-INF/applicationContext.xml "/>
    </plug-in>
</struts-config>




[解决办法]
在你提交后你的浏览器地址栏中显示的是什么?

肯定是你的路径没指兑
[解决办法]
<form action= "tiaojiaAction.do " method= "post ">
--》
<html:form action= "tiaojiaAction.do " method= "post ">
<form action= "/你的应用工程名称/tiaojiaAction.do " method= "post ">
[解决办法]
既然是struts就用标签
<html:form action= "/tiaojiaAction ">
[解决办法]
不用标签,应该也没有错把
[解决办法]
<form action= "tiaojiaAction.do " method= "post "> 改成
====>
<html:form action= "tiaojiaAction.do ">
不行吗?

热点排行