<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- saved from url=(0014)about:internet --> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_19) on Sun Mar 20 20:57:10 PKT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
MockServletContext (Click Mock API - v2.3.0) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.click.servlet.MockServletContext class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="MockServletContext (Click Mock API - v2.3.0)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/click/servlet/MockServletConfig.html" title="class in org.apache.click.servlet"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/servlet/MockSession.html" title="class in org.apache.click.servlet"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/click/servlet/MockServletContext.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="MockServletContext.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.click.servlet</FONT> | |
<BR> | |
Class MockServletContext</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.servlet.MockServletContext</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>MockServletContext</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></DL> | |
</PRE> | |
<P> | |
Mock implementation of <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet"><CODE>ServletContext</CODE></A>. | |
<p/> | |
This implementation supports all of the standard context methods except for | |
request dispatching which just indicates what is being dispatched to, rather | |
than performing an actual dispatch. | |
<p/> | |
The context can be configured with a path parameter that should point to an | |
directory location that represents the place where the contents of | |
the WAR bundle are located. The path can either be an absolute or relative | |
path. If the path is not found, the classpath will be checked for such a | |
directory. Setting this value allows all of the resource location | |
functionality to work as in a fully functioning web application. If this | |
value is not set then not resource location functionality will work and | |
instead null will always be returned. | |
<p/> | |
This class was adapted from <a href="http://wicket.apache.org">Apache Wicket</a>. | |
<P> | |
<P> | |
<HR> | |
<P> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#DEFAULT_CONTEXT_PATH">DEFAULT_CONTEXT_PATH</A></B></CODE> | |
<BR> | |
The servlet context default context path, <em>"/mock"</em>.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#MockServletContext()">MockServletContext</A></B>()</CODE> | |
<BR> | |
Default constructor for this mock object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#MockServletContext(java.lang.String, java.lang.String)">MockServletContext</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath)</CODE> | |
<BR> | |
Create the mock object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#MockServletContext(java.lang.String, java.lang.String, java.lang.String)">MockServletContext</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> tempPath)</CODE> | |
<BR> | |
Create the mock object.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#addInitParameter(java.lang.String, java.lang.String)">addInitParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Add an init parameter.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#addInitParameters(java.util.Map)">addInitParameters</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> initParameters)</CODE> | |
<BR> | |
Add the map of init parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#addMimeType(java.lang.String, java.lang.String)">addMimeType</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fileExtension, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType)</CODE> | |
<BR> | |
Add a new recognized mime type.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#createTempDir()">createTempDir</A></B>()</CODE> | |
<BR> | |
Creates a temporary directory as specified by <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()"><CODE>getTempPath()</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#createWebappRoot()">createWebappRoot</A></B>()</CODE> | |
<BR> | |
Creates the web application root File <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getWebappRoot()"><CODE>getWebappRoot()</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getAttribute(java.lang.String)">getAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get an attribute with the given name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getAttributeNames()">getAttributeNames</A></B>()</CODE> | |
<BR> | |
Get all of the attribute names.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getContext(java.lang.String)">getContext</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the context for the given URL path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getContextPath()">getContextPath</A></B>()</CODE> | |
<BR> | |
Return the servlet context path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getInitParameter(java.lang.String)">getInitParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the init parameter with the given name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getInitParameterNames()">getInitParameterNames</A></B>()</CODE> | |
<BR> | |
Get the name of all of the init parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getMajorVersion()">getMajorVersion</A></B>()</CODE> | |
<BR> | |
Return the major version of the Servlet spec that this package supports, | |
defaults to 2.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getMimeType(java.lang.String)">getMimeType</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the mime type for the given file.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getMinorVersion()">getMinorVersion</A></B>()</CODE> | |
<BR> | |
Return the minor version of the Servlet spec that this package supports, | |
defaults to 3.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html" title="class or interface in javax.servlet">RequestDispatcher</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getNamedDispatcher(java.lang.String)">getNamedDispatcher</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Returns a RequestDispatcher for the specified name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getRealPath(java.lang.String)">getRealPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the real file path of the given resource name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html" title="class or interface in javax.servlet">RequestDispatcher</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getRequestDispatcher(java.lang.String)">getRequestDispatcher</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path)</CODE> | |
<BR> | |
Returns a RequestDispatcher for the specified path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getResource(java.lang.String)">getResource</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the URL for a particular resource that is relative to the web app | |
root directory.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getResourceAsStream(java.lang.String)">getResourceAsStream</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get an input stream for a particular resource that is relative to the | |
web app root directory or the current classpath.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getResourcePaths(java.lang.String)">getResourcePaths</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Get the resource paths starting from the web app root directory and then | |
relative to the given name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getServerInfo()">getServerInfo</A></B>()</CODE> | |
<BR> | |
Get the server info.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/Servlet.html" title="class or interface in javax.servlet">Servlet</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getServlet(java.lang.String)">getServlet</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
NOT USED - Servlet Spec requires that this always returns null.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getServletContextName()">getServletContextName</A></B>()</CODE> | |
<BR> | |
Return the name of the servlet context.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getServletNames()">getServletNames</A></B>()</CODE> | |
<BR> | |
NOT USED - Servlet spec requires that this always returns null.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><?></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getServlets()">getServlets</A></B>()</CODE> | |
<BR> | |
NOT USED - Servlet spec requires that this always returns null.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()">getTempPath</A></B>()</CODE> | |
<BR> | |
Return the temporary path where files are stored during test runs.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getWebappPath()">getWebappPath</A></B>()</CODE> | |
<BR> | |
Return the web application path where resources like javascript, css | |
and images can be picked up.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getWebappRoot()">getWebappRoot</A></B>()</CODE> | |
<BR> | |
Return the web application root File where resources like javascript, css | |
and images can be picked up.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#log(java.lang.Exception, java.lang.String)">log</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A> e, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</CODE> | |
<BR> | |
Log the exception to System.err and the message to System.out.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#log(java.lang.String)">log</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</CODE> | |
<BR> | |
Log the message to System.out.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#log(java.lang.String, java.lang.Throwable)">log</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A> cause)</CODE> | |
<BR> | |
Log the cause to System.err and the message to System.out.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#removeAttribute(java.lang.String)">removeAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Remove an attribute with the given name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE> | |
<BR> | |
Set an attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#setContextPath(java.lang.String)">setContextPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath)</CODE> | |
<BR> | |
Sets the servlet context path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#setServletContextName(java.lang.String)">setServletContextName</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> servletContextName)</CODE> | |
<BR> | |
Set the servlet context name to the specified value.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#setTempPath(java.lang.String)">setTempPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> tempPath)</CODE> | |
<BR> | |
Set the temporary path where files are stored during test runs.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/servlet/MockServletContext.html#setWebappPath(java.lang.String)">setWebappPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath)</CODE> | |
<BR> | |
Sets the mock web application path to the specified webappPath.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="DEFAULT_CONTEXT_PATH"><!-- --></A><H3> | |
DEFAULT_CONTEXT_PATH</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>DEFAULT_CONTEXT_PATH</B></PRE> | |
<DL> | |
<DD>The servlet context default context path, <em>"/mock"</em>. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.servlet.MockServletContext.DEFAULT_CONTEXT_PATH">Constant Field Values</A></DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="MockServletContext()"><!-- --></A><H3> | |
MockServletContext</H3> | |
<PRE> | |
public <B>MockServletContext</B>()</PRE> | |
<DL> | |
<DD>Default constructor for this mock object. | |
<p/> | |
The servlet context name is set to 'mock'. | |
The web content root and temporary work direcotry are set to null. | |
<P> | |
</DL> | |
<HR> | |
<A NAME="MockServletContext(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
MockServletContext</H3> | |
<PRE> | |
public <B>MockServletContext</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath)</PRE> | |
<DL> | |
<DD>Create the mock object. As part of the creation, the context sets the | |
root directory where web application content is stored. This must be an | |
ABSOLUTE directory relative to where the tests are being executed. | |
<p/> | |
For example: <code>System.getProperty("user.dir") + "/src/webapp"</code> | |
<p/> | |
In addition to setting the web root directory, this constructor also sets | |
up a temporary work directory for things like file uploads. | |
<p/> | |
<b>Note</b> this temporary work directory is set as the value of the | |
ServletContext attribute 'javax.servlet.context.tempdir'. | |
<p/> | |
The temporary work directory defaults to | |
System.getProperty("java.io.tmpdir"). | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>contextPath</CODE> - the servlet context path<DD><CODE>webappPath</CODE> - The path to the root of the web application</DL> | |
</DL> | |
<HR> | |
<A NAME="MockServletContext(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> | |
MockServletContext</H3> | |
<PRE> | |
public <B>MockServletContext</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> tempPath)</PRE> | |
<DL> | |
<DD>Create the mock object. As part of the creation, the context sets the | |
root directory where web application content is stored. This must be an | |
ABSOLUTE directory relative to where the tests are being executed. | |
<p/> | |
For example: <code>System.getProperty("user.dir") + "/src/webapp"</code> | |
<p/> | |
In addition to setting the web root directory, this constructor also sets | |
up a temporary work directory for things like file uploads. | |
<p/> | |
<b>Note</b> this temporary work directory is set as the value of the | |
ServletContext attribute 'javax.servlet.context.tempdir'. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>contextPath</CODE> - the servlet context path<DD><CODE>webappPath</CODE> - the path to the root of the web application<DD><CODE>tempPath</CODE> - the temporary work directory</DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="createWebappRoot()"><!-- --></A><H3> | |
createWebappRoot</H3> | |
<PRE> | |
public void <B>createWebappRoot</B>()</PRE> | |
<DL> | |
<DD>Creates the web application root File <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getWebappRoot()"><CODE>getWebappRoot()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getWebappPath()"><CODE>getWebappPath()</CODE></A> cannot | |
be found</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="createTempDir()"><!-- --></A><H3> | |
createTempDir</H3> | |
<PRE> | |
public void <B>createTempDir</B>()</PRE> | |
<DL> | |
<DD>Creates a temporary directory as specified by <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()"><CODE>getTempPath()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()"><CODE>getTempPath()</CODE></A> is not valid</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setServletContextName(java.lang.String)"><!-- --></A><H3> | |
setServletContextName</H3> | |
<PRE> | |
public void <B>setServletContextName</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> servletContextName)</PRE> | |
<DL> | |
<DD>Set the servlet context name to the specified value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>servletContextName</CODE> - the servlet context name</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTempPath()"><!-- --></A><H3> | |
getTempPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getTempPath</B>()</PRE> | |
<DL> | |
<DD>Return the temporary path where files are stored during test runs. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the temporary path where files are stored during test runs</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTempPath(java.lang.String)"><!-- --></A><H3> | |
setTempPath</H3> | |
<PRE> | |
public void <B>setTempPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> tempPath)</PRE> | |
<DL> | |
<DD>Set the temporary path where files are stored during test runs. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>tempPath</CODE> - the temporary path where files are stored during test | |
runs</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getWebappPath()"><!-- --></A><H3> | |
getWebappPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getWebappPath</B>()</PRE> | |
<DL> | |
<DD>Return the web application path where resources like javascript, css | |
and images can be picked up. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the web application path</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getWebappRoot()"><!-- --></A><H3> | |
getWebappRoot</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A> <B>getWebappRoot</B>()</PRE> | |
<DL> | |
<DD>Return the web application root File where resources like javascript, css | |
and images can be picked up. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the web application root File</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setWebappPath(java.lang.String)"><!-- --></A><H3> | |
setWebappPath</H3> | |
<PRE> | |
public void <B>setWebappPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> webappPath)</PRE> | |
<DL> | |
<DD>Sets the mock web application path to the specified webappPath. | |
<p/> | |
<b>Note:</b> this method will also set the web application's temporary | |
directory to the value <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()"><CODE>getTempPath()</CODE></A>. If <A HREF="../../../../org/apache/click/servlet/MockServletContext.html#getTempPath()"><CODE>getTempPath()</CODE></A> | |
is not set, this method will default tempPath to: | |
<tt>System.getProperty("java.io.tmpdir")</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>webappPath</CODE> - set the context web application path</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addInitParameter(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
addInitParameter</H3> | |
<PRE> | |
public void <B>addInitParameter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Add an init parameter. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The parameter name<DD><CODE>value</CODE> - The parameter value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addInitParameters(java.util.Map)"><!-- --></A><H3> | |
addInitParameters</H3> | |
<PRE> | |
public void <B>addInitParameters</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> initParameters)</PRE> | |
<DL> | |
<DD>Add the map of init parameters. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>initParameters</CODE> - A map of init parameters</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addMimeType(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
addMimeType</H3> | |
<PRE> | |
public void <B>addMimeType</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fileExtension, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType)</PRE> | |
<DL> | |
<DD>Add a new recognized mime type. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>fileExtension</CODE> - The file extension (e.g. "jpg")<DD><CODE>mimeType</CODE> - The mime type (e.g. "image/jpeg")</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3> | |
getAttribute</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get an attribute with the given name. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getAttribute(java.lang.String)" title="class or interface in javax.servlet">getAttribute</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The attribute name | |
<DT><B>Returns:</B><DD>The value, or null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAttributeNames()"><!-- --></A><H3> | |
getAttributeNames</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getAttributeNames</B>()</PRE> | |
<DL> | |
<DD>Get all of the attribute names. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getAttributeNames()" title="class or interface in javax.servlet">getAttributeNames</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The attribute names</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContext(java.lang.String)"><!-- --></A><H3> | |
getContext</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A> <B>getContext</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get the context for the given URL path. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getContext(java.lang.String)" title="class or interface in javax.servlet">getContext</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The url path | |
<DT><B>Returns:</B><DD>Always returns this</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContextPath()"><!-- --></A><H3> | |
getContextPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getContextPath</B>()</PRE> | |
<DL> | |
<DD>Return the servlet context path. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the servletContext path</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setContextPath(java.lang.String)"><!-- --></A><H3> | |
setContextPath</H3> | |
<PRE> | |
public void <B>setContextPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contextPath)</PRE> | |
<DL> | |
<DD>Sets the servlet context path. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>contextPath</CODE> - the servlet context path</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getInitParameter(java.lang.String)"><!-- --></A><H3> | |
getInitParameter</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getInitParameter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get the init parameter with the given name. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getInitParameter(java.lang.String)" title="class or interface in javax.servlet">getInitParameter</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name | |
<DT><B>Returns:</B><DD>The parameter, or null if no such parameter</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getInitParameterNames()"><!-- --></A><H3> | |
getInitParameterNames</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getInitParameterNames</B>()</PRE> | |
<DL> | |
<DD>Get the name of all of the init parameters. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getInitParameterNames()" title="class or interface in javax.servlet">getInitParameterNames</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The init parameter names</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMajorVersion()"><!-- --></A><H3> | |
getMajorVersion</H3> | |
<PRE> | |
public int <B>getMajorVersion</B>()</PRE> | |
<DL> | |
<DD>Return the major version of the Servlet spec that this package supports, | |
defaults to 2. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getMajorVersion()" title="class or interface in javax.servlet">getMajorVersion</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the major version of the Servlet spec that this package supports, | |
defaults to 2.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMimeType(java.lang.String)"><!-- --></A><H3> | |
getMimeType</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getMimeType</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get the mime type for the given file. Uses a hardcoded map of mime | |
types set at initialization time. If the mime type was not explicitly | |
set, this method will fallback to | |
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/util/ClickUtils.html#getMimeType(java.lang.String)" title="class or interface in org.apache.click.util"><CODE>ClickUtils.getMimeType(String)</CODE></A>. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getMimeType(java.lang.String)" title="class or interface in javax.servlet">getMimeType</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name to get the mime type for | |
<DT><B>Returns:</B><DD>The mime type</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMinorVersion()"><!-- --></A><H3> | |
getMinorVersion</H3> | |
<PRE> | |
public int <B>getMinorVersion</B>()</PRE> | |
<DL> | |
<DD>Return the minor version of the Servlet spec that this package supports, | |
defaults to 3. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getMinorVersion()" title="class or interface in javax.servlet">getMinorVersion</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the minor version of the Servlet spec that this package supports, | |
defaults to 3.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRealPath(java.lang.String)"><!-- --></A><H3> | |
getRealPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getRealPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get the real file path of the given resource name. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)" title="class or interface in javax.servlet">getRealPath</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name | |
<DT><B>Returns:</B><DD>The real path or null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRequestDispatcher(java.lang.String)"><!-- --></A><H3> | |
getRequestDispatcher</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html" title="class or interface in javax.servlet">RequestDispatcher</A> <B>getRequestDispatcher</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path)</PRE> | |
<DL> | |
<DD>Returns a RequestDispatcher for the specified path. The dispatcher | |
will not dispatch to the resource. It only records the specified path | |
so that one can test if the correct path was dispatched to. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRequestDispatcher(java.lang.String)" title="class or interface in javax.servlet">getRequestDispatcher</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>path</CODE> - a String specifying the pathname to the resource | |
<DT><B>Returns:</B><DD>a dispatcher for the specified path</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getNamedDispatcher(java.lang.String)"><!-- --></A><H3> | |
getNamedDispatcher</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/RequestDispatcher.html" title="class or interface in javax.servlet">RequestDispatcher</A> <B>getNamedDispatcher</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Returns a RequestDispatcher for the specified name. The dispatcher | |
will not dispatch to the resource. It only records the specified name | |
so that one can test if the correct name was dispatched to. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getNamedDispatcher(java.lang.String)" title="class or interface in javax.servlet">getNamedDispatcher</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - a String specifying the name of a servlet to wrap | |
<DT><B>Returns:</B><DD>a dispatcher for the specified name</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getResource(java.lang.String)"><!-- --></A><H3> | |
getResource</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> <B>getResource</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></PRE> | |
<DL> | |
<DD>Get the URL for a particular resource that is relative to the web app | |
root directory. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getResource(java.lang.String)" title="class or interface in javax.servlet">getResource</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the resource to get | |
<DT><B>Returns:</B><DD>The resource, or null if resource not found | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></CODE> - If the URL is invalid</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getResourceAsStream(java.lang.String)"><!-- --></A><H3> | |
getResourceAsStream</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>getResourceAsStream</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get an input stream for a particular resource that is relative to the | |
web app root directory or the current classpath. If the webappRoot is | |
not set, this method will try and load the resource from the classpath. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String)" title="class or interface in javax.servlet">getResourceAsStream</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the resource to get | |
<DT><B>Returns:</B><DD>The input stream for the resource, or null if resource is not | |
found</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getResourcePaths(java.lang.String)"><!-- --></A><H3> | |
getResourcePaths</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getResourcePaths</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Get the resource paths starting from the web app root directory and then | |
relative to the given name. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getResourcePaths(java.lang.String)" title="class or interface in javax.servlet">getResourcePaths</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The starting name | |
<DT><B>Returns:</B><DD>The set of resource paths at this location | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the specified name does not start | |
with a "/" character</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServerInfo()"><!-- --></A><H3> | |
getServerInfo</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getServerInfo</B>()</PRE> | |
<DL> | |
<DD>Get the server info. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getServerInfo()" title="class or interface in javax.servlet">getServerInfo</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The server info</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServlet(java.lang.String)"><!-- --></A><H3> | |
getServlet</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/Servlet.html" title="class or interface in javax.servlet">Servlet</A> <B>getServlet</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name) | |
throws <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletException.html" title="class or interface in javax.servlet">ServletException</A></PRE> | |
<DL> | |
<DD>NOT USED - Servlet Spec requires that this always returns null. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getServlet(java.lang.String)" title="class or interface in javax.servlet">getServlet</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Not used | |
<DT><B>Returns:</B><DD>null | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletException.html" title="class or interface in javax.servlet">ServletException</A></CODE> - Not used</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServletContextName()"><!-- --></A><H3> | |
getServletContextName</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getServletContextName</B>()</PRE> | |
<DL> | |
<DD>Return the name of the servlet context. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getServletContextName()" title="class or interface in javax.servlet">getServletContextName</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The name</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServletNames()"><!-- --></A><H3> | |
getServletNames</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getServletNames</B>()</PRE> | |
<DL> | |
<DD>NOT USED - Servlet spec requires that this always returns null. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getServletNames()" title="class or interface in javax.servlet">getServletNames</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServlets()"><!-- --></A><H3> | |
getServlets</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Enumeration.html" title="class or interface in java.util">Enumeration</A><?> <B>getServlets</B>()</PRE> | |
<DL> | |
<DD>NOT USED - Servlet spec requires that this always returns null. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getServlets()" title="class or interface in javax.servlet">getServlets</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="log(java.lang.Exception, java.lang.String)"><!-- --></A><H3> | |
log</H3> | |
<PRE> | |
public void <B>log</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A> e, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</PRE> | |
<DL> | |
<DD>Log the exception to System.err and the message to System.out. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#log(java.lang.Exception, java.lang.String)" title="class or interface in javax.servlet">log</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>e</CODE> - The exception to log<DD><CODE>msg</CODE> - The message to log</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="log(java.lang.String)"><!-- --></A><H3> | |
log</H3> | |
<PRE> | |
public void <B>log</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg)</PRE> | |
<DL> | |
<DD>Log the message to System.out. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#log(java.lang.String)" title="class or interface in javax.servlet">log</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - The message to log</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="log(java.lang.String, java.lang.Throwable)"><!-- --></A><H3> | |
log</H3> | |
<PRE> | |
public void <B>log</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> msg, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A> cause)</PRE> | |
<DL> | |
<DD>Log the cause to System.err and the message to System.out. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#log(java.lang.String, java.lang.Throwable)" title="class or interface in javax.servlet">log</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - The message to log<DD><CODE>cause</CODE> - The cause exception</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeAttribute(java.lang.String)"><!-- --></A><H3> | |
removeAttribute</H3> | |
<PRE> | |
public void <B>removeAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Remove an attribute with the given name. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#removeAttribute(java.lang.String)" title="class or interface in javax.servlet">removeAttribute</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3> | |
setAttribute</H3> | |
<PRE> | |
public void <B>setAttribute</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</PRE> | |
<DL> | |
<DD>Set an attribute. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#setAttribute(java.lang.String, java.lang.Object)" title="class or interface in javax.servlet">setAttribute</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the attribute<DD><CODE>o</CODE> - The value</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/click/servlet/MockServletConfig.html" title="class in org.apache.click.servlet"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/servlet/MockSession.html" title="class in org.apache.click.servlet"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/click/servlet/MockServletContext.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="MockServletContext.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
<style type='text/css'>.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;}.typ{color:#000;}.lit{color:#066;}.pun{color:#660;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}.dec{color:#606;}pre.prettyprint{padding:1em;border:1px solid #888;overflow:auto;}@media print{.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;font-style:italic;}.typ{color:#000;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}}</style><script type='text/javascript'>var PR_keywords={};(function(){var CPP_KEYWORDS='abstract bool break case catch char class const '+'const_cast continue default delete deprecated dllexport dllimport do '+'double dynamic_cast else enum explicit extern false float for friend '+'goto if inline int long mutable naked namespace new noinline noreturn '+'nothrow novtable operator private property protected public register '+'reinterpret_cast return selectany short signed sizeof static '+'static_cast struct switch template this thread throw true try typedef '+'typeid typename union unsigned using declaration, directive uuid '+'virtual void volatile while typeof';var CSHARP_KEYWORDS='as base by byte checked decimal delegate descending '+'event finally fixed foreach from group implicit in interface internal '+'into is lock null object override orderby params readonly ref sbyte '+'sealed stackalloc string select uint ulong unchecked unsafe ushort var';var JAVA_KEYWORDS='package synchronized boolean implements import throws '+'instanceof transient extends final strictfp native super';var JSCRIPT_KEYWORDS='debugger export function with NaN Infinity';var PERL_KEYWORDS='require sub unless until use elsif BEGIN END';var PYTHON_KEYWORDS='and assert def del elif except exec global lambda '+'not or pass print raise yield False True None';var RUBY_KEYWORDS='then end begin rescue ensure module when undef next '+'redo retry alias defined';var SH_KEYWORDS='done fi';var KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JAVA_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];for(var k=0;k<KEYWORDS.length;k++){var kw=KEYWORDS[k].split(' ');for(var i=0;i<kw.length;i++){if(kw[i]){PR_keywords[kw[i]]=true;}}}}).call(this);var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_TAB_WIDTH=8;function PR_isWordChar(ch){return(ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');}function PR_spliceArrayInto(inserted,container,containerPosition,countReplaced){inserted.unshift(containerPosition,countReplaced||0);try{container.splice.apply(container,inserted);}finally{inserted.splice(0,2);}}var REGEXP_PRECEDER_PATTERN=(function(){var preceders=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'];var pattern='(?:'+'(?:(?:^|[^0-9\.])\\.{1,3})|'+'(?:(?:^|[^\\+])\\+)|'+'(?:(?:^|[^\\-])-)';for(var i=0;i<preceders.length;++i){var preceder=preceders[i];if(PR_isWordChar(preceder.charAt(0))){pattern+='|\\b'+preceder;}else{pattern+='|'+preceder.replace(/([^=<>:&])/g,'\\$1');}}pattern+='|^)\\s*$';return new RegExp(pattern);})();var pr_amp=/&/g;var pr_lt=/</g;var pr_gt=/>/g;var pr_quot=/"/g;function PR_attribToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>').replace(pr_quot,'"');}function PR_textToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>');}var pr_ltEnt=/</g;var pr_gtEnt=/>/g;var pr_aposEnt=/'/g;var pr_quotEnt=/"/g;var pr_ampEnt=/&/g;function PR_htmlToText(html){var pos=html.indexOf('&');if(pos<0){return html;}for(--pos;(pos=html.indexOf('&#',pos+1))>=0;){var end=html.indexOf(';',pos);if(end>=0){var num=html.substring(pos+3,end);var radix=10;if(num&&num.charAt(0)=='x'){num=num.substring(1);radix=16;}var codePoint=parseInt(num,radix);if(!isNaN(codePoint)){html=(html.substring(0,pos)+String.fromCharCode(codePoint)+html.substring(end+1));}}}return html.replace(pr_ltEnt,'<').replace(pr_gtEnt,'>').replace(pr_aposEnt,"'").replace(pr_quotEnt,'"').replace(pr_ampEnt,'&');}function PR_isRawContent(node){return'XMP'==node.tagName;}var PR_innerHtmlWorks=null;function PR_getInnerHtml(node){if(null===PR_innerHtmlWorks){var testNode=document.createElement('PRE');testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));PR_innerHtmlWorks=!/</.test(testNode.innerHTML);}if(PR_innerHtmlWorks){var content=node.innerHTML;if(PR_isRawContent(node)){content=PR_textToHtml(content);}return content;}var out=[];for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}return out.join('');}function PR_normalizedHtml(node,out){switch(node.nodeType){case 1:var name=node.tagName.toLowerCase();out.push('\074',name);for(var i=0;i<node.attributes.length;++i){var attr=node.attributes[i];if(!attr.specified){continue;}out.push(' ');PR_normalizedHtml(attr,out);}out.push('>');for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}if(node.firstChild||!/^(?:br|link|img)$/.test(name)){out.push('<\/',name,'>');}break;case 2:out.push(node.name.toLowerCase(),'="',PR_attribToHtml(node.value),'"');break;case 3:case 4:out.push(PR_textToHtml(node.nodeValue));break;}}function PR_tabExpander(tabWidth){var SPACES=' ';var charInLine=0;return function(plainText){var out=null;var pos=0;for(var i=0,n=plainText.length;i<n;++i){var ch=plainText.charAt(i);switch(ch){case'\t':if(!out){out=[];}out.push(plainText.substring(pos,i));var nSpaces=tabWidth-(charInLine%tabWidth);charInLine+=nSpaces;for(;nSpaces>=0;nSpaces-=SPACES.length){out.push(SPACES.substring(0,nSpaces));}pos=i+1;break;case'\n':charInLine=0;break;default:++charInLine;}}if(!out){return plainText;}out.push(plainText.substring(pos));return out.join('');};}var pr_chunkPattern=/(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g;var pr_commentPrefix=/^<!--/;var pr_cdataPrefix=/^<\[CDATA\[/;var pr_brPrefix=/^<br\b/i;function PR_extractTags(s){var matches=s.match(pr_chunkPattern);var sourceBuf=[];var sourceBufLen=0;var extractedTags=[];if(matches){for(var i=0,n=matches.length;i<n;++i){var match=matches[i];if(match.length>1&&match.charAt(0)==='<'){if(pr_commentPrefix.test(match)){continue;}if(pr_cdataPrefix.test(match)){sourceBuf.push(match.substring(9,match.length-3));sourceBufLen+=match.length-12;}else if(pr_brPrefix.test(match)){sourceBuf.push('\n');sourceBufLen+=1;}else{extractedTags.push(sourceBufLen,match);}}else{var literalText=PR_htmlToText(match);sourceBuf.push(literalText);sourceBufLen+=literalText.length;}}}return{source:sourceBuf.join(''),tags:extractedTags};}function PR_createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);for(var i=allPatterns.length;--i>=0;){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}}})();var nPatterns=fallthroughStylePatterns.length;return function(sourceCode,opt_basePos){opt_basePos=opt_basePos||0;var decorations=[opt_basePos,PR_PLAIN];var lastToken='';var pos=0;var tail=sourceCode;while(tail.length){var style;var token=null;var patternParts=shortcuts[tail.charAt(0)];if(patternParts){var match=tail.match(patternParts[1]);token=match[0];style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];var contextPattern=patternParts[2];if(contextPattern&&!contextPattern.test(lastToken)){continue;}var match=tail.match(patternParts[1]);if(match){token=match[0];style=patternParts[0];break;}}if(!token){style=PR_PLAIN;token=tail.substring(0,1);}}decorations.push(opt_basePos+pos,style);pos+=token.length;tail=tail.substring(token.length);if(style!==PR_COMMENT&&/\S/.test(token)){lastToken=token;}}return decorations;};}var PR_C_STYLE_STRING_AND_COMMENT_LEXER=PR_createSimpleLexer([[PR_STRING,/^\'(?:[^\\\']|\\[\s\S])*(?:\'|$)/,null,"'"],[PR_STRING,/^"(?:[^\\"]|\\[\s\S])*(?:"|$)/,null,'"'],[PR_STRING,/^\`(?:[^\\\`]|\\[\s\S])*(?:\`|$)/,null,'`']],[[PR_PLAIN,/^(?:[^\'"\`\/\#]+)/,null,' \r\n'],[PR_COMMENT,/^#[^\r\n]*/,null,'#'],[PR_COMMENT,/^\/\/[^\r\n]*/,null],[PR_STRING,/^\/(?:[^\\\*\/]|\\[\s\S])+(?:\/|$)/,REGEXP_PRECEDER_PATTERN],[PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]]);function PR_splitStringAndCommentTokens(sourceCode){return PR_C_STYLE_STRING_AND_COMMENT_LEXER(sourceCode);}var PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER=PR_createSimpleLexer([],[[PR_PLAIN,/^\s+/,null,' \r\n'],[PR_PLAIN,/^[a-z_$@][a-z_$@0-9]*/i,null],[PR_LITERAL,/^0x[a-f0-9]+[a-z]/i,null],[PR_LITERAL,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?[a-z]*/i,null,'123456789'],[PR_PUNCTUATION,/^[^\s\w\.$@]+/,null]]);function PR_splitNonStringNonCommentTokens(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_PLAIN){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecs=PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER(chunk,start);for(var j=0,m=subDecs.length;j<m;j+=2){var subStyle=subDecs[j+1];if(subStyle===PR_PLAIN){var subStart=subDecs[j];var subEnd=j+2<m?subDecs[j+2]:chunk.length;var token=source.substring(subStart,subEnd);if(token=='.'){subDecs[j+1]=PR_PUNCTUATION;}else if(token in PR_keywords){subDecs[j+1]=PR_KEYWORD;}else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)){subDecs[j+1]=token.charAt(0)=='@'?PR_LITERAL:PR_TYPE;}}}PR_spliceArrayInto(subDecs,decorations,i,2);i+=subDecs.length-2;}}return decorations;}var PR_MARKUP_LEXER=PR_createSimpleLexer([],[[PR_PLAIN,/^[^<]+/,null],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/,null],[PR_COMMENT,/^<!--[\s\S]*?(?:-->|$)/,null],[PR_SOURCE,/^<\?[\s\S]*?(?:\?>|$)/,null],[PR_SOURCE,/^<%[\s\S]*?(?:%>|$)/,null],[PR_SOURCE,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[PR_TAG,/^<\/?\w[^<>]*>/,null]]);var PR_SOURCE_CHUNK_PARTS=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function PR_tokenizeMarkup(source){var decorations=PR_MARKUP_LEXER(source);for(var i=0;i<decorations.length;i+=2){if(decorations[i+1]===PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var sourceChunk=source.substring(start,end);var match=(sourceChunk.match(PR_SOURCE_CHUNK_PARTS));if(match){decorations.splice(i,2,start,PR_TAG,start+match[1].length,PR_SOURCE,start+match[1].length+(match[2]||'').length,PR_TAG);}}}return decorations;}var PR_TAG_LEXER=PR_createSimpleLexer([[PR_ATTRIB_VALUE,/^\'[^\']*(?:\'|$)/,null,"'"],[PR_ATTRIB_VALUE,/^"[^"]*(?:"|$)/,null,'"'],[PR_PUNCTUATION,/^[<>\/=]+/,null,'<>/=']],[[PR_TAG,/^[\w-]+/,/^</],[PR_ATTRIB_VALUE,/^[\w-]+/,/^=/],[PR_ATTRIB_NAME,/^[\w-]+/,null],[PR_PLAIN,/^\s+/,null,' \r\n']]);function PR_splitTagAttributes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_TAG){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecorations=PR_TAG_LEXER(chunk,start);PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceNodes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style==PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var subDecorations=PR_decorateSource(source.substring(start,end));for(var j=0,m=subDecorations.length;j<m;j+=2){subDecorations[j]+=start;}PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceAttributes(source,decorations){var nextValueIsSource=false;for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_ATTRIB_NAME){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;nextValueIsSource=/^on|^style$/i.test(source.substring(start,end));}else if(style==PR_ATTRIB_VALUE){if(nextValueIsSource){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var attribValue=source.substring(start,end);var attribLen=attribValue.length;var quoted=(attribLen>=2&&/^["\']/.test(attribValue)&&attribValue.charAt(0)===attribValue.charAt(attribLen-1));var attribSource;var attribSourceStart;var attribSourceEnd;if(quoted){attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue;}else{attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue.substring(1,attribValue.length-1);}var attribSourceDecorations=PR_decorateSource(attribSource);for(var j=0,m=attribSourceDecorations.length;j<m;j+=2){attribSourceDecorations[j]+=attribSourceStart;}if(quoted){attribSourceDecorations.push(attribSourceEnd,PR_ATTRIB_VALUE);PR_spliceArrayInto(attribSourceDecorations,decorations,i+2,0);}else{PR_spliceArrayInto(attribSourceDecorations,decorations,i,2);}}nextValueIsSource=false;}}return decorations;}function PR_decorateSource(sourceCode){var decorations=PR_splitStringAndCommentTokens(sourceCode);decorations=PR_splitNonStringNonCommentTokens(sourceCode,decorations);return decorations;}function PR_decorateMarkup(sourceCode){var decorations=PR_tokenizeMarkup(sourceCode);decorations=PR_splitTagAttributes(sourceCode,decorations);decorations=PR_splitSourceNodes(sourceCode,decorations);decorations=PR_splitSourceAttributes(sourceCode,decorations);return decorations;}function PR_recombineTagsAndDecorations(sourceText,extractedTags,decorations){var html=[];var outputIdx=0;var openDecoration=null;var currentDecoration=null;var tagPos=0;var decPos=0;var tabExpander=PR_tabExpander(PR_TAB_WIDTH);function emitTextUpTo(sourceIdx){if(sourceIdx>outputIdx){if(openDecoration&&openDecoration!==currentDecoration){html.push('</span>');openDecoration=null;}if(!openDecoration&¤tDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1 ').replace(/\r\n?|\n/g,' <br>');html.push(htmlChunk);outputIdx=sourceIdx;}}while(true){var outputTag;if(tagPos<extractedTags.length){if(decPos<decorations.length){outputTag=extractedTags[tagPos]<=decorations[decPos];}else{outputTag=true;}}else{outputTag=false;}if(outputTag){emitTextUpTo(extractedTags[tagPos]);if(openDecoration){html.push('</span>');openDecoration=null;}html.push(extractedTags[tagPos+1]);tagPos+=2;}else if(decPos<decorations.length){emitTextUpTo(decorations[decPos]);currentDecoration=decorations[decPos+1];decPos+=2;}else{break;}}emitTextUpTo(sourceText.length);if(openDecoration){html.push('</span>');}return html.join('');}function prettyPrintOne(sourceCodeHtml){try{var sourceAndExtractedTags=PR_extractTags(sourceCodeHtml);var source=sourceAndExtractedTags.source;var extractedTags=sourceAndExtractedTags.tags;var isMarkup=/^\s*</.test(source)&&/>\s*$/.test(source);var decorations=isMarkup?PR_decorateMarkup(source):PR_decorateSource(source);return PR_recombineTagsAndDecorations(source,extractedTags,decorations);}catch(e){if('console'in window){console.log(e);console.trace();}return sourceCodeHtml;}}var PR_SHOULD_USE_CONTINUATION=true;function prettyPrint(opt_whenDone){var codeSegments=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0;j<codeSegments[i].length;++j){elements.push(codeSegments[i][j]);}}codeSegments=null;var k=0;function doWork(){var endTime=(PR_SHOULD_USE_CONTINUATION?new Date().getTime()+250:Infinity);for(;k<elements.length&&new Date().getTime()<endTime;k++){var cs=elements[k];if(cs.className&&cs.className.indexOf('prettyprint')>=0){var nested=false;for(var p=cs.parentNode;p!=null;p=p.parentNode){if((p.tagName=='pre'||p.tagName=='code'||p.tagName=='xmp')&&p.className&&p.className.indexOf('prettyprint')>=0){nested=true;break;}}if(!nested){var content=PR_getInnerHtml(cs);content=content.replace(/(?:\r\n?|\n)$/,'');var newContent=prettyPrintOne(content);if(!PR_isRawContent(cs)){cs.innerHTML=newContent;}else{var pre=document.createElement('PRE');for(var i=0;i<cs.attributes.length;++i){var a=cs.attributes[i];if(a.specified){pre.setAttribute(a.name,a.value);}}pre.innerHTML=newContent;cs.parentNode.replaceChild(pre,cs);}}}}if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}doWork();}</script><script type='text/javascript'>prettyPrint();</script></BODY> | |
</HTML> |