public abstract class Page extends java.lang.Object implements Servlet, ServletConfig, CauchoPage
Modifier and Type | Field and Description |
---|---|
protected static java.util.logging.Logger |
_caucho_log |
protected java.lang.String |
_contentType |
Constructor and Description |
---|
Page() |
Modifier and Type | Method and Description |
---|---|
protected void |
_caucho_addCacheDepend(Path path,
long lastModified,
long length)
Adds a single cache dependency.
|
protected void |
_caucho_addDepend(java.util.ArrayList<PersistentDependency> dependList)
Adds an array of dependencies to the page.
|
protected void |
_caucho_addDepend(Path path)
Adds a dependency to the page.
|
protected void |
_caucho_addDepend(Path path,
long lastModified,
long length)
Adds a JSP source dependency.
|
protected void |
_caucho_addDepend(PersistentDependency depend)
Adds a dependency to the page.
|
void |
_caucho_free()
Marks the page as free.
|
WebApp |
_caucho_getApplication()
Returns the Resin webApp.
|
java.util.ArrayList<Dependency> |
_caucho_getDependList() |
protected java.util.HashMap<java.lang.String,java.lang.reflect.Method> |
_caucho_getFunctionMap()
Returns true if the underlying source has been modified.
|
void |
_caucho_init(HttpServletRequest req,
HttpServletResponse res)
Initialize the response headers.
|
boolean |
_caucho_isModified()
Returns true if the underlying source has been modified.
|
long |
_caucho_lastModified()
The default Last-Modified time is just the most recently modified file.
|
protected void |
_caucho_setAlwaysModified()
When called treats the JSP page as always modified, i.e.
|
protected void |
_caucho_setCacheable()
Marks the page as cacheable.
|
protected void |
_caucho_setContentType(java.lang.String contentType,
java.lang.String encoding) |
protected void |
_caucho_setModified()
When called treats the JSP page as always modified, i.e.
|
protected void |
_caucho_setNeverModified(boolean modified)
Set if the page is never modified.
|
void |
_caucho_use()
Marks the page as used.
|
static long |
calculateLastModified(java.util.ArrayList<PersistentDependency> depends,
java.util.ArrayList<Depend> cacheDepends)
Calculate the last modified time for all the dependencies.
|
void |
caucho_init(ServletConfig config) |
void |
destroy()
Called when the servlet shuts down.
|
java.lang.String |
getInitParameter(java.lang.String name)
Returns an initialization parameter.
|
java.util.Enumeration<java.lang.String> |
getInitParameterNames()
Returns an enumeration of the init-parameter names
|
long |
getLastModified(HttpServletRequest request)
Returns the Last-Modified time for use in caching.
|
ServletConfig |
getServletConfig()
Returns this servlet's configuration.
|
ServletContext |
getServletContext()
Returns the ServletContext for the servlet or filter.
|
java.lang.String |
getServletInfo()
Returns an information string about the servlet.
|
java.lang.String |
getServletName()
Returns the servlet name for this configuration.
|
void |
init(Path path) |
void |
init(ServletConfig config)
Initialize the servlet.
|
boolean |
isDead() |
boolean |
isInit()
Returns true if initializes.
|
void |
log(java.lang.String msg) |
void |
log(java.lang.String msg,
java.lang.Throwable cause) |
void |
pageservice(HttpServletRequest req,
HttpServletResponse res)
The extended service method creates JavaScript global variables
from a property map.
|
protected void |
setDead() |
boolean |
startRecompiling()
Starts recompiling.
|
protected static final java.util.logging.Logger _caucho_log
protected java.lang.String _contentType
public void init(Path path) throws ServletException
init
in interface CauchoPage
ServletException
public void caucho_init(ServletConfig config) throws ServletException
caucho_init
in interface CauchoPage
ServletException
protected void _caucho_setContentType(java.lang.String contentType, java.lang.String encoding)
protected void _caucho_setAlwaysModified()
protected void _caucho_setModified()
protected void _caucho_setNeverModified(boolean modified)
protected void _caucho_addDepend(Path path)
path
- the file the JSP page is dependent on.protected void _caucho_addDepend(PersistentDependency depend)
path
- the file the JSP page is dependent on.protected void _caucho_addDepend(java.util.ArrayList<PersistentDependency> dependList)
protected void _caucho_addDepend(Path path, long lastModified, long length)
path
- the path to the filelastModified
- the last modified timelength
- the length of the filepublic java.util.ArrayList<Dependency> _caucho_getDependList()
_caucho_getDependList
in interface CauchoPage
protected void _caucho_setCacheable()
protected void _caucho_addCacheDepend(Path path, long lastModified, long length)
path
- the path to the filelastModified
- the last modified timelength
- the length of the filepublic boolean _caucho_isModified()
_caucho_isModified
in interface CauchoPage
protected java.util.HashMap<java.lang.String,java.lang.reflect.Method> _caucho_getFunctionMap()
public void init(ServletConfig config) throws ServletException
init
in interface Servlet
config
- information from the configuration file.ServletException
public boolean isInit()
public WebApp _caucho_getApplication()
_caucho_getApplication
in interface CauchoPage
public ServletContext getServletContext()
ServletConfig
getServletContext
in interface ServletConfig
public java.lang.String getServletName()
ServletConfig
<servlet servlet-name='myservlet'
servlet-class='test.MyServlet'/>
getServletName
in interface ServletConfig
public java.lang.String getInitParameter(java.lang.String name)
ServletConfig
<servlet servlet-name='myservlet'
servlet-class='test.MyServlet'>
<init-param param1='value1'/>
<init-param param2='value2'/>
</servlet>
getInitParameter
in interface ServletConfig
name
- of the parameterpublic java.util.Enumeration<java.lang.String> getInitParameterNames()
ServletConfig
getInitParameterNames
in interface ServletConfig
public void log(java.lang.String msg)
public void log(java.lang.String msg, java.lang.Throwable cause)
public java.lang.String getServletInfo()
Servlet
getServletInfo
in interface Servlet
public ServletConfig getServletConfig()
getServletConfig
in interface Servlet
public void _caucho_init(HttpServletRequest req, HttpServletResponse res)
public long getLastModified(HttpServletRequest request)
public long _caucho_lastModified()
_caucho_lastModified
in interface CauchoPage
public static long calculateLastModified(java.util.ArrayList<PersistentDependency> depends, java.util.ArrayList<Depend> cacheDepends)
depends
- list of the source file dependenciescacheDepends
- list of the cache dependenciespublic void pageservice(HttpServletRequest req, HttpServletResponse res) throws java.io.IOException, ServletException
This method only makes sense for JavaScript templates. To pass variables to Java templates, use the setAttribute() method of the request.
properties
- hashmap of objects to create as JavaScript globals.java.io.IOException
ServletException
protected void setDead()
public boolean isDead()
public boolean startRecompiling()
public void _caucho_use()
public void _caucho_free()