<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_14) on Mon Apr 26 10:16:14 PDT 2010 --> | |
<TITLE> | |
JeeConfig (VelocityTools 2.0 Documentation) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.velocity.tools.view.JeeConfig interface"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="JeeConfig (VelocityTools 2.0 Documentation)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= 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/velocity/tools/view/IncludeTool.html" title="class in org.apache.velocity.tools.view"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/velocity/tools/view/JeeContextConfig.html" title="class in org.apache.velocity.tools.view"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/velocity/tools/view/JeeConfig.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="JeeConfig.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <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.velocity.tools.view</FONT> | |
<BR> | |
Interface JeeConfig</H2> | |
<DL> | |
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/velocity/tools/view/JeeContextConfig.html" title="class in org.apache.velocity.tools.view">JeeContextConfig</A>, <A HREF="../../../../../org/apache/velocity/tools/view/JeeFilterConfig.html" title="class in org.apache.velocity.tools.view">JeeFilterConfig</A>, <A HREF="../../../../../org/apache/velocity/tools/view/JeeServletConfig.html" title="class in org.apache.velocity.tools.view">JeeServletConfig</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public interface <B>JeeConfig</B></DL> | |
</PRE> | |
<P> | |
<p>Because sometimes you don't care about the difference between a | |
servlet and a filter. Why isn't there a common interface for | |
<CODE>FilterConfig</CODE> and <CODE>ServletConfig</CODE> already? Sheesh.</p> | |
</p> | |
<p> | |
Anyway, this also adds the ability to fake everything if you don't have | |
either a FilterConfig or a ServletConfig handy. Just implement it and | |
override the methods that return things you care about. Oh, and if you don't | |
have any init-params at all, just use <A HREF="../../../../../org/apache/velocity/tools/view/JeeContextConfig.html" title="class in org.apache.velocity.tools.view"><CODE>JeeContextConfig</CODE></A> as | |
<CODE>ServletContext</CODE> is the only really essential thing for creating a | |
<A HREF="../../../../../org/apache/velocity/tools/view/VelocityView.html" title="class in org.apache.velocity.tools.view"><CODE>VelocityView</CODE></A>.</p> | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>2.0</DD> | |
<DT><B>Version:</B></DT> | |
<DD>$Id$</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- ========== 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> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#findInitParameter(java.lang.String)">findInitParameter</A></B>(java.lang.String key)</CODE> | |
<BR> | |
Looks for the specified init-param in the servlet/filter config | |
(i.e.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#getInitParameter(java.lang.String)">getInitParameter</A></B>(java.lang.String name)</CODE> | |
<BR> | |
Returns an initialization parameter.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.util.Enumeration</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#getInitParameterNames()">getInitParameterNames</A></B>()</CODE> | |
<BR> | |
Returns all the parameter names.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#getName()">getName</A></B>()</CODE> | |
<BR> | |
Returns the name of the servlet (or filter) being used.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> javax.servlet.ServletContext</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#getServletContext()">getServletContext</A></B>()</CODE> | |
<BR> | |
Returns the servlet context.</TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ 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="getInitParameter(java.lang.String)"><!-- --></A><H3> | |
getInitParameter</H3> | |
<PRE> | |
java.lang.String <B>getInitParameter</B>(java.lang.String name)</PRE> | |
<DL> | |
<DD>Returns an initialization parameter. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the initialization parameter. | |
<DT><B>Returns:</B><DD>The value of the parameter.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="findInitParameter(java.lang.String)"><!-- --></A><H3> | |
findInitParameter</H3> | |
<PRE> | |
java.lang.String <B>findInitParameter</B>(java.lang.String key)</PRE> | |
<DL> | |
<DD>Looks for the specified init-param in the servlet/filter config | |
(i.e. calls <A HREF="../../../../../org/apache/velocity/tools/view/JeeConfig.html#getInitParameter(java.lang.String)"><CODE>getInitParameter(java.lang.String)</CODE></A>). If no such init-param is | |
found there, it checks the <CODE>ServletContext</CODE>'s init-params | |
for the specified parameter. | |
<P> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>key</CODE> - The name of the initialization parameter. | |
<DT><B>Returns:</B><DD>The value of the initialization parameter.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getInitParameterNames()"><!-- --></A><H3> | |
getInitParameterNames</H3> | |
<PRE> | |
java.util.Enumeration <B>getInitParameterNames</B>()</PRE> | |
<DL> | |
<DD>Returns all the parameter names. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The enumeration containing the parameter names.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getName()"><!-- --></A><H3> | |
getName</H3> | |
<PRE> | |
java.lang.String <B>getName</B>()</PRE> | |
<DL> | |
<DD>Returns the name of the servlet (or filter) being used. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The name of the configuration.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getServletContext()"><!-- --></A><H3> | |
getServletContext</H3> | |
<PRE> | |
javax.servlet.ServletContext <B>getServletContext</B>()</PRE> | |
<DL> | |
<DD>Returns the servlet context. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The servlet context.</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/velocity/tools/view/IncludeTool.html" title="class in org.apache.velocity.tools.view"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/velocity/tools/view/JeeContextConfig.html" title="class in org.apache.velocity.tools.view"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/velocity/tools/view/JeeConfig.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="JeeConfig.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright (c) 2003-2007 Apache Software Foundation | |
</BODY> | |
</HTML> |