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

Java Îå¸öÓÐÓõĹýÂËÆ÷

Îå¸öÓÐÓõĹýÂËÆ÷
Ò»¡¢Ê¹ä¯ÀÀÆ÷²»»º´æÒ³ÃæµÄ¹ýÂËÆ÷    
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
* ÓÃÓÚµÄʹ Browser ²»»º´æÒ³ÃæµÄ¹ýÂËÆ÷
*/
public class ForceNoCacheFilter implements Filter {

public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException
{
((HttpServletResponse) response).setHeader("Cache-Control","no-cache");
((HttpServletResponse) response).setHeader("Pragma","no-cache");
((HttpServletResponse) response).setDateHeader ("Expires", -1);
filterChain.doFilter(request, response);
}

public void destroy()
{
}

public void init(FilterConfig filterConfig) throws ServletException
{
}
}      
  
¶þ¡¢¼ì²âÓû§ÊÇ·ñµÇ½µÄ¹ýÂËÆ÷    
   
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.IOException;

/**
* ÓÃÓÚ¼ì²âÓû§ÊÇ·ñµÇ½µÄ¹ýÂËÆ÷£¬Èç¹ûδµÇ¼£¬ÔòÖض¨Ïòµ½Ö¸µÄµÇ¼ҳÃæ
* ÅäÖòÎÊý
* checkSessionKey Ðè¼ì²éµÄÔÚ Session Öб£´æµÄ¹Ø¼ü×Ö
* redirectURL Èç¹ûÓû§Î´µÇ¼£¬ÔòÖض¨Ïòµ½Ö¸¶¨µÄÒ³Ã棬URL²»°üÀ¨ ContextPath
* notCheckURLList ²»×ö¼ì²éµÄURLÁÐ±í£¬ÒԷֺŷֿª£¬²¢ÇÒ URL Öв»°üÀ¨ ContextPath
*/
public class CheckLoginFilter
implements Filter
{
protected FilterConfig filterConfig = null;
private String redirectURL = null;
private List notCheckURLList = new ArrayList();
private String sessionKey = null;

public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterC


Ïà¹ØÎĵµ£º

ѧϰJavaµÄѧϰ˳Ðò


ѧϰJavaµÄѧϰ˳Ðò
µÚÒ»½×¶Î(ËĸöÔÂ)
 
1.j2se
  ÃæÏò¶ÔÏó£­·â×°¡¢¼Ì³Ð¡¢¶à̬
ÄÚ´æµÄ·ÖÎö
µÝ¹é
¼¯ºÏÀà(Set,List,MapµÄ×ÓÀà)¡¢·ºÐÍ¡¢×Ô¶¯´ò°üÓë½â°ü¡¢Annotation
IOÁ÷(IOÁ÷ºÍÏ̱߳àдһ¸öQQÁÄÌì³ÌÐò)
¶àÏ̡߳¢Ïß³Ìͬ²½
TCP/UDP
AWT¡¢Ê¼þÄ£ÐÍ¡¢ÄäÃûÀà (ÄܲéѯÊý¾Ý¿âÏÔʾÔÚJtableÉÏÃæ)
ÕýÔò± ......

JAVA±à³Ì¹æ·¶

ÃüÃû¹æ·¶
 
¶¨ÒåÕâ¸ö¹æ·¶µÄÄ¿µÄÊÇÈÃÏîÄ¿ÖÐËùÓеÄÎĵµ¶¼¿´ÆðÀ´ÏñÒ»¸öÈËдµÄ£¬Ôö¼Ó¿É¶ÁÐÔ£¬¼õÉÙÏîÄ¿×éÖÐÒòΪ»»È˶ø´øÀ´µÄËðʧ¡££¨ÕâЩ¹æ·¶²¢²»ÊÇÒ»¶¨Òª¾ø¶Ô×ñÊØ£¬µ«ÊÇÒ»¶¨ÒªÈóÌÐòÓÐÁ¼ºÃµÄ¿É¶ÁÐÔ£©
 
Package µÄÃüÃû
Package µÄÃû×ÖÓ¦¸Ã¶¼ÊÇÓÉÒ»¸öСдµ¥´Ê×é³É¡£
 
Class µÄÃüÃû
Class µÄÃû×Ö±ØÐë ......

ʹÓÃEclipseÓëAnt½øÐÐjava³ÌÐò¿ª·¢

ÏàÐÅ´ó¼ÒÒѾ­¶ÔEclipseµÄʹÓÃÓÐÒ»¶¨µÄ¾­Ñé,ÔÚ±àдjavaÔ´´úÂëÊǼþÌý×ÔºÀµÄÊÂ,´óÒª±àÒëÒ»´óÅújavaÔ´´úÂëȴʵ¼ù±È½Ï¿àÄÕµÄÊÂÇé,Èç¹ûÒ»¸öÒ»¸öµã"run"È¥±àÒëʵÔÚÌ«ÀË·Ñʱ¼äÁË.ÏëÍÑÀë"¿àº£",ÏÖÔھ͸ú×ÅżÃÇÒ»Æë×ß°É,²½ÈëAntµÄʹÓÃÀú³Ì.
    1.°²×°Ant
    a.ʹÓÃEclipse.3.2°æ±¾×Ô´øµÄAnt¿ÉÒÔÊ¡È ......

Java±à³Ìʵ¼ùÓ¦ÓãºJ2EE¼Ü¹¹µÄ6¸ö×î¼Ñʵ¼ù


2008-04-26 09:25 ×÷Õߣºsuperman À´Ô´£ºÈüµÏÍø
[ÕªÒª] Ê×ÏÈ£¬±¾ÎĵÄÄ¿±ê¶ÁÕßÊÇÕýÔÚ´Óʼ¼Êõ¹¤×÷µÄ¼Ü¹¹Ê¦¡£±ÜÃâ½²ÊöһЩ³Â¸¯µÄ×î¼Ñʵ¼ù£¬ÀýÈç"ÈÕ³£¹¹½¨£¨build daily£©"¡¢"²âÊÔÒ»ÇУ¨test everything£©"ºÍ"¾­³£¼¯³É£¨ integrate often£©¡£ ÈκξßÓгÆÖ°¼Ü¹¹Ê¦µÄÏîÄ¿¶¼Óзֹ¤Ã÷È·µÄ¡¢¶¨ÒåÁ¼ºÃµÄÍŶӽṹ¡£ËûÃÇ»¹Îª½øÐбà ......

²ÉÓÃJavaµÄÀà½øÐÐmd5¼ÓÃÜ

´úÂëÈçÏ£º
package com.test.j2se;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MD5 {
/**Êý¾Ý¼ÓÃÜ
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
MessageDigest code = MessageD ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ