Class AppLinkTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.struts.taglib.html.BaseHandlerTag
org.apache.struts.taglib.html.LinkTag
org.apache.strutsel.taglib.html.ELLinkTag
com.softslate.commerce.customer.core.AppLinkTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class AppLinkTag extends org.apache.strutsel.taglib.html.ELLinkTag
Extension of the Struts ELLinkTag, to allow for search-engine friendly URLs for product, category and other pages. As a link is generated using the html:link tag, this class rewrites the link into a search-engine friendly format, based on the settings defined in the Settings -> SEO section of the Administrator.

This class is the correlary of SEOFilter, which does the reverse: translating search-engine friendly URLs into formats understood by the application.

Author:
David Tobey
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static org.apache.commons.logging.Log
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static Pattern
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static String
     
    private static final long
     

    Fields inherited from class org.apache.struts.taglib.html.LinkTag

    action, anchor, forward, href, indexId, linkName, messages, module, name, page, parameters, paramId, paramName, paramProperty, paramScope, property, scope, target, text, transaction, useLocalEncoding

    Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag

    accesskey, doDisabled, doReadonly, indexed, tabindex

    Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    bodyContent

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id, pageContext

    Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

    EVAL_BODY_BUFFERED, EVAL_BODY_TAG

    Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

    EVAL_BODY_AGAIN

    Fields inherited from interface javax.servlet.jsp.tagext.Tag

    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Using the settings defined in the Settings -> SEO section of the Administrator, creates a URL in search-engine friendly format.
    createSEOURL(String url, Settings settings)
     

    Methods inherited from class org.apache.strutsel.taglib.html.ELLinkTag

    doStartTag, getAccesskeyExpr, getActionExpr, getAnchorExpr, getBundleExpr, getDirExpr, getForwardExpr, getHrefExpr, getIndexedExpr, getIndexIdExpr, getLangExpr, getLinkNameExpr, getModuleExpr, getNameExpr, getOnblurExpr, getOnclickExpr, getOndblclickExpr, getOnfocusExpr, getOnkeydownExpr, getOnkeypressExpr, getOnkeyupExpr, getOnmousedownExpr, getOnmousemoveExpr, getOnmouseoutExpr, getOnmouseoverExpr, getOnmouseupExpr, getPageExpr, getParamIdExpr, getParamNameExpr, getParamPropertyExpr, getParamScopeExpr, getPropertyExpr, getScopeExpr, getStyleClassExpr, getStyleExpr, getStyleIdExpr, getTabindexExpr, getTargetExpr, getTitleExpr, getTitleKeyExpr, getTransactionExpr, getUseLocalEncodingExpr, release, setAccesskeyExpr, setActionExpr, setAnchorExpr, setBundleExpr, setDirExpr, setForwardExpr, setHrefExpr, setIndexedExpr, setIndexIdExpr, setLangExpr, setLinkNameExpr, setModuleExpr, setNameExpr, setOnblurExpr, setOnclickExpr, setOndblclickExpr, setOnfocusExpr, setOnkeydownExpr, setOnkeypressExpr, setOnkeyupExpr, setOnmousedownExpr, setOnmousemoveExpr, setOnmouseoutExpr, setOnmouseoverExpr, setOnmouseupExpr, setPageExpr, setParamIdExpr, setParamNameExpr, setParamPropertyExpr, setParamScopeExpr, setPropertyExpr, setScopeExpr, setStyleClassExpr, setStyleExpr, setStyleIdExpr, setTabindexExpr, setTargetExpr, setTitleExpr, setTitleKeyExpr, setTransactionExpr, setUseLocalEncodingExpr

    Methods inherited from class org.apache.struts.taglib.html.LinkTag

    addParameter, doAfterBody, doEndTag, getAction, getAnchor, getForward, getHref, getIndexId, getLinkName, getModule, getName, getPage, getParamId, getParamName, getParamProperty, getParamScope, getProperty, getScope, getTarget, getTransaction, isUseLocalEncoding, setAction, setAnchor, setForward, setHref, setIndexId, setLinkName, setModule, setName, setPage, setParamId, setParamName, setParamProperty, setParamScope, setProperty, setScope, setTarget, setTransaction, setUseLocalEncoding

    Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag

    doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDir, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, getLang, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareAttribute, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareInternationalization, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDir, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setLang, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey

    Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

    doInitBody, getBodyContent, getPreviousOut, setBodyContent

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.servlet.jsp.tagext.Tag

    getParent, setPageContext, setParent
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • log

      static org.apache.commons.logging.Log log
    • regEx1

      private static String regEx1
    • regEx2

      private static String regEx2
    • regEx3

      private static String regEx3
    • regEx4

      private static String regEx4
    • regEx5

      private static String regEx5
    • regEx6

      private static String regEx6
    • regEx7

      private static String regEx7
    • regEx8

      private static String regEx8
    • regEx9

      private static String regEx9
    • regEx10

      private static String regEx10
    • pattern1

      private static Pattern pattern1
    • pattern2

      private static Pattern pattern2
    • pattern3

      private static Pattern pattern3
    • pattern4

      private static Pattern pattern4
    • pattern5

      private static Pattern pattern5
    • pattern6

      private static Pattern pattern6
    • pattern7

      private static Pattern pattern7
    • pattern8

      private static Pattern pattern8
    • pattern9

      private static Pattern pattern9
    • pattern10

      private static Pattern pattern10
  • Constructor Details

    • AppLinkTag

      public AppLinkTag()
  • Method Details

    • calculateURL

      protected String calculateURL() throws javax.servlet.jsp.JspException
      Using the settings defined in the Settings -> SEO section of the Administrator, creates a URL in search-engine friendly format. (I.e. directory style format with no query string.)
      Overrides:
      calculateURL in class org.apache.struts.taglib.html.LinkTag
      Throws:
      javax.servlet.jsp.JspException
    • createSEOURL

      public String createSEOURL(String url, Settings settings)