java Filter__Îå¸öÓÐÓõĹýÂËÆ÷(Èý)
Îå¸öÓÐÓõĹýÂËÆ÷
Ò»¡¢Ê¹ä¯ÀÀÆ÷²»»º´æÒ³ÃæµÄ¹ýÂËÆ÷
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 Èç¹ûÓû§Î´µÇ¼£¬ÔòÖØ¶¨Ïòµ½Ö¸¶¨µÄÒ³Ãæ£
Ïà¹ØÎĵµ£º
Ctrl+1 ¿ìËÙÐÞ¸´(×î¾µäµÄ¿ì½Ý¼ü,¾Í²»Óöà˵ÁË)
Ctrl+D: ɾ³ýµ±Ç°ÐÐ
Ctrl+Alt+↓ ¸´ÖƵ±Ç°Ðе½ÏÂÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Ctrl+Alt+↑ ¸´ÖƵ±Ç°Ðе½ÉÏÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Alt+↓ µ±Ç°ÐкÍÏÂÃæÒ»Ðн»»¥Î»ÖÃ(ÌØ±ðʵÓÃ,¿ÉÒÔʡȥÏȼôÇÐ,ÔÙÕ³ÌùÁË)
Alt+↑ µ±Ç°ÐкÍÉÏÃæÒ»Ðн»»¥Î»ÖÃ(ͬÉÏ)
Alt+← ǰһ¸ö±à¼µ ......
26.ÒÆ¶¯Ò»¸öÎļþ¼ÐÏÂËùÓÐÎļþµ½ÁíÒ»¸öĿ¼
//import java.io.*;
File movefile=new File(%%1);
File[] movefiles=movefile.listFiles();
for(int i=0;i<movefiles.length;i++){
if(movefiles[i].isFile()){
int bytesum = 0;
int byteread  ......
AddressModel md = (AddressModel) getModel(AddressModel.class, request);
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(byteOut);
out.writeObject(md);
ByteArra ......
73.FTPÏÂÔØ
/*
import sun.net.ftp.FtpClient;
import java.io.*;
import sun.net.*;
*/
//Èç¹ûÎļþÔÚij¸öĿ¼Ï£¬Ôò¼ÓÈëfc.cd("foodir");
//±ÈÈçÒªÏÂÔØftp://ftp.xx.com/index.htmlÔò£º
try
{
FtpClient fc=new FtpClient("ftp.xx.com");
fc.logi ......