struts2中有一个execAndWait的默认拦截器,如果action执行时间过长,该拦截器就会产生一个中间的等待页面,请问怎么样修改等待页面的内容和样式。请高手回答,大家一起讨论!小弟目前还没有毕业,在校参加了一些小项目,想知道商业代码和自己代码的差距.所以跪求商业化的项目源代码!邮箱[email protected]

解决方案 »

  1.   

    附:struts2中,如果用了struts2自带的标签,格式就会乱,请问怎么样排版!
      

  2.   

    1.为你Action的Result(全局也可以)设置一个:
    <action name="**" class="com.leo.action.**Action">
    <result type="freeer">/face/sm/rolemanager/roleList.jsp</result>
        ............................
    </action>2.在struts.properties 下设置#你要使用的主题
    struts.ui.theme=xhtml
    #存放路径(从classpath开始)
    struts.ui.templateDir=template
    #模板扩展名
    struts.ui.templateSuffix=ftl比如说,你要修改xhtml主题, 打开你下载的Struts2源码包的路径
    struts-2.0.11\src\core\src\main\resources\template\xhtml修改里面的ftl文件, 然后覆盖struts2.jar中的xhml文件夹,即可。
      

  3.   

    晕,提交不能修改1.为你Action的Result(全局也可以)设置一个:
    <action name="**" class="com.leo.action.**Action">
    <result type="freeer">/face/sm/rolemanager/roleList.jsp </result>
        ............................
    </action> 应该改成:
    1.为你Action的Result(全局也可以)设置一个:<action name="**" class="com.leo.action.**Action">
    <result name="wait" type="freeer">/你自己的路径/wait.ftl </result>
        ............................
    </action> 
      

  4.   

    每个 struts2  标签中都有个 theme  属性  设置成  simple 就行了
    不会 自动套用 格式了