/**
* Generates a Javascript Tree Menu (collapsable hierarchy) of the specified
* part of the vocabulary
*
* @param group colon-seperated specifier of the part of the vocab
* hierarchy which is to be displayed
* @param system
* @param page
* @param language
* @return the Javascript code defining the menu
*/
public synchronized String getVocabTreeMenu( String system,
String language,
String group,
PageContext page ) {
if ( vocabTreeMenuCache.get( system + language + group ) != null ) {
Date now = new Date();
if ( ( now.getTime() - ( (Date)vocabTreeMenuCacheDate.get( system + language + group ) ).getTime() )
< ( VOCAB_TREE_CACHE_TIME ) ) {
return (String)vocabTreeMenuCache.get( system + language + group );
}
}
StringBuffer ret = new StringBuffer();
String inputName = setCurrentTree( system, group );
if ( inputName.startsWith( "ERROR:" ) ) {
return errorDisplay( inputName, "getVocabTreeMenu" );
}
try {
String abbrevLabel = currentNode.getAttribute( "textAbbrev" );
if ( abbrevLabel == null ) {
abbrevLabel = (String)currentNode.getAttribute( "text" );
}
ret.append( "var tm_" + currentNode.fieldId + "0 = new dlese_vocabList( \"tm_" + currentNode.fieldId + "0\", 0, \""
+ currentNode.getAttribute( "text" ) + "\", \"" + abbrevLabel + "\" );\n" );
}
catch ( Exception e ) {
e.printStackTrace();
}
String setList = "\ndlese_setList( \"" + currentNode.fieldId + "\" );\n";
ret.append( vocabTreeMenu( currentNode, currentNode.fieldId + "0", currentNode.fieldId, page ) );
ret.append( setList );
vocabTreeMenuCache.put( system + language + group, ret.toString() );
vocabTreeMenuCacheDate.put( system + language + group, new Date() );
return ret.toString();
}
java类javax.servlet.jsp.PageContext的实例源码
MetadataVocabOPML.java 文件源码
项目:joai-project
阅读 29
收藏 0
点赞 0
评论 0
JspContextWrapper.java 文件源码
项目:tomcat7
阅读 35
收藏 0
点赞 0
评论 0
public JspContextWrapper(JspContext jspContext,
ArrayList<String> nestedVars, ArrayList<String> atBeginVars,
ArrayList<String> atEndVars, Map<String,String> aliases) {
this.invokingJspCtxt = (PageContext) jspContext;
if (jspContext instanceof JspContextWrapper) {
rootJspCtxt = ((JspContextWrapper)jspContext).rootJspCtxt;
}
else {
rootJspCtxt = invokingJspCtxt;
}
this.nestedVars = nestedVars;
this.atBeginVars = atBeginVars;
this.atEndVars = atEndVars;
this.pageAttributes = new HashMap<String, Object>(16);
this.aliases = aliases;
if (nestedVars != null) {
this.originalNestedVars = new HashMap<String, Object>(nestedVars.size());
}
syncBeginTagFile();
}
RequestUtils.java 文件源码
项目:lams
阅读 32
收藏 0
点赞 0
评论 0
/**
* Look up and return a message string, based on the specified parameters.
*
* @param pageContext The PageContext associated with this request
* @param bundle Name of the servlet context attribute for our
* message resources bundle
* @param locale Name of the session attribute for our user's Locale
* @param key Message key to be looked up and returned
* @param args Replacement parameters for this message
* @return message string
* @exception JspException if a lookup error occurs (will have been
* saved in the request already)
* @deprecated Use {@link org.apache.struts.taglib.TagUtils#message(PageContext,String,String,String,Object[])} instead.
* This will be removed after Struts 1.2.
*/
public static String message(
PageContext pageContext,
String bundle,
String locale,
String key,
Object args[])
throws JspException {
// :TODO: Remove afer Struts 1.2
return TagUtils.getInstance().message(
pageContext,
bundle,
locale,
key,
args);
}
JspFactoryImpl.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 36
收藏 0
点赞 0
评论 0
@Override
public PageContext getPageContext(Servlet servlet, ServletRequest request,
ServletResponse response, String errorPageURL, boolean needsSession,
int bufferSize, boolean autoflush) {
if( Constants.IS_SECURITY_ENABLED ) {
PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
this, servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
return AccessController.doPrivileged(dp);
} else {
return internalGetPageContext(servlet, request, response,
errorPageURL, needsSession,
bufferSize, autoflush);
}
}
ScopedAttributeELResolver.java 文件源码
项目:tomcat7
阅读 30
收藏 0
点赞 0
评论 0
@Override
public void setValue(ELContext context, Object base, Object property,
Object value) throws NullPointerException,
PropertyNotFoundException, PropertyNotWritableException,
ELException {
if (context == null) {
throw new NullPointerException();
}
if (base == null) {
context.setPropertyResolved(true);
if (property != null) {
String key = property.toString();
PageContext page = (PageContext) context
.getContext(JspContext.class);
int scope = page.getAttributesScope(key);
if (scope != 0) {
page.setAttribute(key, value, scope);
} else {
page.setAttribute(key, value);
}
}
}
}
TagUtils.java 文件源码
项目:lams
阅读 44
收藏 0
点赞 0
评论 0
/**
* Store bean in requested context.
* If scope is <code>null</code>, save it in REQUEST_SCOPE context.
*
* @param pageContext Current pageContext.
* @param name Name of the bean.
* @param scope Scope under which bean is saved (page, request, session, application)
* or <code>null</code> to store in <code>request()</code> instead.
* @param value Bean value to store.
*
* @exception JspException Scope name is not recognized as a valid scope
*/
public static void setAttribute(
PageContext pageContext,
String name,
Object value,
String scope)
throws JspException {
if (scope == null)
pageContext.setAttribute(name, value, PageContext.REQUEST_SCOPE);
else if (scope.equalsIgnoreCase("page"))
pageContext.setAttribute(name, value, PageContext.PAGE_SCOPE);
else if (scope.equalsIgnoreCase("request"))
pageContext.setAttribute(name, value, PageContext.REQUEST_SCOPE);
else if (scope.equalsIgnoreCase("session"))
pageContext.setAttribute(name, value, PageContext.SESSION_SCOPE);
else if (scope.equalsIgnoreCase("application"))
pageContext.setAttribute(name, value, PageContext.APPLICATION_SCOPE);
else {
throw new JspException("Error - bad scope name '" + scope + "'");
}
}
MetadataVocabTermsGroups.java 文件源码
项目:joai-project
阅读 35
收藏 0
点赞 0
评论 0
/**
* Reads the given file and returns its contents as a string
*
* @param filename
* @param page
* @return The fileText value
*/
private synchronized String getFileText( String filename, PageContext page ) {
StringBuffer ret = new StringBuffer();
try {
BufferedReader in = new BufferedReader( new FileReader( page.getServletContext().getRealPath( filename ) ) );
String s = null;
while ( ( s = in.readLine() ) != null ) {
ret.append( s );
}
}
catch ( FileNotFoundException fnfe ) {
System.err.println( "File not found - " );
System.err.println( fnfe.getClass() + " " + fnfe.getMessage() );
}
catch ( IOException ioe ) {
System.err.println( "Exception occurred reading " + filename );
System.err.println( ioe.getClass() + " " + ioe.getMessage() );
}
return ret.toString();
}
JspContextWrapper.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 30
收藏 0
点赞 0
评论 0
public JspContextWrapper(JspContext jspContext,
ArrayList<String> nestedVars, ArrayList<String> atBeginVars,
ArrayList<String> atEndVars, Map<String,String> aliases) {
this.invokingJspCtxt = (PageContext) jspContext;
if (jspContext instanceof JspContextWrapper) {
rootJspCtxt = ((JspContextWrapper)jspContext).rootJspCtxt;
}
else {
rootJspCtxt = invokingJspCtxt;
}
this.nestedVars = nestedVars;
this.atBeginVars = atBeginVars;
this.atEndVars = atEndVars;
this.pageAttributes = new HashMap<String, Object>(16);
this.aliases = aliases;
if (nestedVars != null) {
this.originalNestedVars = new HashMap<String, Object>(nestedVars.size());
}
syncBeginTagFile();
}
MetadataVocabOPML.java 文件源码
项目:joai-project
阅读 31
收藏 0
点赞 0
评论 0
/**
* Gets the re-ordered/grouped/labeled OPML tree of metadata values from the
* cache created by setResponseGroup()
*
* @param context JSP page context
* @return OPML for the group specified with setResponseGroup() and
* trimmed to the subset indicated by values passed into setResponse()
* @see MetadataVocab#setResponseValue(String,PageContext)
* @see MetadataVocab#setResponseList(String[],PageContext)
* @see MetadataVocab#setResponseList(ArrayList,PageContext)
* @see MetadataVocab#setResponseGroup(PageContext,String,String,String,String,String)
*/
public synchronized String getResponseOPML( PageContext context ) {
String ret = "";
MetadataVocabResponseMap responseMap = (MetadataVocabResponseMap)context.findAttribute( "metadataVocabResponseMap" );
if ( responseMap == null ) {
ret = "<!-- MUI ERROR: metadataVocabResponseMap is empty -->";
}
if ( ( responseMap.metaVersion == null ) || responseMap.metaVersion.equals( "" ) ) {
ret = getOPML( responseMap.metaFormat, getCurrentVersion( responseMap.metaFormat ),
responseMap.audience, responseMap.language, responseMap.field, responseMap, false );
}
else {
ret = getOPML( responseMap.metaFormat, responseMap.metaVersion,
responseMap.audience, responseMap.language, responseMap.field, responseMap, false );
}
if ( ret.indexOf( "<outline" ) == -1 ) {
ret = "";
}
return ret;
}
FormTag.java 文件源码
项目:jaffa-framework
阅读 34
收藏 0
点赞 0
评论 0
/** Get the HTML id for the form. This is based on the application rule
* "jaffa.widgets.form.idFormat" which can have the following values
* <ul>
* <li>none - No id will be used for the form
* <li>formname - The struts form name will be used
* <li>index - an index value, based on the number of forms on the page will be used.
* The value will be prefixed with 'j', so the first form will be id='j0'
* <li>class - Will used the classname of the formbean (without the package name) for the id
* </ul>
* Older version of JAFFA used the equivilent of 'formname' which is the default if nothing is set.
*/
public String getHtmlIdPrefix() {
if(m_htmlName!=null) {
m_htmlIdPrefix=m_htmlName;
} else if(m_htmlIdPrefix==null) {
if(ID_FORMAT_INDEX.equals(m_idFormat)) {
//Look for a index counter in the request
Integer index = (Integer)pageContext.getAttribute(FORM_TAG_INDEX,PageContext.REQUEST_SCOPE);
if(index==null)
index=new Integer(1);
m_htmlIdPrefix="j" + index;
pageContext.setAttribute(FORM_TAG_INDEX,new Integer(index.intValue()+1),PageContext.REQUEST_SCOPE);
} else if(ID_FORMAT_NONE.equals(m_idFormat))
// use no id
m_htmlIdPrefix="";
else if(ID_FORMAT_CLASS.equals(m_idFormat)) {
// Use the class name (exclude the package)
m_htmlIdPrefix=StringHelper.getShortClassName(FormTag.class);
} else {
// Default to original behavior, and use the struts Bean name
m_htmlIdPrefix=getBeanName();
}
}
return m_htmlIdPrefix;
}
MetadataVocabTag.java 文件源码
项目:joai-project
阅读 35
收藏 0
点赞 0
评论 0
/**
* Get the vocab object from the page context and expand system to be a
* concatenation of system, interface, and language
*
* @param pageContext
* @exception JspException
*/
public void setupTag( PageContext pageContext ) throws JspException {
String contextAttributeName = (String)pageContext.getServletContext().getInitParameter( "metadataVocabInstanceAttributeName" );
vocab = (MetadataVocab)pageContext.findAttribute( contextAttributeName );
if ( vocab == null ) {
System.out.println( "Looked for vocab in " + contextAttributeName );
throw new JspException( "Vocabulary not found" );
}
else {
try {
metaVersion = vocab.getCurrentVersion( metaFormat );
}
catch ( Exception e ) {
new JspException( "No current version found for metadata framework " + metaFormat );
}
system = metaFormat + "/" + metaVersion + "/" + audience + "/" + language + "/" + field;
( (MetadataVocabOPML)vocab ).setCurrentTree( system, subGroup );
}
}
MetadataVocabTag.java 文件源码
项目:joai-project
阅读 30
收藏 0
点赞 0
评论 0
/**
* Get the vocab object from the page context and expand system to be a
* concatenation of system, interface, and language
*
* @param pageContext
* @exception JspException
*/
public void setupTag( PageContext pageContext ) throws JspException {
vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
if ( vocab == null ) {
throw new JspException( "Vocabulary not found" );
}
else {
if ( group != null ) {
group = stringUtil.replace( group, " ", "_", false );
}
else {
group = "";
}
system = system + "." + interfce + "." + language;
}
}
UrlTag.java 文件源码
项目:airsonic
阅读 33
收藏 0
点赞 0
评论 0
public int doEndTag() throws JspException {
// Rewrite and encode the url.
String result = formatUrl();
// Store or print the output
if (var != null)
pageContext.setAttribute(var, result, PageContext.PAGE_SCOPE);
else {
try {
pageContext.getOut().print(result);
} catch (IOException x) {
throw new JspTagException(x);
}
}
return EVAL_PAGE;
}
ScopedAttributeELResolver.java 文件源码
项目:lazycat
阅读 29
收藏 0
点赞 0
评论 0
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
if (context == null) {
throw new NullPointerException();
}
if (base == null) {
context.setPropertyResolved(true);
if (property != null) {
String key = property.toString();
PageContext page = (PageContext) context.getContext(JspContext.class);
int scope = page.getAttributesScope(key);
if (scope != 0) {
page.setAttribute(key, value, scope);
} else {
page.setAttribute(key, value);
}
}
}
}
TagUtils.java 文件源码
项目:lams
阅读 42
收藏 0
点赞 0
评论 0
/**
* Determines the scope for a given input {@code String}.
* <p>If the {@code String} does not match 'request', 'session',
* 'page' or 'application', the method will return {@link PageContext#PAGE_SCOPE}.
* @param scope the {@code String} to inspect
* @return the scope found, or {@link PageContext#PAGE_SCOPE} if no scope matched
* @throws IllegalArgumentException if the supplied {@code scope} is {@code null}
*/
public static int getScope(String scope) {
Assert.notNull(scope, "Scope to search for cannot be null");
if (scope.equals(SCOPE_REQUEST)) {
return PageContext.REQUEST_SCOPE;
}
else if (scope.equals(SCOPE_SESSION)) {
return PageContext.SESSION_SCOPE;
}
else if (scope.equals(SCOPE_APPLICATION)) {
return PageContext.APPLICATION_SCOPE;
}
else {
return PageContext.PAGE_SCOPE;
}
}
SmartUpload.java 文件源码
项目:all-file
阅读 30
收藏 0
点赞 0
评论 0
public final void initialize(PageContext pagecontext)
throws ServletException
{
m_application = pagecontext.getServletContext();
m_request = (HttpServletRequest)pagecontext.getRequest();
m_response = (HttpServletResponse)pagecontext.getResponse();
}
JspRuntimeLibrary.java 文件源码
项目:lazycat
阅读 32
收藏 0
点赞 0
评论 0
/**
* Returns the value of the javax.servlet.error.exception request attribute
* value, if present, otherwise the value of the
* javax.servlet.jsp.jspException request attribute value.
*
* This method is called at the beginning of the generated servlet code for
* a JSP error page, when the "exception" implicit scripting language
* variable is initialized.
*/
public static Throwable getThrowable(ServletRequest request) {
Throwable error = (Throwable) request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (error == null) {
error = (Throwable) request.getAttribute(PageContext.EXCEPTION);
if (error != null) {
/*
* The only place that sets JSP_EXCEPTION is
* PageContextImpl.handlePageException(). It really should set
* SERVLET_EXCEPTION, but that would interfere with the
* ErrorReportValve. Therefore, if JSP_EXCEPTION is set, we need
* to set SERVLET_EXCEPTION.
*/
request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, error);
}
}
return error;
}
TagUtils.java 文件源码
项目:lams
阅读 49
收藏 0
点赞 0
评论 0
public String computeURL(
PageContext pageContext,
String forward,
String href,
String page,
String action,
String module,
Map params,
String anchor,
boolean redirect)
throws MalformedURLException {
return this.computeURLWithCharEncoding(
pageContext,
forward,
href,
page,
action,
module,
params,
anchor,
redirect,
false);
}
TagUtils.java 文件源码
项目:lams
阅读 51
收藏 0
点赞 0
评论 0
public String computeURL(
PageContext pageContext,
String forward,
String href,
String page,
String action,
String module,
Map params,
String anchor,
boolean redirect,
boolean encodeSeparator)
throws MalformedURLException {
return computeURLWithCharEncoding(
pageContext,
forward,
href,
page,
action,
module,
params,
anchor,
redirect,
encodeSeparator,
false
);
}
CustomTag.java 文件源码
项目:jaffa-framework
阅读 28
收藏 0
点赞 0
评论 0
/**
* Pop this tag from the top of the stack on exit. Validate that this is the top
* of the stack as well.
*
* This has package static access for the FormTag that can't extent CustomTag
*
* @return top ICustomTag from the nested component stack
*/
static ICustomTag popParent(ICustomTag thisTag, PageContext pageContext) {
try {
Stack stack = CustomTag.getNestedComponentStack(pageContext);
if (stack == null) {
log.fatal("CustomTag.popParent: Stack Was NULL, expected " + thisTag);
return null;
}
ICustomTag me = (ICustomTag) stack.pop();
if (log.isDebugEnabled())
log.debug("CustomTag.popParent: parent from top of stack pageContext stack: " + thisTag.getParent());
if(!thisTag.equals(me))
log.fatal("CustomTag.popParent: Top of Stack Was " + me + ", expected " + thisTag);
return me;
} catch (Exception ee) {
log.error("Error in CustomTag.popParent: " + ee);
}
return null;
}
BaseTag.java 文件源码
项目:lams
阅读 34
收藏 0
点赞 0
评论 0
/**
* Process the start of this tag.
*
* @exception JspException if a JSP exception has occurred
*/
public int doStartTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
String serverName = (this.server == null) ? request.getServerName() : this.server;
String baseTag =
renderBaseElement(
request.getScheme(),
serverName,
request.getServerPort(),
request.getRequestURI());
JspWriter out = pageContext.getOut();
try {
out.write(baseTag);
} catch (IOException e) {
pageContext.setAttribute(Globals.EXCEPTION_KEY, e, PageContext.REQUEST_SCOPE);
throw new JspException(messages.getMessage("common.io", e.toString()));
}
return EVAL_BODY_INCLUDE;
}
ScopedAttributeELResolver.java 文件源码
项目:lazycat
阅读 36
收藏 0
点赞 0
评论 0
@Override
public Object getValue(ELContext context, Object base, Object property)
throws NullPointerException, PropertyNotFoundException, ELException {
if (context == null) {
throw new NullPointerException();
}
if (base == null) {
context.setPropertyResolved(true);
if (property != null) {
String key = property.toString();
PageContext page = (PageContext) context.getContext(JspContext.class);
return page.findAttribute(key);
}
}
return null;
}
Util.java 文件源码
项目:tomcat7
阅读 38
收藏 0
点赞 0
评论 0
/** Utility methods
* taken from org.apache.taglibs.standard.tag.common.core.UrlSupport
*/
public static String resolveUrl(
String url, String context, PageContext pageContext)
throws JspException {
// don't touch absolute URLs
if (isAbsoluteUrl(url))
return url;
// normalize relative URLs against a context root
HttpServletRequest request =
(HttpServletRequest) pageContext.getRequest();
if (context == null) {
if (url.startsWith("/"))
return (request.getContextPath() + url);
else
return url;
} else {
if (!context.startsWith("/") || !url.startsWith("/")) {
throw new JspTagException(
"In URL tags, when the \"context\" attribute is specified, values of both \"context\" and \"url\" must start with \"/\".");
}
if (context.equals("/")) {
// Don't produce string starting with '//', many
// browsers interpret this as host name, not as
// path on same host.
return url;
} else {
return (context + url);
}
}
}
ImplicitObjectELResolver.java 文件源码
项目:lams
阅读 25
收藏 0
点赞 0
评论 0
/**
*
* Creates the Map that maps init parameter name to single init
* parameter value.
**/
public static Map<String, String> createInitParamMap(PageContext pContext)
{
final ServletContext context = pContext.getServletContext ();
return new EnumeratedMap<String, String> ()
{
public Enumeration<String> enumerateKeys ()
{
return context.getInitParameterNames ();
}
public String getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getInitParameter ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
}
JspFactoryImpl.java 文件源码
项目:tomcat7
阅读 33
收藏 0
点赞 0
评论 0
private PageContext internalGetPageContext(Servlet servlet, ServletRequest request,
ServletResponse response, String errorPageURL, boolean needsSession,
int bufferSize, boolean autoflush) {
try {
PageContext pc;
if (USE_POOL) {
PageContextPool pool = localPool.get();
if (pool == null) {
pool = new PageContextPool();
localPool.set(pool);
}
pc = pool.get();
if (pc == null) {
pc = new PageContextImpl();
}
} else {
pc = new PageContextImpl();
}
pc.initialize(servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
return pc;
} catch (Throwable ex) {
ExceptionUtils.handleThrowable(ex);
if (ex instanceof RuntimeException) {
throw (RuntimeException) ex;
}
log.fatal("Exception initializing page context", ex);
return null;
}
}
ComponentContext.java 文件源码
项目:lams
阅读 31
收藏 0
点赞 0
评论 0
/**
* Get object from requested context.
* Context can be 'component'.
* @param beanName Name of the bean to find.
* @param scope Search scope (see {@link PageContext}).
* @param pageContext Page context.
* @return requested bean or <code>null</code> if not found.
*/
public Object getAttribute(
String beanName,
int scope,
PageContext pageContext) {
if (scope == ComponentConstants.COMPONENT_SCOPE){
return getAttribute(beanName);
}
return pageContext.getAttribute(beanName, scope);
}
TagHelper.java 文件源码
项目:jaffa-framework
阅读 32
收藏 0
点赞 0
评论 0
/** Returns a true if the current widget is enclosed inside another widget.
* @param pageContext The PageContext of the jsp.
* @return a true if the current widget is enclosed inside another widget.
*/
public static boolean isEnclosed(PageContext pageContext) {
Boolean result = (Boolean) pageContext.findAttribute(ATTRIBUTE_ENCLOSED);
if (result != null)
return result.booleanValue();
else
return false;
}
ImplicitObjectELResolver.java 文件源码
项目:lams
阅读 27
收藏 0
点赞 0
评论 0
/**
*
* Creates the Map that maps header name to single header
* value.
**/
public static Map<String, String> createHeaderMap (PageContext pContext)
{
final HttpServletRequest request =
(HttpServletRequest) pContext.getRequest ();
return new EnumeratedMap<String, String> ()
{
public Enumeration<String> enumerateKeys ()
{
return request.getHeaderNames ();
}
public String getValue (Object pKey)
{
if (pKey instanceof String) {
return request.getHeader ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
}
ImplicitObjectELResolver.java 文件源码
项目:tomcat7
阅读 34
收藏 0
点赞 0
评论 0
public static ScopeManager get(PageContext page) {
ScopeManager mngr = (ScopeManager) page.getAttribute(MNGR_KEY);
if (mngr == null) {
mngr = new ScopeManager(page);
page.setAttribute(MNGR_KEY, mngr);
}
return mngr;
}
TestPageContextImpl.java 文件源码
项目:tomcat7
阅读 31
收藏 0
点赞 0
评论 0
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
PageContext pageContext = JspFactory.getDefaultFactory().getPageContext(
this, req, resp, null, false, JspWriter.DEFAULT_BUFFER, true);
JspWriter out = pageContext.getOut();
if (Constants.DEFAULT_BUFFER_SIZE == out.getBufferSize()) {
resp.getWriter().println("OK");
} else {
resp.getWriter().println("FAIL");
}
}