锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品无码国产片,亚洲欧洲国产精品香蕉网,春暖花开亚洲性无区一区二区http://www.tkk7.com/lazing/Future network: Share and Create...zh-cnSat, 10 May 2025 17:33:05 GMTSat, 10 May 2025 17:33:05 GMT60浣跨敤XFire涓嶴pring寮鍙慦eb Servicehttp://www.tkk7.com/lazing/archive/2007/08/16/xfire_spring_web_service.htmlHIMMELHIMMELThu, 16 Aug 2007 05:15:00 GMThttp://www.tkk7.com/lazing/archive/2007/08/16/xfire_spring_web_service.htmlhttp://www.tkk7.com/lazing/comments/137198.htmlhttp://www.tkk7.com/lazing/archive/2007/08/16/xfire_spring_web_service.html#Feedback10http://www.tkk7.com/lazing/comments/commentRss/137198.htmlhttp://www.tkk7.com/lazing/services/trackbacks/137198.html浣跨敤XFire涓嶴pring寮鍙慦eb Service

婧愪唬鐮佷笅杞斤紙涓変釜鏍蜂緥宸ョ▼Maven鐗堟湰錛?xfire-src.zip

鐩稿叧lib鏂囦歡璇峰埌XFire瀹樻柟緗戠珯錛堣鍙傝冿級 涓嬭澆鍙戝竷鐗堟湰銆?/p>

PDF鐗堟湰涓嬭澆

鐩綍
瀹炵幇鍔熻兘涓庣壒鐐? 2

榪愯鐜 2

寮鍙戝鉤鍙? 2

瀹炴柦姝ラ 2

姒傝堪 2

鏂板緩Java Project 3

鏂板緩WTP鍔ㄦ乄EB宸ョ▼ 4

瀹炵幇鏈嶅姟 6

鍒╃敤Spring銆乆Fire瑁呴厤涓庢毚闇叉湇鍔? 7

嫻嬭瘯騫惰闂湇鍔? 7

鍒╃敤XFire瀹炵幇瀹㈡埛绔? 10

鎵╁睍涓婚 11

鍒╃敤MTOM浼犺緭浜岃繘鍒跺璞★紙鏂囦歡錛? 11

闄勫綍 12

XFire鍦╓ebLogic 8.1涓殑閰嶇疆 12

鍙傝? 12

瀹炵幇鍔熻兘涓庣壒鐐?/h1>
  • 鍩轟簬J2EE騫沖彴鐨刉eb Service鏈嶅姟
  • 寮鍙戞柟渚匡紝閰嶇疆綆鍗?
    • 璁捐鎺ュ彛
    • 瀹炵幇鏈嶅姟
    • 閰嶇疆鏆撮湶鎺ュ彛
    • XFire灝嗚嚜鍔ㄧ敓鎴愬搴旂殑wsdl
    • 鏀寔楂樼駭璇︾粏閰嶇疆
  • 涓嶴pring鏃犵紳闆嗘垚

榪愯鐜

寮鍙戝鉤鍙?/h1>

瀹炴柦姝ラ

姒傝堪

  1. 寤虹珛涓涓狫ava Project鐢ㄤ簬Domain瀹炰綋鍜學eb Service鎺ュ彛錛岃繖涓伐紼嬬殑杈撳嚭鏄竴涓猨ar鍖咃紝涓篧eb Service宸ョ▼鍜學eb Service Client鍏變韓銆?/li>
  2. 寤虹珛WTP鍔ㄦ乄EB宸ョ▼閮ㄧ講Web Service
  3. 寤虹珛Java Project浣跨敤Web Service (Web Service Client)

鏂板緩Java Project

  1. 寤虹珛鏅欽ava Project 浠ヤ笅縐頒負common宸ョ▼
  2. 濡傛灉浣跨敤Maven錛岄」鐩緷璧?/li>

<dependency>

<groupId>javax.mail</groupId>

<artifactId>mail</artifactId>

<version>1.4</version>

</dependency>

  1. 鏅氭儏鍐甸渶瑕佸姞鍏ュ涓媗ib

activation-1.1.jar

mail-1.4.jar

  1. 緙栧啓綾?org.ave7.xfire.domain.User

org.ave7.xfire.domain.User.java

package org.ave7.xfire.domain;

import java.io.Serializable;

import java.util.Date;

public class User implements Serializable {

private static final long serialVersionUID = 6517808321041980976L;

private Long userId;

private String accountId;

private String userName;

private Date lastLogin;

public String getAccountId() {

return accountId;

}

public void setAccountId(String accountId) {

this.accountId = accountId;

}

public Date getLastLogin() {

return lastLogin;

}

public void setLastLogin(Date lastLogin) {

this.lastLogin = lastLogin;

}

public Long getUserId() {

return userId;

}

public void setUserId(Long userId) {

this.userId = userId;

}

public String getUserName() {

return userName;

}

public void setUserName(String userName) {

this.userName = userName;

}

}

  1. 緙栧啓鎺ュ彛 org.ave7.xfire.ws.UserService
org.ave7.xfire.ws.UserService.java

package org.ave7.xfire.ws;

import org.ave7.xfire.domain.User;

public
interface UserService {

public User queryUserByAccoutId(String accountId);

public
void createUser(User user);

}

鏂板緩WTP鍔ㄦ乄EB宸ョ▼

  1. 閰嶇疆WTP鍔犲叆Tomcat Server Runtime
    1. 閫夋嫨Windows -> Preference
    2. 鍦ㄥ乏渚ч夋嫨Server->Installed Runtime 娣誨姞Tomcat
  2. 鏂板緩宸ョ▼錛岄夋嫨Dynamic Web Project 杈撳叆Project Name: XFireService
  3. 璁劇疆榪愯鐜涓篋ynamic Web Module 2.3 , JDK 1.4
  4. 濡傛灉闇瑕佺粨鍚圡aven錛岃濡備笅閰嶇疆錛屽惁鍒欎嬌鐢ㄩ粯璁ゅ嵆鍙?br>
  5. 濡傛灉浣跨敤Maven璇鋒敞鍏ュ涓嬩緷璧栦互鍙婁箣鍓嶇殑Common宸ョ▼錛屽惁鍒欐牴鎹悗闈㈢殑鍒楄〃澶嶅埗lib鏂囦歡鍒板搴旂洰褰?/li>

<dependency>

<groupId>org.codehaus.xfire</groupId>

<artifactId>xfire-aegis</artifactId>

<version>1.2.4</version>

</dependency>

<dependency>

<groupId>org.codehaus.xfire</groupId>

<artifactId>xfire-spring</artifactId>

<version>1.2.4</version>

<dependency>

<groupId>xalan</groupId>

<artifactId>xalan</artifactId>

<version>2.7.0</version>

</dependency>


Lib鏂囦歡鍒楄〃

xbean-2.2.0.jar

qdox-1.5.jar

commons-attributes-api-2.1.jar

ant-1.5.jar

wstx-asl-3.2.0.jar

stax-utils-20040917.jar

commons-httpclient-3.0.jar

spring-1.2.6.jar

XmlSchema-1.1.jar

stax-api-1.0.1.jar

jaxen-1.1-beta-9.jar

xfire-annotations-1.2.4.jar

xfire-aegis-1.2.4.jar

xfire-core-1.2.4.jar

xfire-spring-1.2.4.jar

xfire-xmlbeans-1.2.4.jar

jdom-1.0.jar

xbean-spring-2.7.jar

wsdl4j-1.6.1.jar

commons-beanutils-1.7.0.jar

activation-1.1.jar

mail-1.4.jar

commons-codec-1.3.jar

xmlParserAPIs-2.6.2.jar

xercesImpl-2.6.2.jar

junit-3.8.1.jar

commons-logging-1.0.4.jar
xalan-2.7.0.jar

瀹炵幇鏈嶅姟

org.ave7.xfire.ws.UserServiceImpl.java

package org.ave7.xfire.ws;

import java.rmi.RemoteException;

import java.util.Date;

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;

import org.ave7.xfire.domain.User;

public
class UserServiceImpl implements UserService {

private
static
final Log log = LogFactory.getLog(UserServiceImpl.class);

public
void createUser(User user) throws RemoteException {

log.debug(“createUser user
=” + user);

}

public User queryUserByAccoutId(String accountId) throws
RemoteException {

log.debug(“accountId
=” + accountId);

User user 
= new User();

user.setAccountId(“testAccount”);

user.setLastLogin(
new Date());

user.setUserName(“嫻嬭瘯鐢ㄦ埛“);

user.setUserId(
new Long(123L));

return user;

}

}

鍒╃敤Spring銆乆Fire瑁呴厤涓庢毚闇叉湇鍔?/h2>
  1. 鍦╳eb.xml閰嶇疆鐩稿叧緇勪歡
<?xml version=“1.0″ encoding=“UTF-8″?>

<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd”
>

<web-app id=“WebApp_ID”>

<display-name>XFireService</display-name>

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath:applicationContext*.xml</param-value>

</context-param>

<listener>

<listener-class>

org.springframework.web.context.ContextLoaderListener

</listener-class>

</listener>

<servlet>

<servlet-name>xfire</servlet-name>

<servlet-class>

org.codehaus.xfire.spring.XFireSpringServlet

</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>xfire</servlet-name>

<url-pattern>/service/*</url-pattern>

</servlet-mapping>

</web-app>

  1. 鍦╝pplicationContext.xml閰嶇疆鐩稿叧鏈嶅姟
<?xml version=“1.0″ encoding=“UTF-8″?>

<!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN”

“http://www.springframework.org/dtd/spring-beans.dtd”
>

<beans>

<import resource=“classpath:org/codehaus/xfire/spring/xfire.xml” />

<bean id=“baseWebService”

class=“org.codehaus.xfire.spring.remoting.XFireExporter”

lazy-init=“false” abstract=“true”>

<property name=“serviceFactory” ref=“xfire.serviceFactory” />

<property name=“xfire” ref=“xfire” />

</bean>

<bean id=“userWS” class=“org.ave7.xfire.ws.UserServiceImpl”></bean>

<bean id=“userService” parent=“baseWebService”>

<property name=“serviceBean” ref=“userWS” />

<property name=“serviceClass”

value=“org.ave7.xfire.ws.UserService” />

</bean>

</beans>

嫻嬭瘯騫惰闂湇鍔?/h2>
  1. 媯鏌ib鏂囦歡澶癸紝Maven鐢ㄦ埛娉ㄦ剰娣誨姞瀵筩ommon宸ョ▼鐨勪緷璧栵紝鍏朵粬鎯呭喌璇鋒妸common宸ョ▼瀵煎嚭鐨刯ar鍖呭鍒跺埌web-inf/lib鐩綍
  2. 鍦╓TP涓坊鍔犳湇鍔″櫒錛岄儴緗插簲鐢?br>
  3. 鍦ㄦ祻瑙堝櫒涓緭鍏ョ被浼?http://localhost:8080/XFireService/service 搴旂湅鍒?br>
  4. 鐐瑰嚮wsdl http://localhost:8080/XFireService/service/UserService?wsdl 鐪嬪埌

    濡傛灉榪欎竴姝ュ嚭鐜?00閿欒錛岃媯鏌ユ槸鍚︽湁xalan.jar鍖?/li>
  5. 鍦╓TP涓埄鐢╓eb Service Explore嫻嬭瘯SOAP鏂瑰紡錛屽湪WTP宸ュ叿鏍忛夋嫨 鏈鍙充晶鎸夐挳
  6. 鐐瑰嚮鍙充笂瑙掕繘鍏SDL page
  7. 鐐瑰嚮WSDL Main鑺傜偣杈撳叆鏈嶅姟wsdl鍦板潃錛岀偣鍑?br>
  8. 鍒楀嚭鎵鏈夌殑鍙敤鏈嶅姟錛岄夋嫨鏈嶅姟嫻嬭瘯
  9. 嫻嬭瘯queryUserByAccountId
  10. 鐐瑰嚮緇撴灉涓殑Source鍙互鐪嬪埌SOAP鎶ユ枃

鍒╃敤XFire瀹炵幇瀹㈡埛绔?/h2>
  1. 鏂板緩涓涓櫘閫欽ava宸ョ▼錛宭ib涓紩鐢╔Fire鐩稿叧鍖?/li>

濡傛灉浣跨敤Maven娣誨姞濡備笅渚濊禆浠ュ強瀵筩ommon宸ョ▼鐨勫紩鐢?/p>

<dependency>

<groupId>org.codehaus.xfire</groupId>

<artifactId>xfire-aegis</artifactId>

<version>1.2.4</version>

</dependency>

鏅欽ava宸ョ▼娣誨姞濡備笅lib浠ュ強瀵筩ommon宸ョ▼鐨勫紩鐢?/p>

activation-1.1.jar

commons-codec-1.3.jar

commons-httpclient-3.0.jar

commons-logging-1.0.4.jar

jaxen-1.1-beta-9.jar

jdom-1.0.jar

junit-3.8.1.jar

mail-1.4.jar

stax-api-1.0.1.jar

stax-utils-20040917.jar

wsdl4j-1.6.1.jar

wstx-asl-3.2.0.jar

xercesImpl-2.6.2.jar

xfire-aegis-1.2.4.jar

xfire-core-1.2.4.jar

xmlParserAPIs-2.6.2.jar

XmlSchema-1.1.jar

  1. 緙栧啓瀹㈡埛绔▼搴?/li>

org.ave7.xfire.client.MyClient.java

package org.ave7.xfire.client;

import java.net.MalformedURLException;

import java.rmi.RemoteException;

import org.ave7.xfire.domain.User;

import org.ave7.xfire.ws.UserService;

import org.codehaus.xfire.client.XFireProxyFactory;

import org.codehaus.xfire.service.Service;

import org.codehaus.xfire.service.binding.ObjectServiceFactory;

public
class MyClient {

public
static
void main(String[] args) {

try {

Service serviceModel 
= new ObjectServiceFactory()

.create(UserService.
class);

UserService service 
= (UserService) new XFireProxyFactory().create(

serviceModel,

“http:
//localhost:8080/XFireService/service/UserService”);

User user 
= service.queryUserByAccoutId(“123″);

System.out

.println(“userId
=” + user.getUserId() + “, userName=

+ user.getUserName() + “, lastLogin=

+ user.getLastLogin());

catch (MalformedURLException e) {

e.printStackTrace();

catch (RemoteException e) {

e.printStackTrace();

}

}

}

  1. 榪愯銆傛帶鍒跺彴鎵撳嵃杈撳嚭

2007-8-16 10:25:52 org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry crea

teTypeCreator

淇℃伅: Couldn’t find Java 5 module on classpath. Annotation mappings will not be su

pported.

userId=123, userName=嫻嬭瘯鐢ㄦ埛, lastLogin=Thu Aug 16 10:25:53 CST 2007


鎵╁睍涓婚

鍒╃敤MTOM浼犺緭浜岃繘鍒跺璞★紙鏂囦歡錛?/h2>

MTOM鏄疿Fire鐨勪竴涓粍浠訛紝鍙互鍗忓姪鍒╃敤鍘嬬緝絳夋墜孌墊洿蹇殑鍦ㄧ綉緇滀笂浼犺緭base64鐨凷OAP瀵硅薄

MTOM浠ュ強aegis榛樿鏀寔濡備笅鍑犵java瀵硅薄鐨勬暟鎹?/p>

  • byte[]
  • javax.activation.DataHandler
  • javax.activation.DataSource
  1. 閰嶇疆鍚敤MTOM

鍦⊿pring閰嶇疆鏂囦歡涓渶瑕丮TOM鐨勬湇鍔′腑鍔犲叆濡備笅閰嶇疆

 <bean id=“userService” parent=“baseWebService”>

<property name=“serviceBean” ref=“userWS” />

<property name=“serviceClass”

value=“org.ave7.xfire.ws.UserService” />

<property name=”properties”>

<map>

<entry key=”mtom-enabled” value=”true” />

</map>

</property>

</bean>

  1. 鍦ㄥ鎴風緙栧啓浼犺緭紼嬪簭
 Service serviceModel = new ObjectServiceFactory()

.create(UserService.
class);

UserService service 
= (UserService) new XFireProxyFactory().create(

serviceModel,

“http:
//localhost:8080/XFireService/service/UserService”);

Client client 
= Client.getInstance(service);

client.setProperty(“mtom
-enabled”, “true”);

client.setProperty(HttpTransport.CHUNKING_ENABLED, “
true”);

User user 
= service.queryUserByAccoutId(“123″);

System.out

.println(“userId
=” + user.getUserId() + “, userName=

+ user.getUserName() + “, lastLogin=

+ user.getLastLogin());

ByteArrayDataSource byteData 
= new ByteArrayDataSource(

“Test Sending Byte”.getBytes(), “text
/plain; charset=UTF-8″);

service.transferDataSource(byteData);

闄勫綍

XFire鍦╓ebLogic 8.1涓殑閰嶇疆

  1. Add the QName JAR file (qname.jar) into the WEB-INF/lib folder in your WAR file
  2. Add a file weblogic.xml into the WEB-INF folder in your WAR file
<!DOCTYPE weblogic-web-app PUBLIC

“-//BEA Systems, Inc.//DTD Web Application 8.1//EN”

“http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd”
>

<weblogic-web-app>

<container-descriptor>

<prefer-web-inf-classes>true</prefer-web-inf-classes>

</container-descriptor>

</weblogic-web-app>

QName JAR file (qname.jar) http://docs.codehaus.org/download/attachments/27836/qname.jar?version=1

鍙傝?/h1>

XFire On WebLogic 8.1
http://docs.codehaus.org/display/XFIRE/XFire+on+WebLogic+8.1



HIMMEL 2007-08-16 13:15 鍙戣〃璇勮
]]>JSF Suckshttp://www.tkk7.com/lazing/archive/2007/07/31/133594.htmlHIMMELHIMMELTue, 31 Jul 2007 08:10:00 GMThttp://www.tkk7.com/lazing/archive/2007/07/31/133594.htmlhttp://www.tkk7.com/lazing/comments/133594.htmlhttp://www.tkk7.com/lazing/archive/2007/07/31/133594.html#Feedback2http://www.tkk7.com/lazing/comments/commentRss/133594.htmlhttp://www.tkk7.com/lazing/services/trackbacks/133594.html
鎴戜笉鏄庣櫧錛屾湇鍔″櫒绔殑紼嬪簭灝辮佸ぇ涔堬紵
涓轟粈涔堥兘璺戞潵瀵笿avaScript鍔ㄤ竴鍫嗘墜鑴氥?br>
鏈変漢璇寸殑濂斤紝JSF灝辨槸ASP.net in JAVA銆?br>闅鵑亾鎶婂墠鍙板悗鍙版販涓轟竴璋堬紝鎻愪緵浜涢瀹氫箟鐨勬帶浠跺氨鏄壇濂界殑妗嗘灦涔堬紵






HIMMEL 2007-07-31 16:10 鍙戣〃璇勮
]]>
IE BLOG 鍏竷鍏嶈垂鐨凞evelop Tool barhttp://www.tkk7.com/lazing/archive/2007/05/18/118382.htmlHIMMELHIMMELFri, 18 May 2007 07:29:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/18/118382.htmlhttp://www.tkk7.com/lazing/comments/118382.htmlhttp://www.tkk7.com/lazing/archive/2007/05/18/118382.html#Feedback0http://www.tkk7.com/lazing/comments/commentRss/118382.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118382.htmlhttp://blogs.msdn.com/ie/archive/2005/09/16/469686.aspx

涓浜涘姛鑳藉垪琛細
  • explore the DOM tree and find elements on the page
  • disable IE settings, view information
  • outline elements,
  • control images
  • resize pages to common screen resolutions
  • validate against existing standards and provides pointers to W3C specs
涓嬭澆鍦板潃
http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en



HIMMEL 2007-05-18 15:29 鍙戣〃璇勮
]]>
Ageci Notes: Authenticationhttp://www.tkk7.com/lazing/archive/2007/05/17/118190.htmlHIMMELHIMMELThu, 17 May 2007 14:52:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/17/118190.htmlhttp://www.tkk7.com/lazing/comments/118190.htmlhttp://www.tkk7.com/lazing/archive/2007/05/17/118190.html#Feedback2http://www.tkk7.com/lazing/comments/commentRss/118190.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118190.html闃呰鍏ㄦ枃

HIMMEL 2007-05-17 22:52 鍙戣〃璇勮
]]>
Java Notes: Data types and Operatorshttp://www.tkk7.com/lazing/archive/2007/05/17/118189.htmlHIMMELHIMMELThu, 17 May 2007 14:48:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/17/118189.htmlhttp://www.tkk7.com/lazing/comments/118189.htmlhttp://www.tkk7.com/lazing/archive/2007/05/17/118189.html#Feedback0http://www.tkk7.com/lazing/comments/commentRss/118189.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118189.htmlComprehend

  • A variable holds a value, while an object reference variable points to the memory that holds the object.
  • The short-circuit logical operators && and || operate only on boolean operands. For example, the expression
    9&&7 will not compile. Understand the difference between short-circuit logical operators and bitwise
    operators.
  • If the first expression of a && operator is false, the second expression is not evaluated, and if the first
    expression of a || operator is true, the second expression is not evaluated.

Look Out

  • Be on guard for words that are only slightly different from the Java keywords, such as synchronize instead of synchronized, implement instead of implements, and protect instead of protected.
  • Whether an array stores primitive variables or object references, the array itself is always an object.
  • It is illegal to include the array size in the array declaration.
  • Division by zero generates a runtime ArithmeticException only if the operands are integers. In case of float and double, the result of division by zero is infinity.
  • The result of the modulo operator always carries the sign of the first operand (i.e. the one before the operator);
    you can ignore the sign of the second operand.
  • You cannot instantiate an enum by using the new operator.

Memorize

  • Know the Java language keywords.
  • Know the range of values for all primitive data types.
  • All primitive data types except boolean and char are signed.
  • The first character of an identifier must be a letter, a dollar sign ($), or an underscore (_). Characters other than the first character in an identifier may be a letter, a dollar sign, an underscore, or a digit.


HIMMEL 2007-05-17 22:48 鍙戣〃璇勮
]]>
Java Notes: Classes, Methods, and Interfacehttp://www.tkk7.com/lazing/archive/2007/05/17/118188.htmlHIMMELHIMMELThu, 17 May 2007 14:47:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/17/118188.htmlhttp://www.tkk7.com/lazing/comments/118188.htmlhttp://www.tkk7.com/lazing/archive/2007/05/17/118188.html#Feedback0http://www.tkk7.com/lazing/comments/commentRss/118188.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118188.htmlComprehend
  • The method name and return type are mandatory in a method declaration. Even though you are not required to specify a modifier in a method declaration, the default modifier is assigned to the method, if you don’t declare one.
  • A static variable belongs to the class and not to a particular instance of the class, and therefore is initialized when the class is loaded, and before the class is instantiated.
  • Because a static method belongs to a class and not to a particular instance of the class, it cannot access the nonstatic methods and variables of the class in which it is defined.
  • An instance of an inner class can only exist in an instance of the outer class, and has direct access to all the instance variables and methods of the outer instance.
  • If you make a super call or a this call, it must be in the beginning of a constructor. That means you can make either a super call or a this call, but not both.

Look Out

  • The variable-length parameters list must appear last in the parentheses of a method and it consists of a data type, three dots, and a name, in that order.
  • A Java class cannot inherit from more than one class, but it can inherit from one class and one or more interfaces.
  • The class that inherits from an interface must provide implementation for all the methods that are declared in the interface if the class is not abstract.
  • An interface can extend another interface but it cannot implement another interface or a class.

Memorize

  • If you do not provide any constructor for a class you write, the compiler provides the default constructor for that class. If you write at least one constructor for the class, the compiler provides no constructor.
  • If you don not make a this or a super call in the beginning of a constructor, the compiler places a super() call there.
  • You use the keyword extends to write a derived class that inherits from a parent class, and use the keyword implements to write a class that inherits from an interface.
  • The methods in an interface are inherently public and abstract, and the variables in the interface are inherently public, final, and static.


HIMMEL 2007-05-17 22:47 鍙戣〃璇勮
]]>
Microsoft Software Basic Processhttp://www.tkk7.com/lazing/archive/2007/05/17/118187.htmlHIMMELHIMMELThu, 17 May 2007 14:37:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/17/118187.htmlhttp://www.tkk7.com/lazing/comments/118187.htmlhttp://www.tkk7.com/lazing/archive/2007/05/17/118187.html#Feedback0http://www.tkk7.com/lazing/comments/commentRss/118187.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118187.html
  1. Plan an agenda.
  2. Define key business drivers.
  3. Define key success facts.
  4. Work out persona.
  5. Work out Scenario.
  6. High level architecture
  7. High level design
  8. Development
  9. QA
  10. Deployment


HIMMEL 2007-05-17 22:37 鍙戣〃璇勮
]]>
鏁板兼柟娉曠瑪璁?http://www.tkk7.com/lazing/archive/2007/05/17/118185.htmlHIMMELHIMMELThu, 17 May 2007 14:34:00 GMThttp://www.tkk7.com/lazing/archive/2007/05/17/118185.htmlhttp://www.tkk7.com/lazing/comments/118185.htmlhttp://www.tkk7.com/lazing/archive/2007/05/17/118185.html#Feedback0http://www.tkk7.com/lazing/comments/commentRss/118185.htmlhttp://www.tkk7.com/lazing/services/trackbacks/118185.html鍏充簬榪欎釜絎旇

涔熻浣犲凡緇忓浼氫簡涓闂ㄨ綆楁満璇█錛屼篃璁鎬綘浼氬啓涓孌典笉閿欑殑紼嬪簭銆?

涔熻浣犲湪鍢堟潅鐨勭幆澧冪敤涓嶈垂鍔涚殑灝卞彲浠ョ敤鐔熸倝鐨処DE瀹屾垚涓涓」鐩?

涓嶈繃錛屼綘榪樺湪鐢? - * /鍜?鍋氭墍鏈夌殑璁$畻涔堬紵

榪欎釜絎旇灝辨槸涓轟簡鍐欏嚭鏇村姞姝g‘鐨勭▼搴忥紝灝忓皬鐨勪竴涓涔犺繃紼嬨?

鎴戜笉鎬葷粨澶嶆潅鐨勯亾鐞嗭紝鍙褰曠敤寰椾笂鐨勬柟妗堛?

鍑虹幇鐨勪竴鍒囦唬鐮侀兘浣跨敤Java璇█銆?

姝g‘鐨勮綆楄繃紼嬪鑷撮敊璇殑璁$畻緇撴灉

鍏充簬鍩烘湰鏁板艱綆椾腑鐨勪竴浜涢櫡闃?

嫻偣鏁板拰瀹炴暟

褰撴棭鏈熺殑Fortran鍜宎lgol鍒涢犲嚭real榪欎釜鍏抽敭瀛楁椂錛屼綘榪樼湡浠ヤ負閭d箞鏄疄鏁幫紝涓嶈繃璇寸湡鐨勶紝浣犺楠椾簡銆?

鎵浠ュ埌浜咰錛屾垜浠嫢鏈変簡float銆?

閭d箞浠栦滑鍒板簳鏈変粈涔堜笉鍚屽憿錛?

綆鍗曞湴璇?

System.out.println(”Value of 1/3: ” + (1/3f))

灝嗚緭鍑?

Value of 1/3: 0.33333334

寰堢畝鍗曪紝榪欐槸寰堟棭涔嬪墠鎮ㄥ氨鐭ラ亾鐨勫洓鑸嶄簲鍏ャ傚綋鏃舵垜浠彧鏄偅鏃犳硶鍐欏畬鐨勫驚鐜湪綰鎬笂鍒掍笅涓涓?#8221;鈮?#8221;錛岀劧鍚庨潪甯稿紑蹇冨彲浠ュ皯鍐欏嚑涓瓧絎︺傚鏋滀綘鏈変竴涓礋璐d換鐨勬暟瀛﹁佸笀錛屼粬錛堝ス錛夊氨浼氬弽澶嶇殑鍙挍浣狅紝瑕佸皬蹇冿紝璁$畻鏃跺欒淇濈暀緇撴灉綺懼害寰鍚庝竴浣嶇殑鏁板箋?

褰撹繖涓鍒囪疆鍒頒簡璁$畻鏈猴紝鎴戜滑鍙畠錛?

鑸嶅叆璇樊

鑸嶅叆璇樊鏈夋椂鐩稿綋鎯婁漢銆傚1/3榪炲姞840嬈★紝浣犱細寰楀埌279.9915錛堟湰搴斿綋涓?80錛夛紝濡備綍鎯婁漢錛屾垜浠細鍦ㄤ笅闈㈢湅鍒般?

涓嶈繃鏈夋剰鎬濈殑浜嬫儏錛屽拰灝忔椂鍊欑殑鎯呭艦涓嶄竴鏍鳳紝鑸嶅叆璇樊騫朵笉鏄敱浜庝笉鑳介櫎灝芥垨鑰呮槸鏃犵悊鏁伴犳垚鐨勶紝綾諱技浜?/5鐨勬暟瀛楄繛鍔犱箣鍚庝篃鏈夎宸傝繖鏄洜涓虹粷澶у鏁? 璁$畻鏈烘槸鍩轟簬2榪涘埗浣撶郴鐨勶紝鎵浠BM鏈夌敤浜庡晢涓氳綆楃殑10榪涘埗璁$畻鏈恒傜畝鍗曠殑浜嬪疄鏄埄鐢╢loat琛ㄨ揪鐨?鐨勫箓嬈★紝鍦ㄧ簿搴﹁寖鍥存槸娌℃湁鑸嶅叆璇樊鐨勩?

緇欏嚭甯哥敤瀹氫箟錛?

浣滃涓嬭綆楋紝浣犱細鏈熷緟鎬庢牱鐨勭粨鏋滃憿錛?

鍒伔鎳掞紝鐢ㄤ綘涔呰繙鐨勫彛綆楄兘鍔涳紝寰堝鏄撳氨鍙互寰楀嚭錛屽畠鏈潵搴旇鏄?銆傝屼簨瀹炰笂錛屾垜浠紵澶х殑璁$畻鏈虹殑絳旀鏄?222784.0

涓轟粈涔堬紵

鍥犱負錛?0000001/20000000鐨勬椂鍊欙紝絳旀鏈簲璇ユ槸0.50000005錛岀敱浜庤垗鍏ヨ宸紝鎴戜滑寰楀埌浜?.5000006銆?

鎺ヤ笅鏉ユ垜浠噺鍘?.5鐨勬椂鍊欙紝寰楀埌鐨勫簲褰撴槸0.00000006錛岃繖鏍鳳紝鎴戜滑灝變涪澶變簡鎵鏈夌殑姝g‘鐨勬暟銆?

鏇寸碂緋曠殑鏄紝璁$畻鏈轟腑瀹為檯寰楀埌鐨勫兼槸5.9604645e-8銆?

鍥犳錛屾偍鐨勫瓨嬈炬埛澶翠笂鍙兘浼氬鉤鐧芥棤鏁呭噺灝?222784鍏冦傚彧鍥犱負閾惰鍐沖畾鍚戜綘鏀粯鍒╂伅涔嬪悗錛岃皟鏁翠簡姹囩巼銆?

鍛冿紝榪欎竴嬈★紝鎴戜滑鍙畠錛?

鐩告秷璇樊鈥斺斾袱涓潪甯哥浉榪戠殑鍊肩浉鍑忔椂錛屽鏋滄秷鍘諱簡緇濆ぇ澶氭暟鏈夋晥鏁板鹼紝閭d箞灝變細鍙戠敓鐩告秷璇樊銆?br>鑸嶅叆璇樊鈥斺旀槸綺劇‘鍊煎拰鍏跺彲琛ㄨ揪鍊間箣闂寸殑宸箋?

濡傛灉榪樻湁浠涔堣璇寸殑錛岄偅灝辨槸錛?br>

Double姣攆loat 鏇存帴榪戝疄鏁幫紝璨屼技涓嶉渶瑕佹垜璇淬?br>嫻偣榪愮畻涓嶉伒瀹堜唬鏁板畾鐞?

姣斿錛歛 = 1.0, b = 3.0e-8, c = 4.0e-8

閭d箞錛?nbsp;   (a+b)+c = 1.0

    a+(b+c) = 1.0000001

涓嶈繃鍔犳硶鍜屼箻娉曡繕鏄弧瓚充氦鎹㈠緥鐨勩?

涓嬩竴嬈★細杞埌浜嗘暣鏁般?



HIMMEL 2007-05-17 22:34 鍙戣〃璇勮
]]>
JavaMail API 瀹炰緥姹囨?/title><link>http://www.tkk7.com/lazing/archive/2007/05/17/118184.html</link><dc:creator>HIMMEL</dc:creator><author>HIMMEL</author><pubDate>Thu, 17 May 2007 14:30:00 GMT</pubDate><guid>http://www.tkk7.com/lazing/archive/2007/05/17/118184.html</guid><wfw:comment>http://www.tkk7.com/lazing/comments/118184.html</wfw:comment><comments>http://www.tkk7.com/lazing/archive/2007/05/17/118184.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/lazing/comments/commentRss/118184.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/lazing/services/trackbacks/118184.html</trackback:ping><description><![CDATA[<div id="djxv991" class="postentry"> <p>鍛冿紝濂藉惂錛屾垜鍙啓榪囦笁涓狫avaMail鐨勭▼搴忋?/p> <p>閮芥槸鎵歸噺閭歡瀹堟姢紼嬪簭銆傚喅瀹氭葷粨涓涓嬶紝甯屾湜闈炲父騫歌繍鎵懼埌榪欑瘒鏂囩珷鐨勪漢涓嶄細鍐嶅榪欎釜鍥版儜銆?/p> <h3>蹇呴』鏄庣櫧鐨勫熀紜鐭ヨ瘑</h3> <ol> <li>STMP鍗忚鏄浣曞伐浣滅殑<br> 鍗忚鐨勬爣鍑嗗湪榪欓噷 <a >http://www.ietf.org/rfc/rfc2821.txt?number=2821</a><br> 涓嬮潰鏄壖瑕佽鏄庯紙<a >http://www.freesoft.org/CIE/Topics/94.htm</a> 錛夛細 <blockquote> <p>Simple Mail Transfer Protocol (SMTP), documented in RFC 821, is Internet’s standard host-to-host mail transport protocol and traditionally operates over TCP, port 25. In other words, a UNIX user can type telnet hostname 25 and connect with an SMTP server, if one is present.</p> <p>SMTP uses a style of asymmetric request-response protocol popular in the early 1980s, and still seen occasionally, most often in mail protocols. The protocol is designed to be equally useful to either a computer or a human, though not too forgiving of the human. From the server’s viewpoint, a clear set of commands is provided and well-documented in the RFC. For the human, all the commands are clearly terminated by newlines and a HELP command lists all of them. From the sender’s viewpoint, the command replies always take the form of text lines, each starting with a three-digit code identifying the result of the operation, a continuation character to indicate another lines following, and then arbitrary text information designed to be informative to a human.</p> </blockquote> <p>浜嬪疄涓婏紝浣犲彲浠ュ儚浣跨敤DOS鍛戒護涓鏍峰彂閫佺數瀛愰偖浠躲?a >http://bbs.stcore.com/archiver/tid-8024.htm </a>褰撶劧鍥犱負鍚勭鍘熷洜錛屼綘鐨勫皾璇曚笉鍙兘鎴愬姛銆備簨瀹炰笂SMTP宸ヤ綔鐨勬椂鍊欏氨鏄畝鍗曠殑鍙戦佸懡浠ゃ傚彇寰楄璇侊紝鍙戦佹暟鎹傚緱鍒板弽棣堛傜‘璁ら鍑鴻繖涔堢畝鍗曘? </p> </li> <li>SMTP涓敤浜庡彂閫佺殑鏁版嵁<br> SMTP涓彂閫佺殑鏁版嵁錛岄伒浠?font size="-1"><strong>Multipurpose Internet Mail</strong> <strong>Extensions</strong> (<strong>MIME</strong>)鏍囧噯錛屽憙錛屾垜涓嶅緱涓嶈錛岃繖鏄繖涓槦鐞冧笂鏈閲嶈鐨勬爣鍑嗕箣涓銆傛墍鏈夌殑浜掕仈緗戦氫俊鍩烘湰閮芥槸鍩轟簬榪欎釜鏍囧噯鐨勬紨鍖栥傞櫎浜嗙數瀛愰偖浠訛紝甯歌鐨勫簲鐢ㄨ繕鍖呮嫭HTTP鎶ユ枃絳夛紙涔熷氨鏄墍鏈夌綉欏典簡錛夛紝鍙﹀鍗充嬌鍦?0騫村悗鍙戝睍鐨刋ML錛屽叾2榪涘埗鏁版嵁鍙戦佷粛鐒跺疄鐢ㄧ殑MIME涓殑緙栫爜鏂瑰紡銆?br> 鎭╋紝榪欓噷灝辨秹鍙婂埌閭歡闄勪歡濡備綍澶勭悊鐨勯棶棰樸傛仼錛岀畝鍗曞湴璇村氨鏄疊ASE64緙栫爜</font></li> </ol> <blockquote> <pre>Table 1: The Base64 Alphabet<br><br>Value Encoding Value Encoding Value Encoding Value Encoding</pre> <pre>0 A 17 R 34 i 51 z<br><br>1 B 18 S 35 j 52 0<br><br>2 C 19 T 36 k 53 1<br><br>3 D 20 U 37 l 54 2<br><br>4 E 21 V 38 m 55 3<br><br>5 F 22 W 39 n 56 4<br><br>6 G 23 X 40 o 57 5<br><br>7 H 24 Y 41 p 58 6<br><br>8 I 25 Z 42 q 59 7<br><br>9 J 26 a 43 r 60 8<br><br>10 K 27 b 44 s 61 9<br><br>11 L 28 c 45 t 62 +<br><br>12 M 29 d 46 u 63 /<br><br>13 N 30 e 47 v<br><br>14 O 31 f 48 w (pad) =<br><br>15 P 32 g 49 x<br><br>16 Q 33 h 50 y</pre> </blockquote> <p>鍦ㄨ繖縐嶇紪鐮佷腑錛屾垜浠皢瀛楃鎴栬呬簩榪涘埗緙栫爜浠?涓瘮鐗逛綅涓轟竴緇勶紝鏇挎崲鎴愮浉搴旂殑瀛楃褰㈠紡銆傛瘮濡?/p> <pre>100110111010001011101001</pre> <p>杞崲緇撴灉灝辨槸</p> <pre>100110 -> 38</pre> <pre>111010 -> 58<br><br>001011 -> 11<br><br>101001 -> 41</pre> <pre>38 -> m<br><br>58 -> 6<br><br>11 -> L<br><br>41 -> p</pre> <pre>m6Lp</pre> <p>浜庢槸錛屾垜浠氨鍙互浠ユ枃鏈殑鏂瑰紡緙栫爜浜岃繘鍒舵祦浠ュ強鎵╁睍ASCII瀛楃錛屾瘮濡備腑鏂囧瓧絎︺?/p> <p>鍩虹鐭ヨ瘑瀹屾瘯錛屼笅闈㈡槸FAQ</p> <h3>Java鍙戦佺數瀛愰偖浠墮渶瑕佸摢浜涜蔣浠跺寘</h3> <p>mail.jar 閫氬父榪樹細闇瑕?activation.jar</p> <blockquote> <p>涓嬭澆鍦板潃<br> http://java.sun.com/products/javabeans/jaf/downloads/index.html<br> https://maven-repository.dev.java.net/nonav/repository/javax.mail/</p> </blockquote> <h3>濡備綍鍙戦侀偖浠?/h3> <p>鍏充簬錛?/p> <ul> <li>濡備綍鍙戦侀偖浠?/li> <li>濡備綍鍙戦佸甫鏈夐檮浠剁殑閭歡</li> <li>濡備綍鍙戦佷腑鏂囬偖浠?/li> <li>閭歡涓枃鏍囬涔辯爜鎬庝箞鍔?/li> <li>閭歡闄勪歡涔辯爜鎬庝箞鍔炵瓑絳夐棶棰?/li> </ul> <p>璇鋒煡鐪嬩互涓嬩唬鐮?/p> <pre class="java"> <span style="color: blue; font-weight: bold;">public</span> <span style="color: blue; font-weight: bold;">static</span> <span style="color: blue; font-weight: bold;">synchronized</span> <span style="color: #993333;">void</span> sendMail<span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">Properties</span></a> settings<span style="color: #66cc66;">)</span><br> <br> <span style="color: blue; font-weight: bold;">throws</span> <a ><span style="color: red; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">{</span><br> <br> <a ><span style="color: red; font-weight: bold;">Properties</span></a> props = <span style="color: blue; font-weight: bold;">new</span> <a ><span style="color: red; font-weight: bold;">Properties</span></a><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br> props.<span style="color: #006600;">put</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"mail.smtp.host"</span>, settings.<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span>StartCore.<span style="color: #006600;">MAIL_SERVER</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br> props.<span style="color: #006600;">put</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"mail.smtp.user"</span>, settings.<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span>StartCore.<span style="color: #006600;">USER_NAME</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br> props.<span style="color: #006600;">put</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"mail.smtp.auth"</span>, <span style="color: #ff0000;">"true"</span><span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">//SMTP鏈嶅姟鍣ㄧ敤鎴烽獙璇?/span><br> <br> <a ><span style="color: red; font-weight: bold;">Authenticator</span></a> auth = <span style="color: blue; font-weight: bold;">new</span> SMTPAuthenticator<span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">String</span></a><span style="color: #66cc66;">)</span> settings<br> <br> .<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span>StartCore.<span style="color: #006600;">USER_NAME</span><span style="color: #66cc66;">)</span>, <span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">String</span></a><span style="color: #66cc66;">)</span> settings<br> <br> .<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span>StartCore.<span style="color: #006600;">PASSWORD</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br> Session session = Session.<span style="color: #006600;">getDefaultInstance</span><span style="color: #66cc66;">(</span>props, auth<span style="color: #66cc66;">)</span>;<br> <br><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">(</span><span style="color: #ff0000;">"true"</span>.<span style="color: #006600;">compareToIgnoreCase</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">String</span></a><span style="color: #66cc66;">)</span> settings.<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"DEBUG"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span><br> <br> session.<span style="color: #006600;">setDebug</span><span style="color: #66cc66;">(</span><span style="color: blue; font-weight: bold;">true</span><span style="color: #66cc66;">)</span>;<br> <br> <span style="color: #66cc66;">}</span><br> <br><span style="color: #808080; font-style: italic;">//鍒涘緩娑堟伅浣?/span><br> <br> MimeMessage msg = <span style="color: blue; font-weight: bold;">new</span> MimeMessage<span style="color: #66cc66;">(</span>session<span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">//璁劇疆鍙戦佷漢閭歡</span><br> <br> msg.<span style="color: #006600;">setFrom</span><span style="color: #66cc66;">(</span><span style="color: blue; font-weight: bold;">new</span> InternetAddress<span style="color: #66cc66;">(</span><span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">String</span></a><span style="color: #66cc66;">)</span> settings<br> <br> .<span style="color: #006600;">get</span><span style="color: #66cc66;">(</span>StartCore.<span style="color: #006600;">USER_MAIL</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">//璁劇疆鎺ユ敹浜洪偖浠?/span><br> <br> address = <span style="color: blue; font-weight: bold;">new</span> InternetAddress<span style="color: #66cc66;">[</span><span style="color: #66cc66;">]</span> <span style="color: #66cc66;">{</span> <span style="color: blue; font-weight: bold;">new</span> InternetAddress<span style="color: #66cc66;">(</span>rs<br> <br> .<span style="color: #006600;">getString</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"GRE_mail"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">}</span>;<br> <br> msg.<span style="color: #006600;">setRecipients</span><span style="color: #66cc66;">(</span>Message.<span style="color: #006600;">RecipientType</span>.<span style="color: #006600;">TO</span>, address<span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">//璁劇疆涓婚錛屼腑鏂囩紪鐮?/span><br> <br> msg.<span style="color: #006600;">setSubject</span><span style="color: #66cc66;">(</span>subject, <span style="color: #ff0000;">"gbk"</span><span style="color: #66cc66;">)</span>;<br> <br> msg.<span style="color: #006600;">setSentDate</span><span style="color: #66cc66;">(</span><span style="color: blue; font-weight: bold;">new</span> <a ><span style="color: red; font-weight: bold;">Date</span></a><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br><a ><span style="color: red; font-weight: bold;">String</span></a> content = <span style="color: #ff0000;">"閭歡姝f枃"</span>;<br> <br> MimeBodyPart mbp1 = <span style="color: blue; font-weight: bold;">new</span> MimeBodyPart<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br> mbp1.<span style="color: #006600;">setText</span><span style="color: #66cc66;">(</span>content, <span style="color: #ff0000;">"gbk"</span><span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">//閭歡闄勪歡</span><br> <br>MimeBodyPart attachFilePart = <span style="color: blue; font-weight: bold;">new</span> MimeBodyPart<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br><a ><span style="color: red; font-weight: bold;">File</span></a> file = <span style="color: blue; font-weight: bold;">new</span> <a ><span style="color: red; font-weight: bold;">File</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"涓枃闄勪歡.txt"</span><span style="color: #66cc66;">)</span>;<br> <br>FileDataSource fds = <span style="color: blue; font-weight: bold;">new</span> FileDataSource<span style="color: #66cc66;">(</span>file.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br>attachFilePart.<span style="color: #006600;">setDataHandler</span><span style="color: #66cc66;">(</span><span style="color: blue; font-weight: bold;">new</span> DataHandler<span style="color: #66cc66;">(</span>fds<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;<br> <br> sun.<span style="color: #006600;">misc</span>.<span style="color: #006600;">BASE64Encoder</span> enc = <span style="color: blue; font-weight: bold;">new</span> sun.<span style="color: #006600;">misc</span>.<span style="color: #006600;">BASE64Encoder</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br> <span style="color: #808080; font-style: italic;">//瑙e喅涓枃闄勪歡鍚嶇О</span><br> <br> attachFilePart.<span style="color: #006600;">setFileName</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"=?gbk?B?"</span><br> <br> + enc.<span style="color: #006600;">encode</span><span style="color: #66cc66;">(</span>file.<span style="color: #006600;">getName</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">getBytes</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"gbk"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> + <span style="color: #ff0000;">"?="</span><span style="color: #66cc66;">)</span>;<br> <br>Multipart mp = <span style="color: blue; font-weight: bold;">new</span> MimeMultipart<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br> mp.<span style="color: #006600;">addBodyPart</span><span style="color: #66cc66;">(</span>mbp1<span style="color: #66cc66;">)</span>;<br> <br> mp.<span style="color: #006600;">addBodyPart</span><span style="color: #66cc66;">(</span>attachFilePart<span style="color: #66cc66;">)</span>;<br> <br>msg.<span style="color: #006600;">setContent</span><span style="color: #66cc66;">(</span>mp<span style="color: #66cc66;">)</span>;<br> <br><span style="color: #808080; font-style: italic;">// send the message</span><br> <br> msg.<span style="color: #006600;">saveChanges</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<br> <br> Transport.<span style="color: #006600;">send</span><span style="color: #66cc66;">(</span>msg<span style="color: #66cc66;">)</span>;<br> <br><span style="color: #66cc66;">}</span></pre> <p>榪欐槸涓婇潰鐢ㄦ埛楠岃瘉鐢ㄥ埌鐨勭被</p> <pre class="java"><span style="color: blue; font-weight: bold;">class</span> SMTPAuthenticator <span style="color: blue; font-weight: bold;">extends</span> javax.<span style="color: #006600;">mail</span>.<a ><span style="color: red; font-weight: bold;">Authenticator</span></a> <span style="color: #66cc66;">{</span></pre> <pre class="java"> <span style="color: blue; font-weight: bold;">private</span> <a ><span style="color: red; font-weight: bold;">String</span></a> username;<br> <br> <span style="color: blue; font-weight: bold;">private</span> <a ><span style="color: red; font-weight: bold;">String</span></a> password;<br> <br> <span style="color: #808080; font-style: italic;">/**<br> <br> * @param username<br> <br> * @param password<br> <br> */</span><br> <br> <span style="color: blue; font-weight: bold;">public</span> SMTPAuthenticator<span style="color: #66cc66;">(</span><a ><span style="color: red; font-weight: bold;">String</span></a> username, <a ><span style="color: red; font-weight: bold;">String</span></a> password<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span><br> <br> <span style="color: blue; font-weight: bold;">this</span>.<span style="color: #006600;">username</span> = username;<br> <br> <span style="color: blue; font-weight: bold;">this</span>.<span style="color: #006600;">password</span> = password;<br> <br> <span style="color: #66cc66;">}</span><br> <br> <span style="color: blue; font-weight: bold;">public</span> <a ><span style="color: red; font-weight: bold;">PasswordAuthentication</span></a> getPasswordAuthentication<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span><br> <br> <span style="color: blue; font-weight: bold;">return</span> <span style="color: blue; font-weight: bold;">new</span> <a ><span style="color: red; font-weight: bold;">PasswordAuthentication</span></a><span style="color: #66cc66;">(</span>username, password<span style="color: #66cc66;">)</span>;<br> <br> <span style="color: #66cc66;">}</span><br> <br><span style="color: #66cc66;">}</span></pre> <h3>閭歡鍙戦佸嚭閿?/h3> <blockquote> <p>What causes an “javax.activation.UnsupportedDataTypeException: no object DCH for MIME type xxx/xxxx javax.mail.MessagingException: IOException while sending message;” to be sent and how do I fix this? [This happens for known MIME types like text/htm</p> </blockquote> <p>浜嬪疄涓婅繖涓槸閭歡鍙戦佹椂楠岃瘉緇勪歡璁劇疆涓嶅綋寮曡搗鐨勶紝榪欎釜緇勪歡閰嶇疆鏂規硶濡備笅</p> <blockquote> <p>(http://java.sun.com/j2ee/1.4/docs/api/javax/activation/MailcapCommandMap.html)</p> <p>The MailcapCommandMap looks in various places in the user’s system for mailcap file entries. When requests are made to search for commands in the MailcapCommandMap, it searches mailcap files in the following order:</p> <p>1) Programatically added entries to the MailcapCommandMap instance.<br> 2) The file .mailcap in the user’s home directory.<br> 3) The file /lib/mailcap.<br> 4) The file or resources named META-INF/mailcap.<br> 5) The file or resource named META-INF/mailcap.default (usually found only in the activation.jar file).</p> </blockquote> <p>鎴戦夌敤浜嗙鍥涚鏂規硶錛屽湪鐢熸垚鐨凧ar鏂囦歡涓姞鍏ヤ簡 META-INF/mailcap.</p> <pre class="apache"><span style="color: #adadad; font-style: italic;">#</span><br><span style="color: #adadad; font-style: italic;"># This is a very simple 'mailcap' file</span><br><span style="color: #adadad; font-style: italic;">#</span><br>image/gif;; x-java-view=com.sun.activation.viewers.ImageViewer<br>image/jpeg;; x-java-view=com.sun.activation.viewers.ImageViewer<br>text/*;; x-java-view=com.sun.activation.viewers.TextViewer<br>text/*;; x-java-edit=com.sun.activation.viewers.TextEditor<br>text/html;; x-java-content-handler=com.sun.mail.handlers.text_html<br>text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml<br>text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain<br>multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed<br>message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822</pre> </div><img src ="http://www.tkk7.com/lazing/aggbug/118184.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/lazing/" target="_blank">HIMMEL</a> 2007-05-17 22:30 <a href="http://www.tkk7.com/lazing/archive/2007/05/17/118184.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Ave7.net BLSNS妗嗘灦鐮旂┒鎶ュ憡http://www.tkk7.com/lazing/archive/2007/01/19/94993.htmlHIMMELHIMMELFri, 19 Jan 2007 14:34:00 GMThttp://www.tkk7.com/lazing/archive/2007/01/19/94993.htmlhttp://www.tkk7.com/lazing/comments/94993.htmlhttp://www.tkk7.com/lazing/archive/2007/01/19/94993.html#Feedback4http://www.tkk7.com/lazing/comments/commentRss/94993.htmlhttp://www.tkk7.com/lazing/services/trackbacks/94993.html鍛煎懠錛屽啓榪欎釜鍒漢鐪嬩笉鎳傜殑棰樼洰寰堜笉鐫璋冦傚叾瀹炴牳蹇冨唴瀹瑰氨鏄Java AJAX妗嗘灦鍋氫釜灝忕瑪璁幫紝璁板綍涓涓嬫垜鐨勫疄璺靛績寰椼?

鍥犱負瑕佽繕鎹㈢┖闂翠簡錛岀粓浜庡彲浠ヤ負鑷繁鐨勭綉绔欏啓Java紼嬪簭浜嗭紝鍒氬ソ鑰佸笀瑕佹垜鎬葷粨涓涓嬶紝鎻愪緵涓涓嵆鎻掑嵆鐢ㄧ殑Ajax JAVA鐜銆?

姹梸~涓嶈繃綆鍗曠編錛屾垜灝卞紑蹇冪殑璇翠竴涓嬪惂銆?

妗嗘灦閫夋嫨姹囨?

閫夋嫨鐞嗙敱

Dojo

鎴戞渶鐖辯殑灝辨槸Dojo銆侱ojo鎻愪緵浜嗕赴瀵岀殑Widget鍜屼笉鏂鍔犵殑鏁欑▼鏂囨。銆傛嫢鏈変簡IBM鍜孲UN鐨勫畼鏂規敮鎸併傛洿閲嶈鐨勬槸錛孌ojo涓嶆涓篔ava璁捐錛孌ojo鏄竴涓氱敤鐨勫鉤鍙幫紝榪欐剰鍛崇潃錛屾墍鏈夋渶鏂扮殑鎶鏈兘鍙互縐繪鍒癉ojo涓婇潰鏉ワ紝鑰屼綘騫朵笉闇瑕侀噸鏂板涔犮?

Dojo鏈澶х殑寮辯偣鏄紝鍚姩緙撴參錛屽畼鏂圭綉绔欏湪緗戠粶璐ㄩ噺涓嶅ソ鐨勬椂鍊欎細鏈夋鏈虹殑鎰熻銆備笉榪囦緷鐒惰寰?.3鍒?.4鐨勫法澶ф儕鍠溿傛垜鐩鎬俊闅忕潃Dojo鐨勬垚鐔燂紝瀵瑰叾鐨勫涔犳槸涓縐嶄繚鍊肩殑鎶曡祫銆?

DWR

榪欐槸鐩墠鍑犱釜妗嗘灦涓紝鎴戝敮涓娌℃湁鍦ㄥ疄闄呴」鐩腑浣跨敤榪囩殑銆備箣鍓嶇敤Dojo鍜學W鍐欑▼搴忕殑鏃跺欙紝浣跨敤JSON浣滀負鏁版嵁 濯掍粙錛堟病鏈夌敤RPC錛夈傚啓浜嗗緢澶氫唬鐮佹潵璐熻矗鍚屾JSON涓嶫AVA瀵硅薄銆傜洰鍓嶇湅鏉WR鍙互寰堝ソ鐨勮В鍐寵繖涓棶棰樸傝屼笖錛岄殢鐫Annotation鐨勬祦琛岋紝榪為厤緗兘涓嶇敤浜嗐?

Struts2 / WW

鐩墠娌℃湁鐢ㄨ繃Struts 2涓嶈繃浠庡墠韜玏W鐨勮〃鐜版潵鐪嬶紝緇濆鏄紑鍙戦熷害涔嬮夈備赴瀵岀殑鎵╁睍鏀寔錛岃壇濂界殑鎺ュ彛璁捐錛屼負鏄撳彉鐨刉eb鐜鎻愪緵浜嗚垝閫傜殑寮鍙戜綋楠屻傚啀鍔犱笂Apache鐨勫ぇ鍚嶏紝閭e氨绱犺川閲忕殑淇濊瘉鍟娿傝櫧鐒舵湁Ajax鏀寔鐨勯浮鑲嬶紙T_T鍘熻皡鎴戯紝鎴戞槸鐪熺殑涓嶄細鐢ㄩ偅涓級銆係truts2鍚屾牱寮濮嬫敮鎸丄nnotation閰嶇疆錛岀湡鏄負鎴戠渷蹇冨晩銆?

Spring

Spring is coming鈥?.

娌℃湁鐞嗙敱錛屽彧瑕佷笉鐢‥JB錛岄偅涔堝彧鏈塖pring鎵嶆槸J2EE鐨勯夋嫨錛岃壇濂界殑鎵╁睍鎬э紝鏃犳墍涓嶅湪鐨勭畝媧併傛諱功璁版庝箞璇存潵鐫錛熷拰璋愮編鍟娿係pring灝辨槸鍜岃皭錛岃閭d竴鐗囦竴鐗囪彵瑙掑垎鏄庣殑妗嗘灦緇撳悎鐨勫ぉ琛f棤緙濄傛昏岃█涔嬩竴鍙ヨ瘽錛孲pring灝辨槸绔崍鑺傜殑緋背鍟娿傦紙閭h皝鏄步瀛愬彾鍛紵錛?

Hibernate 涓?iBatis

鍏跺疄鎸佷箙灞傜殑閫夋嫨灝辮鐪侀噸涓鐐逛簡銆?

Hibernate寰堟柟渚匡紝鏂逛究鍒板お瀹規槗鐘敊璇傛墍浠ユ垜鎶奿Batis鍒楄繘鍘伙紝榪欐槸鎬ц兘鍜屽仴澹х殑鑰冭檻銆?

鎴戞槑鐧紿ibernate鏈夊涔堟柟渚匡紝濡傛灉涓や笁涓湀灝辮浜や粯涓涓」鐩紝Hibernate鑳藉璁╀綘蹇樻帀SQL鐨勫瓨鍦ㄣ備絾鏄鍋氫竴涓昏緫澶嶆潅鐨凷NS绔欑偣錛宨Batis鏃犵枒鏇磋交宸ф洿鑰冮獙鎵嶆櫤銆?

浠ヤ笂錛屽啀鍔犱笂Acegi鍜宎xis2錛堟殏鏃舵病鎵撶畻鐢級錛屽紑蹇冪殑鐜㎎ava AJAX鍚?/p>

HIMMEL 2007-01-19 22:34 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲乱色伦图片区小说| 久久WWW免费人成—看片| 亚洲色一色噜一噜噜噜| 99久久99这里只有免费的精品| 亚洲av日韩av无码| 在线永久免费观看黄网站| 国产无遮挡又黄又爽免费网站| 亚洲一区二区影视| 亚洲一区无码精品色| 在线看片韩国免费人成视频| 日韩一级片免费观看| 亚洲成av人片不卡无码| 亚洲国产一区明星换脸| 久久久高清免费视频| 中国国产高清免费av片| 亚洲日韩乱码中文字幕| 亚洲级αV无码毛片久久精品| 天天摸天天碰成人免费视频| a级成人毛片免费视频高清| 亚洲日本一线产区和二线产区对比| 伊伊人成亚洲综合人网7777| 性感美女视频在线观看免费精品 | 久久九九久精品国产免费直播| 亚洲高清在线mv| 国产精品亚洲二区在线观看| 成年人视频在线观看免费| 国产一级淫片a免费播放口| 综合一区自拍亚洲综合图区 | 男女一进一出抽搐免费视频| 亚洲综合色7777情网站777| 久久久久久久尹人综合网亚洲| 国产成人高清精品免费软件| 84pao强力永久免费高清| 一个人免费观看视频在线中文| 亚洲丁香婷婷综合久久| 亚洲激情黄色小说| 亚洲av无码一区二区乱子伦as | 国产一区在线观看免费| 国产免费不卡v片在线观看| 久久伊人免费视频| a视频免费在线观看|