Archive for the ‘编程’ 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月 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
01月 29, 2012
需要把之前用jq来做的图片改”黑白”转成dojo实现
思路
么有思路..囧. 网上找到解决办法. 大概是如下这样. 因为需求说明了, 针对非IE浏览器.
- 在canvas中绘制出目标图像.
- 获取图像的所有像素点, getImageData().
- 遍历所有像素, 将RGB转换为灰度值(灰度值对应的RGB三个值相等. 即R=G=B=灰度值)
- 将处理之后的图片数据重新载入原图片, putImageData()
这里涉及到一个灰度值的计算公式, 网上找了些, 老版本的解决方案是grayscale= (R+G+B)/3, 然后将grayout赋值给RGB, 这个不够精确, 新版本为grayscale = R*0.3+G*0.59+B*0.11.
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
11月 6, 2011
超链接:
a:link{ color :#00688B;text-decoration:none;font-size: small}//未
a:hover{ color :#000000;text-decoration:underline}
a:active{ color :Gray ;text-decoration:underline}
a:visited{ color :#00688B;text-decoration:none;font-size: small }//过
水平线:
<hr size=”1″ style=”border-style: dotted dotted none; border-bottom: medium none;”>
1、普通分隔线:<hr>
——————————————————————————–
2、分隔线宽度属性:<hr width=50%> 或者 <hr width=250> (宽度为实际点数或百分比)
——————————————————————————–
3、分隔线位置属性:<hr align=right width=50%> (位置分为 Left、Center、Right 三种)
Read the rest of this entry »
Published by
admin on
11月 6, 2011
使用css来设置背景图片同传统的做法一样简单,但相对于传统控制方式,css提供了更多的可控选项,我们先来看看最基本的设置图片的方法。
xhtml代码:
<div id=”content”>
</div>
css代码:
#content {
border:1px solid #000fff;
height:500px;
background-image:url(images/bg.GIF);
}
网页中id为content的元素被我们设置了使用images文件夹下的bg.GIF作为背景,与传统表格式布局中的设置并无差别,在默认状态下,背景同样以平铺的方式出现在元素之中。然而使用css来控制背景当然不可能如此简单,实际上css为我们提供了更多用于控制背景的属性,包含可以控制元素是否需要平铺。改进后的代码:
Read the rest of this entry »
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 »