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.Provider;
10: import com.sun.portal.providers.context.ProviderContext;
11: import com.sun.portal.providers.context.ProviderContextException;
12:
13: import com.sun.portal.desktop.taglib.DesktopTaglibException;
14:
15: public class EncodeURLParameterTag extends
16: BaseProviderContextTagSupport {
17: private String m_key = null;
18:
19: public void setKey(String key) throws DesktopTaglibException {
20: m_key = resolveParameter(key).toString();
21: }
22:
23: public int doStartTag() throws JspException {
24: ProviderContext pc = getCurrentProviderContext();
25: String enc = pc.encodeURLParameter(m_key);
26: processResult(enc);
27: return SKIP_BODY;
28: }
29: }
|