com.ora.jsp.tags.generic
Class EncodeURLTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.ora.jsp.tags.generic.EncodeURLTag
All Implemented Interfaces:
ParamParent, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class EncodeURLTag
extends javax.servlet.jsp.tagext.TagSupport
implements ParamParent

This class is a custom action for encoding URLs for URL rewriting (session tracking) with possible parameter values URL encoded.

Version:
1.0
Author:
Hans Bergsten, Gefion software
See Also:
Serialized Form

Inner Class Summary
(package private)  class EncodeURLTag.Param
          This is a helper class that holds the name and value of a parameter.
 
Field Summary
private  java.util.Vector params
           
private  java.lang.String url
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
EncodeURLTag()
           
 
Method Summary
 int doEndTag()
          Appends possible URL encoded parameters to the main URL, encodes the result for URL rewriting and writes the result to the JspWriter.
 int doStartTag()
          Override the default implementation so that possible param actions in the body are processed.
 void release()
          Releases all instance variables.
 void setParam(java.lang.String name, java.lang.String value)
          Adds a parameter name and value.
 void setUrl(java.lang.String url)
          Sets the url attribute.
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

url

private java.lang.String url

params

private java.util.Vector params
Constructor Detail

EncodeURLTag

public EncodeURLTag()
Method Detail

setUrl

public void setUrl(java.lang.String url)
Sets the url attribute.
Parameters:
url - the page URL value

setParam

public void setParam(java.lang.String name,
                     java.lang.String value)
Adds a parameter name and value. This method is called by param tags in the action body.
Specified by:
setParam in interface ParamParent
Parameters:
name - the parameter name
value - the URL encoded parameter value

doStartTag

public int doStartTag()
Override the default implementation so that possible param actions in the body are processed.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Appends possible URL encoded parameters to the main URL, encodes the result for URL rewriting and writes the result to the JspWriter.
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

release

public void release()
Releases all instance variables.
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport