沒想當最近一次在這里寫字居然是整整一年前了。
最近重新開始向好好做做公司的管理系統,重新撿起了Eclipse和Java。為了避免過分的重復勞動,先將開發(fā)環(huán)境建設記錄下來:
1、數據庫:Oracle。曾經用了3年,不過也丟了6年了。現在采用了Oracle 10G Express Edition。
2、Application Server:IBM WAS CE;也就是Apache Geronimo;
3、IDE:Eclipse 3.2.2;Framework:Java Server Faces
安裝過程:
1、Oracle就不費勁說了
2、Eclipse:從Eclipse.org上
???
Download Eclipse
Download WTP
Download JSF
Download The EMF driver used in this build is emf-sdo-xsd-SDK-2.2.2.zip
Download The GEF driver used in this build is GEF-SDK-3.2.2.zip
Download
Java EMF Model Runtime driver used in this build is JEM-SDK-1.2.3_jem.zip
Download xdoclet
Download Rich Ajax Project RAP
Unzip them and copy plugins into
Eclipse.
3、Download Myfaces from apache.org
4、Download WAS CE & Eclips plugin from IBM, Install
them.
5、當然不能少了JDK from java.sun.com;
差不多就這樣了,在Eclipse還要配置一下WAS CE。
詳細文章參見 管理 Eclipse 中的WAS CE服務器。
posted @
2007-02-21 18:55 J2EE 閱讀(318) |
評論 (0) |
編輯 收藏
J2SE在java.security.MessageDigest提供了一個MD5、SHA摘要計算類。
結合javascript的md5計算,可以實現前臺口令加密,后臺數據庫中也保存的是md5或者sha的密碼加密摘要。
具體實現如下:
1、login.jsp部分
...
<script type="text/javascript" src='js/md5.js'>
</script>
<html:form action="/login" focus="userid" >
<table class="SubFormStyle">
<tr align=left>
<td><bean:message key="caption.LOGIN.UserID" /> <html:text
property="userid" value=""></html:text></td>
<td><bean:message key="caption.LOGIN.Password" /> <html:password
property="passwordinput" value=""></html:password>
<html:hidden
property="password" value="" ></html:hidden></td>
<td><html:submit onclick="password.value = hex_md5(passwordinput.value);">
<bean:message key="button.Login" />
</html:submit></td>
</tr>
</table>
</html:form>
...
2、我用的是struts,具體的action和form就不再浪費紙張了,我定義了一個loginuser的類來進行用戶密碼校驗,這里只給出校驗的方法:
/**
*
* 校驗密碼,密碼采用MD5算法加密。
*
* @Param PasswordInput, 待校驗密碼
* @Return 校驗通過返回true,否則返回false
*
*
*/
public boolean CheckPassword(String PasswordInput) throws ATError {
this.select();//從數據庫中讀取用戶信息
MessageDigest md;
try {
//生成一個MD5加密計算摘要
md = MessageDigest.getInstance("MD5");
//計算md5函數
md.update(this.password.getBytes());
//digest()最后確定返回md5 hash值,返回值為8為字符串。因為md5 hash值是16位的hex值,實際上就是8位的字符
//BigInteger函數則將8位的字符串轉換成16位hex值,用字符串來表示;得到字符串形式的hash值
String pwd = new BigInteger(1, md.digest()).toString(16);
if (PasswordInput.equals(pwd)) {
return true;
} else {
return false;
}
} catch (NoSuchAlgorithmException e) {
throw new ATError(e, "LoginUser", "CheckPassword", 1000);
}
}
md5.js下載:http://pajhome.org.uk/crypt/md5/index.html
posted @
2006-01-19 09:13 J2EE 閱讀(4282) |
評論 (3) |
編輯 收藏
一開始覺得別人走得很遠了,我們大概沒有機會了。實際上不是這樣,我們不光有成本優(yōu)勢,還有速度優(yōu)勢、技術優(yōu)勢,致使過去沒有把我們的技術集成起來。
——奇瑞汽車總裁尹同耀宗杰奇瑞
posted @
2006-01-14 09:13 J2EE 閱讀(217) |
評論 (0) |
編輯 收藏
又一年過去了,又有哥們想走了。
每一年到了年底,總是發(fā)現一年了,什么都不是。一事無成,要錢沒錢,要技術沒技術,除了年紀又大了一歲,似乎什么都沒有。自己不知道到底應該做什么,自己到底是什么?
想法很多,但總是沒有一個能做出來。
posted @
2006-01-05 20:44 J2EE 閱讀(210) |
評論 (0) |
編輯 收藏
在BlogJava潛水半年多了,學了不少東東。終于敢開一個賬戶和大家一起分享我的感受。
希望在2006年能夠真正開始我的J2EE之旅。
posted @
2006-01-04 08:55 J2EE 閱讀(171) |
評論 (0) |
編輯 收藏