2013-02-27 复习struts —— 在struts.xml中include 一个xml文件失败

现象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;

 

照上述的看来,一般指定一个类,用的 是" . " ,而指定一个文件,用" / "

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值