Methods Summary |
---|
private void | copyTagToPageScope(int scope)Copies the variables of the given scope from the virtual page scope of
this JSP context wrapper to the page scope of the invoking JSP context.
Iterator iter = null;
switch (scope) {
case VariableInfo.NESTED:
if (nestedVars != null) {
iter = nestedVars.iterator();
}
break;
case VariableInfo.AT_BEGIN:
if (atBeginVars != null) {
iter = atBeginVars.iterator();
}
break;
case VariableInfo.AT_END:
if (atEndVars != null) {
iter = atEndVars.iterator();
}
break;
}
while ((iter != null) && iter.hasNext()) {
String varName = (String) iter.next();
Object obj = getAttribute(varName);
varName = findAlias(varName);
if (obj != null) {
invokingJspCtxt.setAttribute(varName, obj);
} else {
invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
|
private java.lang.String | findAlias(java.lang.String varName)Checks to see if the given variable name is used as an alias, and if so,
returns the variable name for which it is used as an alias.
if (aliases == null)
return varName;
String alias = (String) aliases.get(varName);
if (alias == null) {
return varName;
}
return alias;
|
public java.lang.Object | findAttribute(java.lang.String name)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
Object o = pageAttributes.get(name);
if (o == null) {
o = invokingJspCtxt.getAttribute(name, REQUEST_SCOPE);
if (o == null) {
if (getSession() != null) {
o = invokingJspCtxt.getAttribute(name, SESSION_SCOPE);
}
if (o == null) {
o = invokingJspCtxt.getAttribute(name, APPLICATION_SCOPE);
}
}
}
return o;
|
public void | forward(java.lang.String relativeUrlPath)
invokingJspCtxt.forward(relativeUrlPath);
|
public java.lang.Object | getAttribute(java.lang.String name)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
return pageAttributes.get(name);
|
public java.lang.Object | getAttribute(java.lang.String name, int scope)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
if (scope == PAGE_SCOPE) {
return pageAttributes.get(name);
}
return invokingJspCtxt.getAttribute(name, scope);
|
public java.util.Enumeration | getAttributeNamesInScope(int scope)
if (scope == PAGE_SCOPE) {
return new Enumerator(pageAttributes.keySet().iterator());
}
return invokingJspCtxt.getAttributeNamesInScope(scope);
|
public int | getAttributesScope(java.lang.String name)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
if (pageAttributes.get(name) != null) {
return PAGE_SCOPE;
} else {
return invokingJspCtxt.getAttributesScope(name);
}
|
public javax.el.ELContext | getELContext()
// instead decorate!!!
return this.invokingJspCtxt.getELContext();
/*
if (this.elContext != null) {
JspFactory jspFact = JspFactory.getDefaultFactory();
ServletContext servletContext = this.getServletContext();
JspApplicationContextImpl jspCtx = (JspApplicationContextImpl) jspFact
.getJspApplicationContext(servletContext);
this.elContext = jspCtx.createELContext(this);
}
return this.elContext;
*/
|
public java.lang.Exception | getException()
return invokingJspCtxt.getException();
|
public javax.servlet.jsp.el.ExpressionEvaluator | getExpressionEvaluator()
return invokingJspCtxt.getExpressionEvaluator();
|
public javax.servlet.jsp.JspWriter | getOut()
return invokingJspCtxt.getOut();
|
public java.lang.Object | getPage()
return invokingJspCtxt.getPage();
|
public javax.servlet.ServletRequest | getRequest()
return invokingJspCtxt.getRequest();
|
public javax.servlet.ServletResponse | getResponse()
return invokingJspCtxt.getResponse();
|
public javax.servlet.ServletConfig | getServletConfig()
return invokingJspCtxt.getServletConfig();
|
public javax.servlet.ServletContext | getServletContext()
return invokingJspCtxt.getServletContext();
|
public javax.servlet.http.HttpSession | getSession()
return invokingJspCtxt.getSession();
|
public javax.servlet.jsp.el.VariableResolver | getVariableResolver()
return this;
|
public void | handlePageException(java.lang.Exception ex)
// Should never be called since handleException() called with a
// Throwable in the generated servlet.
handlePageException((Throwable) ex);
|
public void | handlePageException(java.lang.Throwable t)
invokingJspCtxt.handlePageException(t);
|
public void | include(java.lang.String relativeUrlPath)
invokingJspCtxt.include(relativeUrlPath);
|
public void | include(java.lang.String relativeUrlPath, boolean flush)
include(relativeUrlPath, false); // XXX
|
public void | initialize(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)
|
public javax.servlet.jsp.JspWriter | popBody()
return invokingJspCtxt.popBody();
|
public javax.servlet.jsp.tagext.BodyContent | pushBody()
return invokingJspCtxt.pushBody();
|
public javax.servlet.jsp.JspWriter | pushBody(java.io.Writer writer)
return invokingJspCtxt.pushBody(writer);
|
public void | release()
invokingJspCtxt.release();
|
public void | removeAttribute(java.lang.String name)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
pageAttributes.remove(name);
invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE);
if (getSession() != null) {
invokingJspCtxt.removeAttribute(name, SESSION_SCOPE);
}
invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE);
|
public void | removeAttribute(java.lang.String name, int scope)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
if (scope == PAGE_SCOPE) {
pageAttributes.remove(name);
} else {
invokingJspCtxt.removeAttribute(name, scope);
}
|
public java.lang.Object | resolveVariable(java.lang.String pName)VariableResolver interface
ELContext ctx = this.getELContext();
return ctx.getELResolver().getValue(ctx, null, pName);
|
private void | restoreNestedVariables()Restores the values of any NESTED variables in the invoking JSP context.
if (nestedVars != null) {
Iterator iter = nestedVars.iterator();
while (iter.hasNext()) {
String varName = (String) iter.next();
varName = findAlias(varName);
Object obj = originalNestedVars.get(varName);
if (obj != null) {
invokingJspCtxt.setAttribute(varName, obj);
} else {
invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE);
}
}
}
|
private void | saveNestedVariables()Saves the values of any NESTED variables that are present in the invoking
JSP context, so they can later be restored.
if (nestedVars != null) {
Iterator iter = nestedVars.iterator();
while (iter.hasNext()) {
String varName = (String) iter.next();
varName = findAlias(varName);
Object obj = invokingJspCtxt.getAttribute(varName);
if (obj != null) {
originalNestedVars.put(varName, obj);
}
}
}
|
public void | setAttribute(java.lang.String name, java.lang.Object value)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
if (value != null) {
pageAttributes.put(name, value);
} else {
removeAttribute(name, PAGE_SCOPE);
}
|
public void | setAttribute(java.lang.String name, java.lang.Object value, int scope)
if (name == null) {
throw new NullPointerException(Localizer
.getMessage("jsp.error.attribute.null_name"));
}
if (scope == PAGE_SCOPE) {
if (value != null) {
pageAttributes.put(name, value);
} else {
removeAttribute(name, PAGE_SCOPE);
}
} else {
invokingJspCtxt.setAttribute(name, value, scope);
}
|
public void | syncBeforeInvoke()Synchronize variables before fragment invokation
copyTagToPageScope(VariableInfo.NESTED);
copyTagToPageScope(VariableInfo.AT_BEGIN);
|
public void | syncBeginTagFile()Synchronize variables at begin of tag file
saveNestedVariables();
|
public void | syncEndTagFile()Synchronize variables at end of tag file
copyTagToPageScope(VariableInfo.AT_BEGIN);
copyTagToPageScope(VariableInfo.AT_END);
restoreNestedVariables();
|