namespace 决定了action的访问路径,默认为"",可以接收所有路径的action,当精确的index.action处理不了的时候,就会找到这个action;
namespace 可以写为/,或者/xxx,或者/xxx/yyy,对应的action访问路径为/index.action,/xxx/index.action,或者/xxx/yyy/index.action.
namespace最好也用模块来进行命名,比如 "/front" 代表前台、"/backend" 代表后台。

代码链接 提取码:ejk6

Struts2_Namespace的更多相关文章

随机推荐

  1. jeesite 框架的简单应用

    个人觉得比较完善的一个讲解jeesite的网站 https://www.w3cschool.cn/jeesite/ jeesite官网 http://jeesite.com/ 公司项目都是基于jees ...

  2. [转]SQL truncate 、delete与drop区别

    转自: https://www.cnblogs.com/8765h/archive/2011/11/25/2374167.html 相同点: 1.truncate和不带where子句的delete.以 ...

  3. Java快速IO(ACM)必备

    en.... 无非用到的是 1. new Scanner(System.in); 2.new BUfferReader(new InputStreamReader(System.in); 3.Syst ...

  4. js 时间日期大小对比

    var oDate1 = new Date(); var oDate2 = new Date("2019/01/07 10:00:00"); if (oDate1.getTime( ...

  5. java Response 设置中文编码

    response.setHeader("Content-type", "text/html;charset=UTF-8"); response.setChara ...

  6. Github如何在Linux系统下创建本地仓库

    一.电脑上安装 Git Ubuntu安装GIt:  apt-get install git 查看版本信息:    git version 配置Git用户信息  输入: git config --glo ...

  7. Life is a journey

    Life is a journey. What we should care about is not where it's headed but what we see and how we fee ...

  8. hdu-4513吉哥系列故事——完美队形II--最长回文

    吉哥系列故事——完美队形II Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)To ...

  9. TensorFlow入门测试程序

    import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist=input_data. ...

  10. java——多线程的实现方式、三种办法解决线程赛跑、多线程数据同步(synchronized)、死锁

    多线程的实现方式:demo1.demo2 demo1:继承Thread类,重写run()方法 package thread_test; public class ThreadDemo1 extends ...