<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Servlet使用

    1.1重定向(如果對方不支持cookie,回寫sessionID進行session跟蹤)
    ?response.sendRedirect(response.encodeRedirectURL(request.getContextPath()+"/next"));
    ******************************************************************
    1.2轉發
    ?RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url);
    ?dispatcher.forward(request,response);
    ******************************************************************
    1.3字符
    ??request.setCharacterEncoding("utf-8");
    ??response.setContentType("text/html;charset=utf-8");
    ******************************************************************
    String servletPath = request.getServletPath();
    ??servletPath = servletPath.substring(servletPath.lastIndexOf("/") + 1);
    ??String operation = servletPath.substring(0, servletPath.indexOf(".do"));
    1.設置連接超時時間(分鐘)
    ?<session-config>
    ??<session-timeout>50</session-timeout>
    ?</session-config>
    ******************************************************************
    4.相對路徑匹配
    ?1>絕對匹配?/xx/yy
    ?2>后綴匹配?*.xx
    ?3>后面匹配?/xx/*
    ******************************************************************
    5.監聽器
    5.1ServletRequestListener
    ???getServletContext()
    ???getServletRequest()
    ?requestDestroyed(ServletRequestEvent)
    ?requestInitialized(ServletRequestEvent)
    5.2HttpSessionListener
    ???getSession()
    ?sessionCreated(HttpSessionEvent)
    ?sessionDestroyed(HttpSessionEvent)
    5.3ServletContextListener
    ???getServletContext()
    ?contextInitialized(ServletContextEvent)
    ?contextDestroyed(ServletContextEvent)
    ?
    5.4ServletRequestAttributeListener
    ???getName()
    ???getValue()
    ?attributeAdded(ServletRequestAttributeEvent)
    ?attributeRemoved(ServletRequestAttributeEvent)
    ?attributeReplaced(ServletRequestAttributeEvent)
    5.5HttpSessionAttributeListener
    ???getName()
    ???getValue()
    ???getSession()
    ?attributeAdded(HttpSessionBindingEvent)
    ?attributeRemoved(HttpSessionBindingEvent)
    ?attributeReplaced(HttpSessionBindingEvent)
    5.6ServletContextAttributeListener
    ???getName()
    ???getValue()
    ?attributeAdded(ServletContextAttributeEvent)
    ?attributeRemoved(ServletContextAttributeEvent)
    ?attributeReplaced(ServletContextAttributeEvent)

    posted on 2008-04-19 20:31 金家寶 閱讀(404) 評論(0)  編輯  收藏 所屬分類: J2EE 基礎


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 中文字幕乱码亚洲无线三区| 91亚洲va在线天线va天堂va国产| 亚洲人成综合在线播放| 青青草原1769久久免费播放| 中文字幕中韩乱码亚洲大片| 国产精品黄页免费高清在线观看| 亚洲成av人片在线观看天堂无码| 人妻无码中文字幕免费视频蜜桃| 无遮挡呻吟娇喘视频免费播放| 国产精品视_精品国产免费| 欧美色欧美亚洲另类二区| 国产一区二区三区免费看| 日日狠狠久久偷偷色综合免费| 亚洲午夜AV无码专区在线播放 | 国产精品亚洲高清一区二区| 瑟瑟网站免费网站入口| 国产亚洲人成A在线V网站| 久久国产精品成人免费 | 久久精品国产亚洲av麻豆蜜芽 | 国产在线不卡免费播放| a一级爱做片免费| 国产亚洲精AA在线观看SEE| 欧美亚洲精品一区二区| 亚洲国产精品成人| 黄色片免费在线观看| 亚洲人和日本人jizz| 国产免费人成在线视频| 在线免费观看伊人三级电影| 亚洲激情电影在线| 国产一区二区免费| 亚洲男人的天堂久久精品| 国产免费爽爽视频免费可以看| a级在线免费观看| 亚洲国产激情在线一区| 亚洲AV无码不卡在线观看下载| 久久久久成人片免费观看蜜芽 | 免费国产a理论片| 337p日本欧洲亚洲大胆色噜噜| 热99re久久免费视精品频软件| 99999久久久久久亚洲| 一区二区三区亚洲视频|