Archive for the ‘java’ Category
Published by
admin on
02月 8, 2012
Deployment failure on Tomcat 6.x. Could not copy all resources to C:\tomcat6\webapps\OAPMS. If a file is locked, you can wait until the lock times out to redeploy, or stop the server and redeploy, or manually remove the deployment at C:\tomcat6\webapps\OAPMS
问题已解决,记得之前遇到过一次,但这次和前一次又不一样,解决办法:
1. 查看工程下的.mymetadata 看是否少了一个context-root=“” 属性,少的话,加上,值和前边的name属性一样,比如我的:
<?xml version=”1.0″ encoding=”UTF-8″?>
<project-module
type=”WEB”
name=”OAPMS”
id=”myeclipse.1191910938406″
context-root=”/OAPMS”
j2ee-spec=”1.4″
archive=”OAPMS.war”>
<attributes>
<attribute name=”webrootdir” value=”WebRoot” />
</attributes>
</project-module>
Read the rest of this entry »
Published by
admin on
02月 4, 2012
java.lang.NoClassDefFoundError: com/uwyn/rife/continuations/ContinuationConfig
com.opensymphony.webwork.dispatcher.mapper.ActionMapperFactory.getMapper(ActionMapperFactory.java:31)
com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:88)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
缺少rife-continuations.jar
Published by
admin on
02月 3, 2012
在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误…..,查找的解决办法如下:
一:
It is indirectly referenced from required .class file原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。
解决方法:导入缺失的包
Read the rest of this entry »
Published by
admin on
12月 20, 2011
webwork配置文件主要有两个:web.xml和xwork.xml
1.webwork.xml:
(1)在webwork2.2之前,一个ServletDispatcher 被用来处理action请求。相关的配置文件如下:
<servlet>
<servlet-name>webwork</servlet-name>
<servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Read the rest of this entry »
Published by
admin on
12月 20, 2011
这个问题是一个比较容易忽略的问题,但是确是必须实现的。首先说明下情况我们使用下拉框有两种: 1.<ww:selectname=”downfileuserlinkForm.downfileusersort.sortId” list=”sortMap”required=”true” headerKey=”0″ headerValue=”——” />
或者是:<ww:select name=”searchUsermoneylogForm.searchactionType” list=”actiontypeList” theme=”simple” listKey=”actionId” listValue=”actionName” />
Read the rest of this entry »
Published by
admin on
12月 20, 2011
1.webwork2 EL:表达式语言;OGNL:对象导航图语言
2.使用表达式语言的目的就是消除重复代码使程序变得更简单,使表现层的代码更简单。
3.OGNL和EL的用法:
OGNL使用小结(一)
最近一直使用struts2,表现层采用JSP,用的struts2标签,支持OGNL。 OGNL中的# $ %使用场景:
1、“#”主要有三种用途:
Published by
admin on
10月 29, 2011
MySQL:
String Driver=”com.mysql.jdbc.Driver”; //驱动程序
String URL=”jdbc:mysql://localhost:3306/db_name”; //连接的URL,db_name为数据库名
String Username=”username”; //用户名
String Password=”password”; //密码
Class.forName(Driver);
Connection con=DriverManager.getConnection(URL,Username,Password);
Read the rest of this entry »
Published by
admin on
10月 29, 2011
首先应该保证数据库的服务启动
在myeclipse的数据库视图中点 右键->new 弹出database driver的窗口,
Driver template选择oracle(thin driver),
Driver name 输入oracle
connection URL=jdbc:oracle:thin:@localhost:1521:oracle 注意localhost:1521:oracle中的oracle是数据库得sid换成你自己数据库的sid就可以
username:登陆数据库具有system权限的用户名
password:登陆数据库具有system权限的密码
点击add jar 选择ojdbc14.jar的存放位置,没有得可以到百度下一个叫ojdbc14.jar的文件。
点击test driver 到此成功配置。
Read the rest of this entry »
Published by
admin on
10月 29, 2011
web应用连接oracle数据库时,经常在查询数据时发生
Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: 127.0.0.1:1521:ORCL
这种错误,网上查了很多,都说是ip地址改变之后的问题,要把tnsnames.ora中的实例配置中改为计算机名,我试过之后问题还是不能解决,今天终于找到问题所在了,是数据库连接数量的问题,12519错误为监听不能提供服务,通常为数据库进程达到上限导致。
Read the rest of this entry »
Published by
admin on
08月 12, 2011
执行 Ant 脚本时弹出窗口出现以下错误:
—————————
Java Virtual Machine Launcher
—————————
Could not find the main class. Program will exit.
—————————
确定??
—————————
这种错误对用过 Java 的人来说还是很明白,找不到 Ant 的主类吗。不过说实话也困扰过我一段时间,也没去深究。说开了,症结就是 Eclipse 中的 ANT_HOME 指向不对。
Read the rest of this entry »