另外说下,我没有用s标签的表单,都是普通的html、

解决方案 »

  1.   

    <action name="*" class="com.struts2.web.action.HouseAction" method="{1}">  
            <result name="listPage">/WEB-INF/system/page/house_list.jsp</result>  
            <result name="detail">/WEB-INF/system/page/house_detail.jsp</result>  
            <result name="detail">/WEB-INF/system/page/house_detail.jsp</result>  
            <result name="loadSuccess">/WEB-INF/system/page/saveHouse.jsp</result>  
              
            <param name="savePath">/attach</param>  
                <interceptor-ref name="defaultStack">  
                      <!-- 配置允许上传的文件类型,多个用","分隔 -->  
                      <param name="fileUpload.allowedTypes">  
                        image/bmp,image/png,image/gif,image/jpeg,image/jpg ,image/x-png, image/pjpeg  
                      </param>  
                      <!-- 配置允许上传的文件大小,单位字节 -->  
                      <param name="fileUpload.maximumSize">102400</param>  
                </interceptor-ref>  
            <result name="saveSuccess">/WEB-INF/system/page/saveHouseSuccess.jsp</result>  
            <result name="input">/WEB-INF/system/page/saveHouseFail.jsp</result>  
        </action>