<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)航:
     
    主站蜘蛛池模板: 午夜时刻免费入口| 中文字幕av无码无卡免费| 亚洲国产中文v高清在线观看| 亚洲一区AV无码少妇电影| 在线观看免费高清视频| 亚洲中文字幕AV在天堂| 午夜高清免费在线观看| 国产大陆亚洲精品国产| 亚洲精品国产成人影院| 国产婷婷成人久久Av免费高清 | 6080午夜一级毛片免费看| 亚洲性色成人av天堂| 成年女人男人免费视频播放| 亚洲性无码一区二区三区| 国产网站在线免费观看| 日韩久久无码免费毛片软件| 久久亚洲欧洲国产综合| 久久美女网站免费| 亚洲最新中文字幕| 全免费一级毛片在线播放| 看一级毛片免费观看视频| 亚洲午夜爱爱香蕉片| 久久国产精品免费看| 国产婷婷综合丁香亚洲欧洲| 精品免费国产一区二区| EEUSS影院WWW在线观看免费| 亚洲AV日韩精品久久久久久久| 免费阿v网站在线观看g| 污网站免费在线观看| 好看的亚洲黄色经典| 2021国产精品成人免费视频| 国产亚洲综合视频| 久久精品国产亚洲一区二区| 无码专区永久免费AV网站| 色婷婷综合缴情综免费观看| 亚洲三级电影网站| 日本黄页网站免费| 国产成人AV片无码免费| 色噜噜噜噜亚洲第一| 亚洲精品免费观看| 国产免费小视频在线观看|