在开发中通常需要用到多个配置文件,可以通过在web.xml中添加以下代码:

<include file="login.xml"></include>

将src中的login.xml集成到web.xml中

xml的编码问题:若xml中出现编码问题,则加上以下代码:

<constant name="struts.i18n.encoding" value="UTF-8"></constant>

默认action的设置:

  在struts.xml中添加以下代码:

  <default-action-ref name="error"></default-action-ref>

  <action name="error">

    <result >/error.jsp</result>

  </action>

  再在webroot里添加error.jsp,则在输入网址无效的情况下会自动执行error.action

伪造网页后缀:

  在struts.xml中添加以下代码:

  <constant name="struts.action.extension" value="html"></constant>

  则http://localhost:8080/test/helloworld.action可改写为http://localhost:8080/test/helloworld.html

  此时依然可以访问

最新文章

  1. .NET 平台下的插件化开发内核(Rabbit Kernel)
  2. matlab和C/C++混合编程--调用opencv
  3. 重拾Ajax
  4. iOS多线程初见
  5. JSON解析保存在类中
  6. Windows API获取系统配置文件的配置参数
  7. linode更换Linux内核教程(独家)
  8. use include to read a file
  9. 在CentOS 7.3 中安装 NVIDIA GT730 显卡驱动
  10. Windows -- 从注册表删除IE浏览器加载项
  11. 写在最前面 - 《看懂每一行代码 - kubernetes》
  12. CodeForces - 455C Civilization (dfs+并查集)
  13. mark_save
  14. 1-Lombok工具使用
  15. jquery ajax error函数和及其参数详细说明(转载)
  16. HBase(九)HBase表以及Rowkey的设计
  17. 正则表达式入门(c#)
  18. CSS浏览器兼容问题集-第四部分
  19. 超级干货,python常用函数大总结
  20. DFT到FFT的理解

热门文章

  1. dom 兼容性问题1_节点部分
  2. Linux命令之sort用法
  3. wpf 界面平级之间设置上下顺序关系(ZIndex)
  4. 分享知识-快乐自己:mysql数据库常见两种引擎
  5. Python压缩脚本编辑
  6. Django 基础 路由系统
  7. C# GDI+编程
  8. windows下mysql提示Can&#39;t connect to MySQL server on &#39;localhost&#39;
  9. map的内存分配机制分析
  10. 前端用户输入校验--基于JQ