初学strtus2的问题解决
来源:互联网 发布:招聘宝软件怎么样 编辑:程序博客网 时间:2024/05/29 18:46
Strtus2遇到的问题:
1 Unable to load configuration. - bean - :file:/D:/Tomcat6.0/webapps/ss/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:46:178
答案:http://blog.chinaunix.net/u/22371/showart_1868796.html
2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatch错误?
答案:你是把所有的struts2的jar包都添加了吗?我曾把所有的都加进去了,就犯这个错误,因为有的jar需要别的jar的支持。你把不用的jar都删了,如关于spring的,等等,只留一些该留的。jar包要精简。如果要是有javaservlet的错误可以把servlet包加入。把tomcat中的这个包去掉。
3 警告: Could not find action or result
There is no Action mapped for namespace / and action name HelloWorld. - [unknown location]
答案:
1. 要将struts.xml配置文件放在src下,而不是某个package下或者其它地方,这样才能
保证WEB-INF/classes下有编译的类文件和struts.xml的配置文
2. 在struts.xml中,如果在package中定义了命名空间,如namespace="/com/leo/action",那 么在浏览器中url就必须带package的信息, http://localhost:8080/Struts2Demo/com/leo/action/HelloWorld.action如果没有定义namespace, 则http://localhost:8080/Struts2Demo/com/leo/action/HelloWorld.action 和 http://localhost:8080/Struts2Demo/HelloWorld.action
都可以的
3. 注意拼写,比如struts写成structs,stuts;default写错了等等
4 警告: Could not find action or result
No result defined for action tutorial.HelloWorld and result success
答案是:实验把SUCCESS 改为小写或者是去掉。应为她是有默认值的。再就是要看action了。
5 Expression parameters.formName is undefined on line 101, column 43 in template/simple/doubleselect.ftl.
The problematic instruction:
----------
==> ${parameters.formName} [on line 101, column 41 in template/simple/doubleselect.ftl]
in include "/${parameters.templateDir}/simple/doubleselect.ftl" [on line 25, column 1 in template/xhtml/doubleselect.ftl]
答案:因为表单没有form 没有name属性
- 初学strtus2的问题解决
- 初学strtus2中validate方法
- strtus2的学习笔记
- Strtus2的基本使用
- Strtus2 struts-cleanup的用途
- Strtus2的一些配置描述
- Strtus2和SpringMVC的区别
- Strtus2 简单的小列子
- strtus2里的struts.xml的配置
- Strtus2.0+JSON+prototype AJAX的实现
- strtus2 struts.xml的书写规则
- 关于strtus2上传文件的问题
- Maven2下Strtus2的配置实例
- web中的checkbox以及strtus2的CheckboxInterceptor
- Strtus2的ValueStack、ActionContext及Stack Context
- strtus2拦截器的小小总结!
- Spring4 hibernate4与strtus2的整合
- Strtus2的Action方法匹配模式
- 常见排序算法总结
- 字符拆分排列组合
- Win32API大全
- choose a Rolex wristwatch for yourself as well
- 如何编写firefox插件
- 初学strtus2的问题解决
- VS2005中的外观文件如何使用
- 急,谁能帮我下,万分感谢
- SAP笔记-abap 银行对账功能开发
- vs2005 sp1 补丁的安装问题
- NHibernate之旅(8):巧用组件之依赖对象
- vmware+redhat9 摄像头驱动安装之方法二
- Servlet学习
- NHibernate之旅(9):探索父子关系(一对多关系)