Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Äêµ×ÊÕ²ØϵÁÐ Java Web¹¤¾ßCookieSupport

/*
* CookieSupport.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
package org.lambdasoft.web.support;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.lambdasoft.utils.StringUtils;
/**
* @author TangLei <justinlei@gmail.com>
* @date 2008-12-17
*/
public class CookieSupport {
private CookieSupport() {
}
/**
* дcookies
*
* @param response
* @param cookieParams
* @param maxAge
*/
public static final void writeCookies(HttpServletResponse response,
Map<String, String> cookieParams, int maxAge) {
if (cookieParams == null || cookieParams.size() == 0)
return;
Set<String> keySet = cookieParams.keySet();
for (String key : keySet) {
Cookie cookie = new Cookie(key, cookieParams.get(key));
cookie.setMaxAge(maxAge);
response.addCookie(cookie);
}
}

/**
* ɾ³ýËùÓеÄcookies
* @param request
* @param response
*/
public static final void removeAllCookies(HttpServletRequest request,HttpServletResponse response) {
Cookie[] cookies = request.getCookies();
if(cookies == null || cookies.length == 0)


Ïà¹ØÎĵµ£º

ʵ¼ùJavaÖУ¬Jniµ÷ÓÃDLLÎļþ±¾µØ·½·¨

JavaÖУ¬Jniµ÷ÓÃDLLÎļþÊÔÑé
 
ËùÓÐÎļþ¾ùÔÚE:\·¾¶Ï¡£
°²×°jdk1.6.0_07
°²×°ÁËVC++6.0
µÚÒ»²½£¬
HelloWorld.java
µÚ¶þ²½£¬
E:\>javac HelloWorld.java
µÃµ½
HelloWorld.class
µÚÈý²½£¬
E:\>javah HelloWorld
µÃµ½
HelloWorld.h
µÚËIJ½£¬
±àдһ¸öCÎļþ
HelloWorldImp.c
µÚÎå²½£¬
ʹÓÃcl±àÒ ......

rxtxÈ¡´újavax.commʵÏÖJava¿çƽ̨É豸¶Ë¿ÚͨÐÅ

from Rxtx
This page is for general content regarding the use of rxtx. Feel free to add your own content.
Using RXTX In Eclipse
Deploying JAVA with RXTX
I wrote an app several months ago using javax.comm on windows. Sun has left me high and dry. rxtx help!
download ftp://ftp.qbang.org/pub/rx ......

Java·þÎñ¶Ë½ÓÊÜget·½Ê½´«Ë͵ĺº×ÖתÂë·½·¨

1.ÓÃnew String(request.getParameter("name").getBytes("ISO-8859-1"),"GBK") ·½Ê½½øÐÐתÂë
2.ÉèÖÃtomcat£ºÔÚtomcatµÄconfĿ¼ÏÂÕÒµ½server.xmlÎļþ£¬ÔÚConnector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000" ......

Java CorbaʵÀý £¨Ô­×÷Õߣº×ÏϪ£©

ÕâƪÎÄÕºÍSUN¹«Ë¾ÌṩµÄ½Ì³ÌÀàËÆ£¬Öмä¶àÁËÒ»¸öHelloImplµÄjavaÎļþ£¬±àÒëʱµÄÃüÁîÒ²¾ÍÓÐËù²»Í¬ÁË
Ô­À´µÄÃüÁîΪ£ºServer  javac HelloServer.java HelloApp/*.java
                        ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ