Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

java½Ó¿ÚºÍ³éÏóÀà

Ê×ÏÈjava½Ó¿ÚºÍ³éÏóÀà´ú±íµÄ¾ÍÊdzéÏóÀàÐÍ£¬¾ÍÊÇÎÒÃÇÐèÒªÌá³ö³éÏó²ãµÄ¾ßÌåʵÏÖ£¬Èç¹ûÒªÌá¸ß³ÌÐòµÄ¸´ÓÃÂÊ£¬¿Éά»¤ÐÔ£¬¿ÉÀ©Õ¹ÐÔ£¬¾Í±ØÐëÃæÏò½Ó¿ÚºÍ³éÏó±à³Ì£¬ÕýȷʹÓÃËûÃÇ¡£ £¨1£©³éÏóÀà¿ÉÒÔÌṩʵÏÖ·½·¨£¬½Ó¿Ú²»ÄÜ
ÕâÊdzéÏóÀàµÄΨһÓŵ㣬¶øÇҷdz£ÓÐÓã¬ÀýÈ磬Ä㶨ÒåÒ»¸ö½Ó¿Ú£¬×ÓÀ಻ÐèÒªËûµÄËùÓз½·¨£¬¿ÉÊÇÄãû°ì·¨²»È¥ ......

Java Semaphore

package test;
/**
*
* @author openpk
*/
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
public class Main {
public static void main(String[] args) {
// Ï̳߳Ø
ExecutorService exec = Executors ......

How Java handles arguments of a class type.

=====suppose such a method:
public static void openFile(String fileName, PrintWriter stream) throws FileNotFoundException
{
   stream = new PrintWriter(fileName);
}
=====then we want to use it this way:
PrintWriter toFile = null;
try
{
   openFile("data.txt", t ......

ÔÚJAVAÎļþÖлñÈ¡¸ÃÏîÄ¿µÄÏà¶Ô·¾¶

ÔÚJAVAÎļþÖлñÈ¡¸ÃÏîÄ¿µÄÏà¶Ô·¾¶
1.»ù±¾¸ÅÄîµÄÀí½â
¡¡¡¡¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:\xyz\test.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸ö
URL¾ø¶Ô·¾¶¡£
¡¡¡¡Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄ ......

JavaÖеĶÑÕ»(°ïÄãÀí½âÄÚ´æÄ£ÐÍ)

JavaÖжÑÕ»µÄ¸ÅÄȻÊÇÂß¼­Éϵģ¬ÔÚÍêÈ«·ûºÏJava¹æ·¶µÄJava´¦ÀíÆ÷ÃæÊÀ֮ǰ£¬ËùÓÐJavaÐéÄâ»úÌṩµÄÄÚÈݶ¼ÊÇÓÉÈí¼þÄ£Äâ³öÀ´µÄ¡£
ʲô½Ð¶Ñ£¿ÄãÓÃÊ®¼¸¸öÂ齫ůÊúÖ±µþ³ÉÒ»ÞûÕâ½Ð¶Ñ£¬Äã¿ÉÒÔ´ÓÉÏÃæ¡¢ÏÂÃæ¡¢ÖмäÈÎÒâ³é³öÒ»ÕÅÅÆ£¬Ò²¿ÉÒÔÈÎÒâ²åÈëÒ»ÕÅ¡£
ʲô½ÐÕ»£¿AK-47µÄµ¯Ï»¾ÍÊÇÒ»¸öÕ»£¬ÔÚÉÏÃæµÄ×Óµ¯Ã»±»È¡³ö֮ǰ£¬ÄãÎÞ·¨È¡³öÏÂà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ