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

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

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

    Welcome 布拉格

    BlogJava 首頁 聯系 聚合 管理
      6 Posts :: 13 Stories :: 15 Comments :: 0 Trackbacks

    ?<FORM id="form1" METHOD=POST ACTION="publishAction.jsp" onSubmit="return check();">
    ? 獲取apache目錄<br/>
    ? 發布css,js,img等靜態資源文件<br/>
    ?? <br/>
    ? <br/>
    ? <%String docBase = pageContext.getServletContext().getRealPath("/");%><br/>
    ? 顯示出 <%=docBase%> 文件列表<br/>
    ? <%
    ?? File f = new File(docBase);
    ? %>
    ? <table class="listTable">
    ? <tr>
    ?? <th>JSP文件</th>
    ?? <th>啟用緩存</th>
    ?? <th>緩存文件</th>
    ?? <th></th>
    ?? <th></th>
    ? </tr>
    ? <c:forEach var="filename" items="<%=f.list()%>">
    ? <c:if test="${fn:endsWith(filename, '.jsp')}">
    ?? <tr>
    ?? <td>${filename}</td>
    ?? <td>啟用</td>
    ?? <td>
    ?? <%
    ??? String fileName = (String)pageContext.findAttribute("filename");
    ??? fileName = fileName.replaceAll(".jsp","_cache.html");
    ??? if(new File(docBase+"cache"+File.separatorChar+fileName).exists()){
    ??????? out.println(fileName);
    ??? }else{
    ????????????????
    ??? }
    ?? %>
    ?? </td>
    ?? <td><a href="deleteCacheAction.jsp?page=${filename}" title="清除緩存">清除緩存</td>
    ?? <td><a href="publishAction.jsp?page=${filename}" title="重新生成">重新生成</a></td>
    ?? </tr>
    ? </c:if>
    ? </c:forEach>
    ? </table>
    ?</FORM>


    public void doFilter (ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    ??????? //???? Pass control on to the next filter
    ??????? //
    ??????? //request.setCharacterEncoding("utf-8");
    ??????? HttpServletRequest req = (HttpServletRequest) request;
    ??????? String path = req.getServletPath();
    ??????? if ((!path.startsWith("/admin")) && path.endsWith(".jsp")&&req.getParameter("makeCache")==null) {
    ??????????? path = path.replaceAll(".jsp", "_cache.html");
    ????????????????? System.out.println(path);
    ????????????????????? System.out.println(req.getRequestURI());
    ????????????????????? System.out.println(req.getRequestURL());
    ??????????? request.getRequestDispatcher("/cache"+path).forward(request, response);
    ??????? } else {
    ??????????? chain.doFilter(request, response);
    ??????? }
    ??? }
    ??? /**
    ???? * Place this filter into service.
    ???? *
    ???? * @param filterConfig The filter configuration object
    ???? */
    ??? public void init(FilterConfig filterConfig) throws ServletException {
    ??????? this.filterConfig = filterConfig;
    ??????? this.enable = filterConfig.getInitParameter("enable");
    ??? }


    --------------------------------------------------------------------------------

    ?

    posted on 2007-09-10 16:46 Welcome 閱讀(265) 評論(0)  編輯  收藏 所屬分類: HTML\CSS
    主站蜘蛛池模板: 婷婷亚洲久悠悠色悠在线播放| 又色又污又黄无遮挡的免费视| 久久精品国产亚洲av麻豆| 美女黄网站人色视频免费| 国产高清在线精品免费软件| 亚洲精品V天堂中文字幕| 影音先锋在线免费观看| 亚洲日韩国产二区无码| 成人免费视频一区| 亚洲精华国产精华精华液| 国产精品成人无码免费| 免费大片av手机看片| 伊人婷婷综合缴情亚洲五月| 国偷自产一区二区免费视频| 久久久久亚洲精品无码蜜桃| 全免费毛片在线播放| 亚洲AV无码男人的天堂| 亚洲熟妇少妇任你躁在线观看无码 | 国产成人精品免费直播| 免费大片av手机看片高清| 中文亚洲AV片不卡在线观看 | 成人精品视频99在线观看免费| 国产aⅴ无码专区亚洲av麻豆 | 亚洲电影国产一区| 91免费福利精品国产| 亚洲女子高潮不断爆白浆| 免费一级毛片在线播放| 嫩草成人永久免费观看| 亚洲人成电影青青在线播放| 全免费a级毛片免费看无码| 一级一看免费完整版毛片| 亚洲乱亚洲乱淫久久| 最近最新的免费中文字幕| 黄色网址免费在线| 亚洲av无码一区二区乱子伦as| 在线观看免费人成视频色| 日韩在线一区二区三区免费视频 | 一级毛片在线完整免费观看| 亚洲综合精品一二三区在线| 精品免费国产一区二区三区| APP在线免费观看视频|