01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.taglib.providerContext;
06:
07: import javax.servlet.jsp.JspException;
08:
09: import com.sun.portal.providers.context.ProviderContext;
10: import com.sun.portal.providers.context.ProviderContextException;
11:
12: import com.sun.portal.desktop.taglib.DesktopTaglibException;
13:
14: public class EncodeURLTag extends BaseProviderContextTagSupport {
15: private String m_url = null;
16:
17: public void setUrl(String url) throws DesktopTaglibException {
18: m_url = resolveParameter(url).toString();
19: }
20:
21: public int doStartTag() throws JspException {
22: ProviderContext pc = getCurrentProviderContext();
23: String encoded = pc.encodeURL(m_url);
24: processResult(encoded);
25: return SKIP_BODY;
26: }
27: }
|