2013-02-27 复习struts —— 在struts.xml中include 一个xml文件失败
2013-03-02 09:17
375 查看
现象1:tomcat控制台:
信息: Unable to locate configuration files of the name com.wakata.struts2.action
.updown.strut2-updown.xml, skipping
2013-2-27 22:07:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
现象2:strut2-updown.xml的内容放到strtus.xml中运行正常
========================
解决:
这里出现Unable to locate configuration files of the name com.wakata.struts2.action
.updown.strut2-updown.xml, skipping
可能是因为com.wakata.struts2.action.updown.strut2-updown.xml写错了
试把它改成:<include file="com/wakata/struts2/action/updown/strut2-updown.xml"/>
重启tomcat,控制台没有报这个错了。
尝试访问strut2-updown.xml中描述的action,成功!
============================
总结:
struts.xml中::<include file="com/wakata/struts2/action/updown/strut2-updown.xml"/>
hibernate.cfg.xml中:<mapping resource="com/wakata/test/pojo/test2pojo-hiber.cfg.xml"/>
jsp中引入一个文件:<script type="text/javascript" src="../js/jQuery1.4.1.js"></script> (img标签的src也是用/)
struts.xml和web.xml中的<class> :<servlet-class>com.wakata.servlet.LoginServlet</servlet-class>
java中引入一个类:import java.util.ArrayList;
照上述的看来,一般指定一个类,用的 是" . " ,而指定一个文件,用" / "
信息: Unable to locate configuration files of the name com.wakata.struts2.action
.updown.strut2-updown.xml, skipping
2013-2-27 22:07:12 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
信息: Parsing configuration file [struts.xml]
现象2:strut2-updown.xml的内容放到strtus.xml中运行正常
========================
解决:
这里出现Unable to locate configuration files of the name com.wakata.struts2.action
.updown.strut2-updown.xml, skipping
可能是因为com.wakata.struts2.action.updown.strut2-updown.xml写错了
试把它改成:<include file="com/wakata/struts2/action/updown/strut2-updown.xml"/>
重启tomcat,控制台没有报这个错了。
尝试访问strut2-updown.xml中描述的action,成功!
============================
总结:
struts.xml中::<include file="com/wakata/struts2/action/updown/strut2-updown.xml"/>
hibernate.cfg.xml中:<mapping resource="com/wakata/test/pojo/test2pojo-hiber.cfg.xml"/>
jsp中引入一个文件:<script type="text/javascript" src="../js/jQuery1.4.1.js"></script> (img标签的src也是用/)
struts.xml和web.xml中的<class> :<servlet-class>com.wakata.servlet.LoginServlet</servlet-class>
java中引入一个类:import java.util.ArrayList;
照上述的看来,一般指定一个类,用的 是" . " ,而指定一个文件,用" / "
相关文章推荐
- 一个比较完整的Struts-config.xml配置文件
- Struts 2 学习笔记 - 3.配置文件深入(1):struts.xml,bean,constant,package,namespace,include
- linux php文件include失败 一个很神奇的问题
- struts 点击jar包中的文件Path must include project and resource name: /struts-default.xml
- struts配置文件l中使用include 标签 引入另外一个在jar中的struts文件
- 一个比较完整的Struts-config.xml配置文件
- 在struts2的配置文件中用图形化的界面快速include其他struts.xml
- struts配置文件l中使用include 标签 引入另外一个在jar中的struts文件
- 35-002-1 struts前期之 通过JAVA反射机制及XML配置文件解析自定义一个MVC的简单框架
- 不用配置Action和Result的struts.xml配置文件
- struts.xml配置文件(package,namespace,action)
- BAM部署失败 - 未能加载”AdomdClient”或它的某一个依赖项。系统找不到指定的文件
- struts2中struts.xml和web.xml文件解析及工作原理
- struts2.0中struts.xml配置文件详解
- 在XML中加入皮肤后,最好专门建一个skin文件
- Struts-config.xml配置文件讲解(一)
- 一个python 脚本将XML文件转换到excel
- spring的xml配置文件中获取jdbc.properties乱码导致连接数据库失败
- 【Struts】Struts2.0中struts.xml配置文件详解
- 节点文件将两个不同格式的XML文件,进行节点对照,并生成一个用于对照功能的XML