## org.apache.portals.bridges.struts.taglib
Class TagsSupport

    java.lang.Object
      org.apache.portals.bridges.struts.taglib.TagsSupport

class TagsSupport
extends Object

Utility class providing common Struts Bridge Tags functionality.

Version:
  $Id: TagsSupport.java 517068 2007-03-12 01:44:37Z ate $
Author:
  Ate Douma

Constructor Summary
`private` `TagsSupport()` Private constructor as this class isn't supposed to be instantiated.

Method Summary
`static String` `getContextRelativeURL(javax.servlet.jsp.PageContext pageContext, String url, boolean addContextPath)` Resolves a, possibly relative, url to a context relative one for use within a Portlet context.
`static String` `getFormTagRenderFormStartElement(javax.servlet.jsp.PageContext pageContext, String formStartElement)` Replaces the action url as generated by the struts:form tag with an action PortletURL.
`static String` `getURL(javax.servlet.jsp.PageContext pageContext, String url, PortletURLTypes.URLType type)` Creates an action or render PortletURL, or a ResourceURL.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TagsSupport

    private TagsSupport()

  Private constructor as this class isn't supposed to be instantiated.

Method Detail

### getContextRelativeURL

    public static String getContextRelativeURL(javax.servlet.jsp.PageContext pageContext,
                                               String url,
                                               boolean addContextPath)

  Resolves a, possibly relative, url to a context relative one for use within a Portlet context.

  The url parameter may contain relative (../) elements.

  Parameters:
    `pageContext` - the JSP pageContext
    `url` - the url to resolve
  Returns:
    the resolved url

### getURL

    public static String getURL(javax.servlet.jsp.PageContext pageContext,
                                String url,
                                PortletURLTypes.URLType type)

  Creates an action or render PortletURL, or a ResourceURL.

  The url parameter is first `resolved` to an context relative url.
  Then, a prefixed contextPath is removed from the resulting url.
  If the type parameter is specified (not null), the type of url created is based on its value.
  Otherwise, `PortletURLTypes.getType(String)` is used to determine which type of url must be created.

  Parameters:
    `pageContext` - the JSP pageContext
    `url` - the url to resolve
    `type` - indicated which type of url must be created
  Returns:
    an action or render PortletURL, or a ResourceURL

### getFormTagRenderFormStartElement

    public static String getFormTagRenderFormStartElement(javax.servlet.jsp.PageContext pageContext,
                                                          String formStartElement)

  Replaces the action url as generated by the struts:form tag with an action PortletURL.

  Parameters:
    `pageContext` - the JSP pageContext
    `formStartElement` - the formStartElement as generated by the struts:form tag
  Returns:
    the formStartElement containing an action PortletURL

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.