亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tagutils.java

?? struts的源代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        StringBuffer url = new StringBuffer();
        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
        if (forward != null) {
            ForwardConfig forwardConfig = moduleConfig.findForwardConfig(forward);
            if (forwardConfig == null) {
                throw new MalformedURLException(messages.getMessage("computeURL.forward", forward));
            }
            // **** removed - see bug 37817 ****
            //  if (forwardConfig.getRedirect()) {
            //      redirect = true;
            //  }
            if (forwardConfig.getPath().startsWith("/")) {
                url.append(request.getContextPath());
                url.append(RequestUtils.forwardURL(request, forwardConfig, moduleConfig));
            } else {
                url.append(forwardConfig.getPath());
            }
        } else if (href != null) {
            url.append(href);
        } else if (action != null) {
            url.append(instance.getActionMappingURL(action, module, pageContext, false));

        } else /* if (page != null) */ {
            url.append(request.getContextPath());
            url.append(this.pageURL(request, page, moduleConfig));
        }

        // Add anchor if requested (replacing any existing anchor)
        if (anchor != null) {
            String temp = url.toString();
            int hash = temp.indexOf('#');
            if (hash >= 0) {
                url.setLength(hash);
            }
            url.append('#');
            url.append(this.encodeURL(anchor, charEncoding));
        }

        // Add dynamic parameters if requested
        if ((params != null) && (params.size() > 0)) {

            // Save any existing anchor
            String temp = url.toString();
            int hash = temp.indexOf('#');
            if (hash >= 0) {
                anchor = temp.substring(hash + 1);
                url.setLength(hash);
                temp = url.toString();
            } else {
                anchor = null;
            }

            // Define the parameter separator
            String separator = null;
            if (redirect) {
                separator = "&";
            } else if (encodeSeparator) {
                separator = "&";
            } else {
                separator = "&";
            }

            // Add the required request parameters
            boolean question = temp.indexOf('?') >= 0;
            Iterator keys = params.keySet().iterator();
            while (keys.hasNext()) {
                String key = (String) keys.next();
                Object value = params.get(key);
                if (value == null) {
                    if (!question) {
                        url.append('?');
                        question = true;
                    } else {
                        url.append(separator);
                    }
                    url.append(this.encodeURL(key, charEncoding));
                    url.append('='); // Interpret null as "no value"
                } else if (value instanceof String) {
                    if (!question) {
                        url.append('?');
                        question = true;
                    } else {
                        url.append(separator);
                    }
                    url.append(this.encodeURL(key, charEncoding));
                    url.append('=');
                    url.append(this.encodeURL((String) value, charEncoding));
                } else if (value instanceof String[]) {
                    String values[] = (String[]) value;
                    for (int i = 0; i < values.length; i++) {
                        if (!question) {
                            url.append('?');
                            question = true;
                        } else {
                            url.append(separator);
                        }
                        url.append(this.encodeURL(key, charEncoding));
                        url.append('=');
                        url.append(this.encodeURL(values[i], charEncoding));
                    }
                } else /* Convert other objects to a string */ {
                    if (!question) {
                        url.append('?');
                        question = true;
                    } else {
                        url.append(separator);
                    }
                    url.append(this.encodeURL(key, charEncoding));
                    url.append('=');
                    url.append(this.encodeURL(value.toString(), charEncoding));
                }
            }

            // Re-add the saved anchor (if any)
            if (anchor != null) {
                url.append('#');
                url.append(this.encodeURL(anchor, charEncoding));
            }

        }

        // Perform URL rewriting to include our session ID (if any)
        // but only if url is not an external URL
        if (( href == null ) && ( pageContext.getSession() != null )) {
            HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
            if (redirect) {
                return (response.encodeRedirectURL(url.toString()));
            } else {
                return (response.encodeURL(url.toString()));
            }
        } else {
            return (url.toString());
        }

    }


	/**
	 * URLencodes a string assuming the character encoding is UTF-8.
	 *
	 * @param url
	 * @return String The encoded url in UTF-8
	 */
	public String encodeURL(String url) {
		return encodeURL(url, "UTF-8");
	}

    /**
     * Use the new URLEncoder.encode() method from Java 1.4 if available, else
     * use the old deprecated version.  This method uses reflection to find the
     * appropriate method; if the reflection operations throw exceptions, this
     * will return the url encoded with the old URLEncoder.encode() method.
     * @param enc The character encoding the urlencode is performed on.
     * @return String The encoded url.
     */
    public String encodeURL(String url, String enc) {
        return ResponseUtils.encodeURL(url, enc);
    }

    /**
     * Filter the specified string for characters that are sensitive to
     * HTML interpreters, returning the string with these characters replaced
     * by the corresponding character entities.
     *
     * @param value The string to be filtered and returned
     */
    public String filter(String value) {
        return ResponseUtils.filter(value);
    }

    /**
     * Retrieves the value from request scope and if it isn't already an
     * <code>ErrorMessages</code> some classes are converted to one.
     *
     * @param pageContext The PageContext for the current page
     * @param paramName Key for parameter value
     * @return ActionErrors from request scope
     * @exception JspException
     * @deprecated Use getActionMessages() instead.  This will be removed
     * after Struts 1.2.
     */
    public ActionErrors getActionErrors(PageContext pageContext, String paramName)
            throws JspException {

        ActionErrors errors = new ActionErrors();

        Object value = pageContext.findAttribute(paramName);
        if (value != null) {
            try {
                if (value instanceof String) {
                    errors.add(
                            ActionMessages.GLOBAL_MESSAGE,
                            new ActionMessage((String) value));

                } else if (value instanceof String[]) {
                    String keys[] = (String[]) value;
                    for (int i = 0; i < keys.length; i++) {
                        errors.add(
                                ActionMessages.GLOBAL_MESSAGE,
                                new ActionMessage(keys[i]));
                    }

                } else if (value instanceof ActionErrors) {
                    errors = (ActionErrors) value;

                } else {
                    throw new JspException(
                            messages.getMessage(
                                    "actionErrors.errors",
                                    value.getClass().getName()));
                }

            } catch (JspException e) {
                throw e;

            } catch (Exception e) {
                log.debug(e, e);
            }
        }
        return errors;
    }

    /**
     * Return the form action converted into an action mapping path.  The
     * value of the <code>action</code> property is manipulated as follows in
     * computing the name of the requested mapping:
     * <ul>
     * <li>Any filename extension is removed (on the theory that extension
     *     mapping is being used to select the controller servlet).</li>
     * <li>If the resulting value does not start with a slash, then a
     *     slash is prepended.</li>
     * </ul>
     */
    public String getActionMappingName(String action) {

        String value = action;
        int question = action.indexOf("?");
        if (question >= 0) {
            value = value.substring(0, question);
        }

        int slash = value.lastIndexOf("/");
        int period = value.lastIndexOf(".");
        if ((period >= 0) && (period > slash)) {
            value = value.substring(0, period);
        }

        return value.startsWith("/") ? value : ("/" + value);
    }


    /**
     * Return the form action converted into a server-relative URL.
     */
    public String getActionMappingURL(String action, PageContext pageContext) {
        return getActionMappingURL(action,null,pageContext,false);
    }


    /**
     * Return the form action converted into a server-relative URL.
     */
    public String getActionMappingURL(String action, String module, PageContext pageContext, boolean contextRelative) {

        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        String contextPath = request.getContextPath();
        StringBuffer value = new StringBuffer();
        // Avoid setting two slashes at the beginning of an action:
        //  the length of contextPath should be more than 1
        //  in case of non-root context, otherwise length==1 (the slash)
        if (contextPath.length() > 1) value.append(contextPath);

        ModuleConfig moduleConfig = ModuleUtils.getInstance().getModuleConfig(module, request, pageContext.getServletContext());

        if ((moduleConfig != null) && (!contextRelative)) {
            value.append(moduleConfig.getPrefix());
        }

        // Use our servlet mapping, if one is specified
        String servletMapping =
                (String) pageContext.getAttribute(
                        Globals.SERVLET_KEY,
                        PageContext.APPLICATION_SCOPE);

        if (servletMapping != null) {

            String queryString = null;
            int question = action.indexOf("?");
            if (question >= 0) {
                queryString = action.substring(question);
            }

            String actionMapping = getActionMappingName(action);
            if (servletMapping.startsWith("*.")) {
                value.append(actionMapping);
                value.append(servletMapping.substring(1));

            } else if (servletMapping.endsWith("/*")) {
                value.append(
                        servletMapping.substring(0, servletMapping.length() - 2));
                value.append(actionMapping);

            } else if (servletMapping.equals("/")) {
                value.append(actionMapping);
            }
            if (queryString != null) {
                value.append(queryString);
            }
        }

        // Otherwise, assume extension mapping is in use and extension is
        // already included in the action property
        else {
            if (!action.startsWith("/")) {
                value.append("/");
            }
            value.append(action);
        }

        return value.toString();
    }

    /**
     * Retrieves the value from request scope and if it isn't already an
     * <code>ActionMessages</code>, some classes are converted to one.
     *
     * @param pageContext The PageContext for the current page
     * @param paramName Key for parameter value
     * @return ActionErrors in page context.
     * @throws JspException
     */
    public ActionMessages getActionMessages(
            PageContext pageContext,
            String paramName)
            throws JspException {

        ActionMessages am = new ActionMessages();

        Object value = pageContext.findAttribute(paramName);
        if (value != null) {
            try {
               if (value instanceof String) {
                    am.add(
                            ActionMessages.GLOBAL_MESSAGE,
                            new ActionMessage((String) value));

                } else if (value instanceof String[]) {
                    String keys[] = (String[]) value;
                    for (int i = 0; i < keys.length; i++) {
                        am.add(
                                ActionMessages.GLOBAL_MESSAGE,
                                new ActionMessage(keys[i]));
                    }

                } else if (value instanceof ActionErrors) {
                    ActionMessages m = (ActionMessages) value;
                    am.add(m);

                } else if (value instanceof ActionMessages) {
                    am = (ActionMessages) value;

                } else {
                    throw new JspException(
                            messages.getMessage(
                                    "actionMessages.errors",
                                    value.getClass().getName()));
                }

            } catch (JspException e) {
                throw e;

            } catch (Exception e) {
                log.warn("Unable to retieve ActionMessage for paramName : "+paramName,e);
            }
        }
        return am;
    }

    /**
     * Return the ModuleConfig object if it exists, null if otherwise.
     * @param pageContext The page context.
     * @return the ModuleConfig object
     */
    public ModuleConfig getModuleConfig(PageContext pageContext) {
        return getModuleConfig(
                null,
                pageContext);
    }

	/**
	 * Return the ModuleConfig object for the given prefix if it exists, null if otherwise.
	 * @param module The module prefix
	 * @param pageContext The page context.
	 * @return the ModuleConfig object
	 */
	public ModuleConfig getModuleConfig(String module, PageContext pageContext) {
		return ModuleUtils.getInstance().getModuleConfig(
				module,
				(HttpServletRequest) pageContext.getRequest(),
				pageContext.getServletContext());
	}

    /**
     * Converts the scope name into its corresponding PageContext constant value.
     * @param scopeName Can be "page", "request", "session", or "application" in any
     * case.
     * @return The constant representing the scope (ie. PageContext.REQUEST_SCOPE).
     * @throws JspException if the scopeName is not a valid name.
     */
    public int getScope(String scopeName) throws JspException {
        Integer scope = (Integer) scopes.get(scopeName.toLowerCase());

        if (scope == null) {
            throw new JspException(messages.getMessage("lookup.scope", scope));
        }

        return scope.intValue();
    }

    /**
     * Look up and return current user locale, based on the specified parameters.
     *
     * @param pageContext The PageContext associated with this request

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产激情一区二区三区| 中文字幕免费观看一区| 亚洲一区av在线| 99re热这里只有精品免费视频| 久久久综合视频| 韩国精品主播一区二区在线观看 | 亚洲欧美韩国综合色| 99国产精品久久久久久久久久久| 国产视频在线观看一区二区三区 | 日韩一区日韩二区| caoporm超碰国产精品| 亚洲欧美激情在线| 91福利视频在线| 美女在线观看视频一区二区| 欧美成人一区二区三区片免费 | 日韩欧美中文字幕制服| 国产精品一区二区免费不卡| 亚洲欧美日韩国产手机在线| 欧美午夜免费电影| 久久福利资源站| 国产精品动漫网站| 日韩一区二区三| 色婷婷精品久久二区二区蜜臀av| 天天影视涩香欲综合网 | 久久欧美中文字幕| 91成人在线免费观看| 国产精品996| 蜜桃av噜噜一区二区三区小说| 国产精品乱码妇女bbbb| 欧美大片国产精品| 欧美日韩亚洲综合一区| 国产成人超碰人人澡人人澡| 蜜芽一区二区三区| 亚洲成人在线免费| 夜夜嗨av一区二区三区网页| 欧美激情一区二区三区不卡| 日韩精品一区二区三区四区 | 国产福利一区二区三区在线视频| 有码一区二区三区| 国产日韩av一区| 久久日一线二线三线suv| 欧美一区二区三区四区在线观看 | 亚洲欧洲日韩综合一区二区| 久久久久久久久岛国免费| 26uuu欧美| 久久精品亚洲精品国产欧美kt∨ | 欧美日韩精品欧美日韩精品一| aaa欧美大片| 一本一本久久a久久精品综合麻豆| 成人免费毛片aaaaa**| 成人午夜视频在线观看| zzijzzij亚洲日本少妇熟睡| 成人免费看黄yyy456| 91在线免费看| 欧美三级韩国三级日本三斤| 在线电影院国产精品| 日韩三级视频在线观看| 久久九九影视网| 亚洲男同性恋视频| 日韩高清在线电影| 久久精品av麻豆的观看方式| 国产精品一二三区| 色天天综合色天天久久| 91精品视频网| 国产精品久久久久一区| 午夜影视日本亚洲欧洲精品| 麻豆成人在线观看| 91视频在线看| 亚洲精品一区二区三区四区高清| 国产精品少妇自拍| 天堂va蜜桃一区二区三区| 精品在线免费视频| 在线看国产一区| 日韩一区二区精品葵司在线| 亚洲欧洲精品天堂一级| 国产在线一区观看| 欧美日韩极品在线观看一区| 中文字幕免费不卡在线| 蜜臀va亚洲va欧美va天堂| 日本高清无吗v一区| 久久久久国产一区二区三区四区| 亚洲主播在线观看| 成人黄色在线看| 久久精品夜夜夜夜久久| 人人超碰91尤物精品国产| 色爱区综合激月婷婷| 成人免费在线播放视频| 高清成人免费视频| 日韩免费在线观看| 麻豆极品一区二区三区| 91麻豆精品国产自产在线 | 一区二区三区四区不卡在线| 成人福利视频网站| 国产欧美日韩视频在线观看| 免费国产亚洲视频| 欧美一区二区在线免费播放| 午夜激情久久久| 日韩精品一区二区三区四区| 极品少妇一区二区| 欧美成人一区二区| 激情五月激情综合网| www久久久久| 99久久精品国产观看| 亚洲日穴在线视频| 欧美久久久久免费| 久久国产精品色| 久久久久久黄色| 色婷婷综合久久久久中文| 亚洲午夜日本在线观看| 欧美久久久一区| 丁香网亚洲国际| 亚洲影视在线播放| 亚洲精品一区二区三区蜜桃下载| 成人黄色小视频在线观看| 一区二区三区在线观看网站| 日韩三级视频在线观看| 99精品视频一区二区| 日韩和欧美一区二区三区| 欧美国产精品一区二区三区| 欧美综合欧美视频| 国产精品88888| 欧美aⅴ一区二区三区视频| 国产精品五月天| 欧美mv和日韩mv的网站| 99国产一区二区三精品乱码| 毛片av一区二区三区| 亚洲欧美色综合| 国产欧美一区二区精品忘忧草 | 日本视频在线一区| 欧美放荡的少妇| 国产精品中文字幕日韩精品| 综合激情成人伊人| 4438x亚洲最大成人网| av亚洲精华国产精华精华| 日韩av电影天堂| 亚洲一区二区视频| 亚洲视频免费观看| 国产精品电影一区二区三区| 久久伊人蜜桃av一区二区| 欧美美女网站色| 欧美手机在线视频| 91欧美激情一区二区三区成人| 国产美女av一区二区三区| 日韩电影一区二区三区| 丝袜亚洲精品中文字幕一区| 一区二区三区在线看| 亚洲欧洲国产日本综合| 国产日韩精品久久久| 亚洲国产精品传媒在线观看| 国产网红主播福利一区二区| 欧美v日韩v国产v| 国产亚洲综合在线| 国产精品久久久久久久久免费相片| 久久嫩草精品久久久精品 | 成人国产亚洲欧美成人综合网 | 欧美区视频在线观看| 欧美日韩国产美| 欧美高清视频在线高清观看mv色露露十八 | 看片的网站亚洲| 国产精品456| 日本乱人伦aⅴ精品| 欧美精品一卡两卡| 久久蜜桃av一区二区天堂| 中文字幕av一区 二区| 亚洲综合一区二区三区| 免费日本视频一区| 成人一区在线观看| 欧美日韩和欧美的一区二区| 精品国偷自产国产一区| 日本一区二区三区久久久久久久久不| 《视频一区视频二区| 麻豆一区二区99久久久久| av不卡免费在线观看| 亚洲精品一区二区三区蜜桃下载 | 亚洲高清免费在线| 国产成人高清在线| 欧美一级爆毛片| 亚洲欧美激情插| www.亚洲激情.com| 日韩精品一区二区三区老鸭窝| 亚洲欧洲av色图| 成人三级在线视频| 欧美不卡一区二区三区| 亚洲成人一二三| 91免费版在线| 1区2区3区欧美| 国产高清在线精品| 精品国产一二三| 麻豆国产精品一区二区三区| 欧美日韩一区三区| 亚洲精品日日夜夜| 91色在线porny| 亚洲欧美日韩小说| 91在线视频播放地址| 中文字幕一区二区三区在线播放| 国产精品911| 中文字幕永久在线不卡| 91美女在线观看| 亚洲午夜激情网站| 欧美日韩国产一区二区三区地区|