摘要: 1 package com.sdlc.action; 2 3 public class HelloWorldAction { 4 5 private String msg; 6 7 public void setMessage(String message) { 8 this.msg = message; 9 }10 11 public String getMessage() {12 return msg;13 }14 15 public String execute()16 {17... 阅读全文
posted @ 2013-10-16 11:40 凤凰骑士 阅读(145) 评论(0) 推荐(0) 编辑
摘要: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtilsCaused by: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtil目测缺少commons-lang-2.5.jar包在web-inf->lib下添加后重启Tomcat即可。 阅读全文
posted @ 2013-09-04 11:49 凤凰骑士 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 昨天解决了jre找不到的问题后,今天启动Eclipse之后,想把刚配置好的struts2工程发布到到tomcat上,报了一个错:Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4,and Java EE 5 Web moduleshttp://images.cnitblog.com/blog/551838/201309/04111805-32806c9a432e44da85ceea82ad934d06.png经过查询,原因是在新建Dynamic Web Project 时,选择的version是3.0,网上说 Dynamic Web Modu 阅读全文
posted @ 2013-09-04 11:20 凤凰骑士 阅读(1265) 评论(0) 推荐(0) 编辑
摘要: 之前更改了了一个较低的jdk的版本看了看一个项目的代码,不知所云,然后再改回来,混乱之中只要启动Tomcat就出现这种错误,还是无法找到JRE,最后如此解决:在Windows->Preferences->Server->Runtime Environments选择Tomcat->Edit,在jre中选择相应的jdk版本,完事。 阅读全文
posted @ 2013-09-03 18:05 凤凰骑士 阅读(2167) 评论(0) 推荐(0) 编辑
摘要: 找了一个程序粘贴到txt文档中,随便起个名为abc,然后改后缀为.java,接下来在dos中运行时出现以上错误打开abc.java看了看,声明public class了,但是名字是粘贴过来的类名WorldFor,哎,忘了文件名要与唯一的顶级公共类的类名一致了······ 阅读全文
posted @ 2013-09-02 09:05 凤凰骑士 阅读(2625) 评论(0) 推荐(0) 编辑
摘要: java.lang.NoSuchMethodError:mainExceptioninthread"main" 一般是主函数出问题检查核对一下 public static void main (String[] args) 阅读全文
posted @ 2013-08-09 14:56 凤凰骑士 阅读(722) 评论(0) 推荐(0) 编辑
摘要: 在编译一个例子时,结果编译时出现:No enclosing instance of type test8 is accessible. Must qualify the allocation with an enclosing instance of type W (e.g. x.new A() where x is an instance of W).(W为文件名)根据提示,没有可访问的内部类W的实例,必须分配一个合适的内部类W的实例(如x.new A(),x必须是W的实例。)但是我已经实例化了这个类,为什么还不行呢。经过查询相关资料。原来我写的内部类是动态的,也就是开头以public cl 阅读全文
posted @ 2013-08-09 11:54 凤凰骑士 阅读(572) 评论(0) 推荐(0) 编辑