myeclipse8.5   登录界面login.html放在了webRoot下,提交表单,进入 com.test.action.user包下得loginAction,成功后如何跳转到web-inf下的content下得 user下得a.html    谢谢!
最好能讲下为什么..

解决方案 »

  1.   

    为什么跳转到web-inf目录下?跳转直接在配置文件的result里写路径就可以了。
      

  2.   

    login.html 不能和要跳转的页面 放到一个目录下么?
      

  3.   

    action中方法return的字符串与struts.xml中result的name对应:action中:
    return "ok"struts中:
    <result name="ok">/xxx.jsp</result>
    xxx为你指定的路径包括包名与文件名.
      

  4.   

    为什么要跳转到Web-inf下,web-inf下一般是放配置文件的,webroot才根目录,既然是jsp那么所有的页面就应该是webroot下啊。
      

  5.   

    struts.xml里<action name="login" class="com.test.action.user.loginAction">
    <result name="success">/WEB-INF/content/user/a.html</result>
    </action>
    不行吗?
      

  6.   

    WEB-INF里的页面不能直接访问,这样放比较安全