Methods Summary |
---|
public int | doEndTag()Appends possible URL encoded parameters to the main URL,
encodes the result for URL rewriting. Clears the out buffer
and sets the redirect response headers. Returns SKIP_PAGE
to abort the processing of the rest of the page.
StringBuffer encodedURL = new StringBuffer(page);
if (params != null && params.size() > 0) {
encodedURL.append('?");
boolean isFirst = true;
Enumeration e = params.elements();
while (e.hasMoreElements()) {
Param p = (Param) e.nextElement();
if (!isFirst) {
encodedURL.append('&");
}
encodedURL.append(p.getName()).append('=").append(p.getValue());
isFirst = false;
}
}
try {
JspWriter out = pageContext.getOut();
out.clear();
HttpServletResponse res = (HttpServletResponse) pageContext.getResponse();
res.sendRedirect(res.encodeURL(encodedURL.toString()));
}
catch (IOException e) {}
return SKIP_PAGE;
|
public int | doStartTag()Override the default implementation so that possible
param actions in the body are processed.
// Reset per-use state set by nested elements
params = null;
return EVAL_BODY_INCLUDE;
|
public void | release()Releases all instance variables.
page = null;
params = null;
super.release();
|
public void | setPage(java.lang.String page)Sets the page attribute.
this.page = page;
|
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.
if (params == null) {
params = new Vector();
}
Param param = new Param(name, value);
params.addElement(param);
|