<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進(jìn)行session跟蹤)
    ?response.sendRedirect(response.encodeRedirectURL(request.getContextPath()+"/next"));
    ******************************************************************
    1.2轉(zhuǎn)發(fā)
    ?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.設(shè)置連接超時時間(分鐘)
    ?<session-config>
    ??<session-timeout>50</session-timeout>
    ?</session-config>
    ******************************************************************
    4.相對路徑匹配
    ?1>絕對匹配?/xx/yy
    ?2>后綴匹配?*.xx
    ?3>后面匹配?/xx/*
    ******************************************************************
    5.監(jiān)聽器
    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 基礎(chǔ)


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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲精品成人片在线播放| 亚洲精品无码不卡在线播HE| 国产精品亚洲片在线| 亚洲国产美女精品久久久| 深夜a级毛片免费视频| 九九全国免费视频| 99久久婷婷免费国产综合精品| 曰批全过程免费视频在线观看无码| 日本zzzzwww大片免费| 最近免费中文字幕大全| 国产精品免费电影| 国产亚洲成人在线播放va| 亚洲AV人人澡人人爽人人夜夜| 亚洲一卡二卡三卡四卡无卡麻豆| 亚洲av综合av一区二区三区 | 两个人看www免费视频| 日本一道一区二区免费看| 中文字幕专区在线亚洲| 亚洲欧美成aⅴ人在线观看| 中文成人久久久久影院免费观看| 日韩中文字幕在线免费观看| 亚洲国产精品日韩在线观看| 国产成人亚洲综合无| 青青青国产手机频在线免费观看 | 亚洲国产天堂久久综合| 亚洲国产高清在线| 亚洲一区二区观看播放| 国产免费播放一区二区| 三年片在线观看免费大全| JLZZJLZZ亚洲乱熟无码| 亚洲乱码卡一卡二卡三| 国产激情久久久久影院老熟女免费| 91黑丝国产线观看免费| 三上悠亚亚洲一区高清| 国产成人亚洲毛片| 日本高清免费aaaaa大片视频| 亚洲视频在线观看2018| 疯狂做受xxxx高潮视频免费| 在线观看免费污视频| 亚洲AV日韩精品久久久久久久| 久久av免费天堂小草播放|