java
java
tomcat-6.0.18 log4j設(shè)置
摘要: 按照我寫的目錄結(jié)構(gòu)來放置。
下載地址:
http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/extras/tomcat-juli.jar
http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/extras/tomcat-juli-adapters.jar
tomcat6-------lib
| |--------tomcat-juli-adapters.jar
| |--------log4j.jar
| |--------log4j.properites
|
|----bin
|--------tomcat-juli.jar
閱讀全文
posted @
2010-01-14 18:10 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
debian : SEVERE: Failed to instanciate class hudson.node_monitors.DiskSpaceMonitor
摘要: 找到啟動(dòng)用戶目錄
比如是/home/hudson/下面
.hudson/nodeMonitors.xml 加入
false
false
閱讀全文
posted @
2010-01-12 13:22 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
jetty 錯(cuò)誤日志ava.lang.IllegalStateException: Form too large225854>200000 解決的辦法
摘要:
Jetty's default configuration has a limitation on POST data (200000 bytes)that
prevents Hudson from reading the Update Center data (available
plugins). Jetty gets an error like java.lang.IllegalStateException: Form too large. To resolve this, add something like this to jetty.xml:
Jetty 6:
在jetty.xml中設(shè)置該參數(shù)
org.mortbay.jetty.Request.maxFormContentSize
-1閱讀全文
posted @
2010-01-12 11:09 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
java restful webservice 之MultivaluedMap 例子
摘要: server:
package com.test.web.resources;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import org.springframework.stereotype.Component;
/**
* 測試
* @author ann
*
*/
@Path("/test")
@Component
public class Test {
@POST
@Path("/formTest")
閱讀全文
posted @
2010-01-11 17:02 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
并發(fā)集合類的選擇
摘要: 同步的集合類Hashtable和Vector,以及同步的包裝器類Collections.synchronizedMap和Collections.synchronizedList,為Map和List提供了基本的有條件的線程安全的實(shí)現(xiàn)。然而,某些因素使得它們并不適用于具有高度并發(fā)性的應(yīng)用程序中――它們的集合范圍的單鎖特性對于可伸縮性來說是一個(gè)障礙,而且,很多時(shí)候還必須在一段較長的時(shí)間內(nèi)鎖定一個(gè)集合,以防止出現(xiàn)ConcurrentModificationExceptions異常。
ConcurrentHashMap和CopyOnWriteArrayList實(shí)現(xiàn)提供了更高的并發(fā)性,同時(shí)還保住了線程安全性,只不過在對其調(diào)用者的承諾上打了點(diǎn)折扣。ConcurrentHashMap和CopyOnWriteArrayList并不是在您使用HashMap或ArrayList的任何地方都一定有用,但是它們是設(shè)計(jì)用來優(yōu)化某些特定的公用解決方案的。許多并發(fā)應(yīng)用程序?qū)膶λ鼈兊氖褂弥蝎@得好處。
總結(jié):在多線程并發(fā)情況下,為了避免ConcurrentModificati
閱讀全文
posted @
2010-01-07 18:04 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
java jar
摘要: java -cp "./WEB-INF/lib/*:./WEB-INF/classes" bran.RestaurantCenterJettyStarter
閱讀全文
posted @
2009-12-22 09:47 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
gson(JSON字符串轉(zhuǎn)換成一個(gè)相等的Java對象)
摘要: 目前大多數(shù)使用gson的還要求在java類中使用java annotation,不完全支持POJO。
Gson這個(gè)Java類庫可以把Java對象轉(zhuǎn)換成JSON,也可以把JSON字符串轉(zhuǎn)換成一個(gè)相等的Java對象。Gson支持任意復(fù)雜Java對象包括沒有源代碼的對象。
下載地址
http://code.google.com/p/google-gson/downloads/list
閱讀全文
posted @
2009-11-05 15:31 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
restful webservice 返回json格式的string出現(xiàn)的問題
摘要: 在測試發(fā)現(xiàn) 當(dāng)數(shù)組返回json格式的String的時(shí)候,如果數(shù)組中只有一個(gè),則返回的json格式不是數(shù)組形式,而是單一對象格式。
閱讀全文
posted @
2009-10-15 09:28 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
java restful 風(fēng)格的Webservice
摘要: 這里面用的是jersey
1. 創(chuàng)建一個(gè)project
2. 建立返回的model
這里面的model例子
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.test.webservice.model;
/**
*
* @author ann
*/
import com.fg114.model.People;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax
閱讀全文
posted @
2009-09-27 15:19 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.sun.xml.ws.message.jaxb.AttachmentMarshallerImpl.addMtomAttachment(Ljavax/activation/DataHandler;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" the c
摘要: java.lang.LinkageError: loader constraint violation: when resolving overridden method "com.sun.xml.ws.message.jaxb.AttachmentMarshallerImpl.addMtomAttachment(Ljavax/activation/DataHandler;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" the class loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) of the current class, com/sun/xml/ws/message/jaxb/AttachmentMarshallerImpl, and its superclass loader (instance of
), have different Class objects for the type javax/act 閱讀全文
posted @
2009-09-18 16:13 冰是沒有未來的,因?yàn)樗挠篮銃
編輯
Full java Archive