Class CmsJspLoader
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler
,I_CmsFlexCacheEnabledLoader
,I_CmsResourceLoader
,I_CmsEventListener
Parameters supported by this loader:
- jsp.repository
-
(Optional) This is the root directory in the "real" file system where generated JSPs are stored.
The default is the web application path, e.g. in Tomcat if your web application is
names "opencms" it would be
${TOMCAT_HOME}/webapps/opencms/
. Thejsp.folder
(see below) is added to this path. Usually thejsp.repository
is not changed. - jsp.folder
-
(Optional) A path relative to the
jsp.repository
path where the JSPs generated by OpenCms are stored. The default is to store the generated JSP in/WEB-INF/jsp/
. This works well in Tomcat 4, and the JSPs are not accessible directly from the outside this way, only through the OpenCms servlet. Please note: Some servlet environments (e.g. BEA Weblogic) do not permit JSPs to be stored under/WEB-INF
. For environments like these, set the path to some place where JSPs can be accessed, e.g./jsp/
only. - jsp.errorpage.committed
-
(Optional) This parameter controls behavior of JSP error pages
i.e.
<% page errorPage="..." %>
. If you find that these don't work in your servlet environment, you should try to change the value here. The defaulttrue
has been tested with Tomcat 4.1 and 5.0. Older versions of Tomcat like 4.0 require a setting offalse
.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property value for "cache" that indicates that the FlexCache should be bypassed.static final String
Property value for "cache" that indicates that the output should be streamed.static final String
Default jsp folder constant.static final String
Special JSP directive tag start (%>
).static final String
Special JSP directive tag start (<%(
).static final String
Extension for JSP managed by OpenCms (.jsp
).static final String
Cache max age parameter name.static final String
Jsp cache size parameter name.static final String
Error page committed parameter name.static final String
Jsp folder parameter name.static final String
Jsp repository parameter name.static final int
The id of this loader.Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
Fields inherited from interface org.opencms.main.I_CmsEventListener
EVENT_BEFORE_PUBLISH_PROJECT, EVENT_CLEAR_CACHES, EVENT_CLEAR_OFFLINE_CACHES, EVENT_CLEAR_ONLINE_CACHES, EVENT_CLEAR_PRINCIPAL_CACHES, EVENT_FLEX_CACHE_CLEAR, EVENT_FLEX_PURGE_JSP_REPOSITORY, EVENT_FULLSTATIC_EXPORT, EVENT_GROUP_MODIFIED, EVENT_LOGIN_USER, EVENT_OU_MODIFIED, EVENT_PROJECT_MODIFIED, EVENT_PROPERTY_DEFINITION_CREATED, EVENT_PROPERTY_DEFINITION_MODIFIED, EVENT_PROPERTY_MODIFIED, EVENT_PUBLISH_PROJECT, EVENT_REBUILD_SEARCHINDEXES, EVENT_REINDEX_OFFLINE, EVENT_REINDEX_ONLINE, EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, EVENT_RESOURCE_COPIED, EVENT_RESOURCE_CREATED, EVENT_RESOURCE_DELETED, EVENT_RESOURCE_MODIFIED, EVENT_RESOURCE_MOVED, EVENT_RESOURCES_AND_PROPERTIES_MODIFIED, EVENT_RESOURCES_MODIFIED, EVENT_SITEMAP_CHANGED, EVENT_UPDATE_EXPORTS, EVENT_USER_MODIFIED, KEY_CHANGE, KEY_DBCONTEXT, KEY_GROUP_ID, KEY_GROUP_NAME, KEY_INDEX_NAMES, KEY_IS_ONLINE, KEY_OU_ID, KEY_OU_NAME, KEY_PROJECTID, KEY_PUBLISHID, KEY_PUBLISHLIST, KEY_REINDEX_RELATED, KEY_REPORT, KEY_RESOURCE, KEY_RESOURCES, KEY_SKIPINDEX, KEY_USER_ACTION, KEY_USER_CHANGES, KEY_USER_ID, KEY_USER_NAME, LISTENERS_FOR_ALL_EVENTS, VALUE_CREATE_SIBLING, VALUE_GROUP_MODIFIED_ACTION_CREATE, VALUE_GROUP_MODIFIED_ACTION_DELETE, VALUE_GROUP_MODIFIED_ACTION_WRITE, VALUE_OU_MODIFIED_ACTION_CREATE, VALUE_OU_MODIFIED_ACTION_DELETE, VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP, VALUE_USER_MODIFIED_ACTION_CREATE_USER, VALUE_USER_MODIFIED_ACTION_DELETE_USER, VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP, VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD, VALUE_USER_MODIFIED_ACTION_SET_OU, VALUE_USER_MODIFIED_ACTION_WRITE_USER
Fields inherited from interface org.opencms.loader.I_CmsResourceLoader
PARAMETER_ELEMENT
-
Constructor Summary
ConstructorDescriptionThe constructor of the class is empty, the initial instance will be created by the resource manager upon startup of OpenCms. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationParameter
(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.void
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.void
destroy()
Destroy this ResourceLoder, this is a NOOP so far.protected byte[]
dispatchJsp
(CmsFlexController controller) Dispatches the current request to the OpenCms internal JSP.protected void
Purges the JSP repository.<p<byte[]
dump
(CmsObject cms, CmsResource file, String element, Locale locale, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Dumps the processed content of the the requested file (and it's sub-elements) to a byte array.byte[]
export
(CmsObject cms, CmsResource resource, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Static exports the contents of the requested file and it's sub-elements.protected String
generateTaglibInclusions
(Collection<String> taglibs) Generates the taglib directives for a collection of taglib identifiers.Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.protected CmsFlexController
getController
(CmsObject cms, CmsResource resource, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, boolean streaming, boolean top) Delivers a Flex controller, either by creating a new one, or by re-using an existing one.Returns the absolute path in the "real" file system for the JSP repository toplevel directory.int
Returns the id of the ResourceLoader.void
getReferencingStrongLinks
(CmsObject cms, CmsResource resource, Set<String> referencingPaths) Returns a set of root paths of files that are including the given resource using the 'link.strong' macro.Return a String describing the ResourceLoader, which is (localized to the system default locale)"The OpenCms default resource loader for JSP"
.protected void
initCaches
(int cacheSize) Initializes the caches.void
Initializes a configuration after all parameters have been added.static boolean
isJasperCompilerException
(Throwable exception) This method tries to determine whether an exception is thrown by the JSP compiler.boolean
Signals if the loader implementation supports static export of resources.boolean
Signals if the loader implementation requires processing during static export of resources.boolean
Signals if the loader implementation is usable for creating templates.boolean
Signals if a loader that supports templates must be invoked on the template URI or the resource URI.void
load
(CmsObject cms, CmsResource file, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Basic top-page processing method for a I_CmsResourceLoader, this method is called if the page is called as a sub-element on a page not already loaded with a I_CmsResourceLoader.protected byte[]
parseJsp
(byte[] byteContent, String encoding, CmsFlexController controller, Set<String> updatedFiles, boolean isHardInclude) Parses the JSP and modifies OpenCms critical directive information.protected String
parseJspCmsTag
(String content, CmsFlexController controller, Set<String> updatedFiles) Parses the JSP content for the special<%cms file="..." %>
tag.protected String
parseJspEncoding
(String content, String encoding, boolean isHardInclude) Parses the JSP content for the<%page pageEncoding="..." %>
tag and ensures that the JSP page encoding is set according to the OpenCms "content-encoding" property value of the JSP.protected String
parseJspIncludes
(String content, CmsFlexController controller, Set<String> updatedFiles) Parses the JSP content for includes and replaces all OpenCms VFS path information with information for the real FS.protected String
parseJspLinkMacros
(String content, CmsFlexController controller) Parses all jsp link macros, and replace them by the right target path.processTaglibAttributes
(String content) Deprecated.protected CmsResource
readJspResource
(CmsFlexController controller, String jspName) Returns the jsp resource identified by the given name, using the controllers cms context.void
removeFromCache
(Set<String> rootPaths, boolean online) Removes the given resources from the cache.void
removeOfflineJspFromRepository
(CmsResource resource) Removes a JSP from an offline project from the RFS.void
service
(CmsObject cms, CmsResource resource, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) Does the job of including the requested resource, this method is called directly if the element is called as a sub-element from another I_CmsResourceLoader.void
setFlexCache
(CmsFlexCache cache) Will be called after the resource manager was initialized.protected void
showSource
(CmsObject cms, CmsResource file, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) Delivers the plain uninterpreted resource with escaped XML.void
triggerPurge
(Runnable afterPurgeAction) Triggers an asynchronous purge of the JSP repository.protected String
updateJsp
(String vfsName, CmsFlexController controller, Set<String> updatedFiles) Updates a JSP page in the "real" file system in case the VFS resource has changed based on the resource name.updateJsp
(CmsResource resource, CmsFlexController controller, Set<String> updatedFiles) Updates a JSP page in the "real" file system in case the VFS resource has changed.void
updateJspFromRequest
(String servletPath, CmsFlexRequest request) Updates the internal jsp repository when the servlet container tries to compile a jsp file that may not exist.protected boolean
updateStrongLinks
(CmsResource resource, CmsFlexController controller, Set<String> updatedFiles) Updates all jsp files that include the given jsp file using the 'link.strong' macro.
-
Field Details
-
CACHE_PROPERTY_BYPASS
Property value for "cache" that indicates that the FlexCache should be bypassed.- See Also:
-
CACHE_PROPERTY_STREAM
Property value for "cache" that indicates that the output should be streamed.- See Also:
-
DEFAULT_JSP_FOLDER
Default jsp folder constant.- See Also:
-
DIRECTIVE_END
Special JSP directive tag start (%>
).- See Also:
-
DIRECTIVE_START
Special JSP directive tag start (<%(
).- See Also:
-
JSP_EXTENSION
Extension for JSP managed by OpenCms (.jsp
).- See Also:
-
PARAM_CLIENT_CACHE_MAXAGE
Cache max age parameter name.- See Also:
-
PARAM_JSP_CACHE_SIZE
Jsp cache size parameter name.- See Also:
-
PARAM_JSP_ERRORPAGE_COMMITTED
Error page committed parameter name.- See Also:
-
PARAM_JSP_FOLDER
Jsp folder parameter name.- See Also:
-
PARAM_JSP_REPOSITORY
Jsp repository parameter name.- See Also:
-
RESOURCE_LOADER_ID
The id of this loader.- See Also:
-
-
Constructor Details
-
CmsJspLoader
public CmsJspLoader()The constructor of the class is empty, the initial instance will be created by the resource manager upon startup of OpenCms.- See Also:
-
-
Method Details
-
isJasperCompilerException
This method tries to determine whether an exception is thrown by the JSP compiler.- Parameters:
exception
- the exception to check- Returns:
- true if this is likely a Jasper JSP compiler exception
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameter
in interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
-
cmsEvent
Description copied from interface:I_CmsEventListener
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.- Specified by:
cmsEvent
in interfaceI_CmsEventListener
- Parameters:
event
- CmsEvent that has occurred- See Also:
-
destroy
Destroy this ResourceLoder, this is a NOOP so far.- Specified by:
destroy
in interfaceI_CmsResourceLoader
-
dump
public byte[] dump(CmsObject cms, CmsResource file, String element, Locale locale, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException Description copied from interface:I_CmsResourceLoader
Dumps the processed content of the the requested file (and it's sub-elements) to a byte array.Dumping the content is like calling "load" where the result is not written to the response stream, but to the returned byte array. Dumping is different from an export because the export might actually require that the content is handled or modified in a special way, or set special http headers.
Moreover, if the page type is template based, calling "dump" will not trigger the template but directly deliver the contents from the selected element.
- Specified by:
dump
in interfaceI_CmsResourceLoader
- Parameters:
cms
- used to access the OpenCms VFSfile
- the requested resource in the VFSelement
- the element in the file to displaylocale
- the locale to displayreq
- the servlet requestres
- the servlet response- Returns:
- the content of the processed file
- Throws:
javax.servlet.ServletException
- might be thrown by the servlet environmentIOException
- might be thrown by the servlet environment- See Also:
-
export
public byte[] export(CmsObject cms, CmsResource resource, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException Description copied from interface:I_CmsResourceLoader
Static exports the contents of the requested file and it's sub-elements.During static export, the resource content may be written to 2 streams: The export stream, and the http response output stream. Which stream is actually used depends whether the export is in "on demand" or "after publish" mode. In "on demand" mode, the resource needs to be written both to the response stream and to the file stream. In "after publish" mode, it's usually only written to the file stream, but sometimes it's required to write to the response stream as well.
- Specified by:
export
in interfaceI_CmsResourceLoader
- Parameters:
cms
- the initialized CmsObject which provides user permissionsresource
- the requested OpenCms VFS resourcereq
- the servlet requestres
- the servlet response- Returns:
- the contents to export, or
null
if no export is required - Throws:
javax.servlet.ServletException
- might be thrown in the process of including the sub elementIOException
- might be thrown in the process of including the sub element- See Also:
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Returns:
- the parameters of this configurable class instance,
or
null
if the class does not need any parameters - See Also:
-
getJspRepository
Returns the absolute path in the "real" file system for the JSP repository toplevel directory.- Returns:
- The full path to the JSP repository
-
getLoaderId
Description copied from interface:I_CmsResourceLoader
Returns the id of the ResourceLoader.- Specified by:
getLoaderId
in interfaceI_CmsResourceLoader
- Returns:
- the id of the ResourceLoader
- See Also:
-
getReferencingStrongLinks
public void getReferencingStrongLinks(CmsObject cms, CmsResource resource, Set<String> referencingPaths) throws CmsException Returns a set of root paths of files that are including the given resource using the 'link.strong' macro.- Parameters:
cms
- the current cms contextresource
- the resource to checkreferencingPaths
- the set of already referencing paths, also return parameter- Throws:
CmsException
- if something goes wrong
-
getResourceLoaderInfo
Return a String describing the ResourceLoader, which is (localized to the system default locale)"The OpenCms default resource loader for JSP"
.- Specified by:
getResourceLoaderInfo
in interfaceI_CmsResourceLoader
- Returns:
- a describing String for the ResourceLoader
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Specified by:
initConfiguration
in interfaceI_CmsConfigurationParameterHandler
- See Also:
-
isStaticExportEnabled
Description copied from interface:I_CmsResourceLoader
Signals if the loader implementation supports static export of resources.- Specified by:
isStaticExportEnabled
in interfaceI_CmsResourceLoader
- Returns:
- true if static export is supported, false otherwise
- See Also:
-
isStaticExportProcessable
Description copied from interface:I_CmsResourceLoader
Signals if the loader implementation requires processing during static export of resources.- Specified by:
isStaticExportProcessable
in interfaceI_CmsResourceLoader
- Returns:
- true if static export processing is required, false otherwise
- See Also:
-
isUsableForTemplates
Description copied from interface:I_CmsResourceLoader
Signals if the loader implementation is usable for creating templates.- Specified by:
isUsableForTemplates
in interfaceI_CmsResourceLoader
- Returns:
- true if the loader implementation is usable for creating templates, false otherwise
- See Also:
-
isUsingUriWhenLoadingTemplate
Description copied from interface:I_CmsResourceLoader
Signals if a loader that supports templates must be invoked on the template URI or the resource URI.- Specified by:
isUsingUriWhenLoadingTemplate
in interfaceI_CmsResourceLoader
- Returns:
- true if the resource URI is to be used, false if the template URI is to be used
- See Also:
-
load
public void load(CmsObject cms, CmsResource file, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException, CmsException Description copied from interface:I_CmsResourceLoader
Basic top-page processing method for a I_CmsResourceLoader, this method is called if the page is called as a sub-element on a page not already loaded with a I_CmsResourceLoader.- Specified by:
load
in interfaceI_CmsResourceLoader
- Parameters:
cms
- the initialized CmsObject which provides user permissionsfile
- the requested OpenCms VFS resourcereq
- the servlet requestres
- the servlet response- Throws:
javax.servlet.ServletException
- might be thrown by the servlet environmentIOException
- might be thrown by the servlet environmentCmsException
- in case of errors accessing OpenCms functions- See Also:
-
processTaglibAttributes
Deprecated.Replaces taglib attributes in page directives with taglib directives.- Parameters:
content
- the JSP source text- Returns:
- the transformed JSP text
-
removeFromCache
Removes the given resources from the cache.- Parameters:
rootPaths
- the set of root paths to removeonline
- if online or offline
-
removeOfflineJspFromRepository
Removes a JSP from an offline project from the RFS.- Parameters:
resource
- the offline JSP resource to remove from the RFS- Throws:
CmsLoaderException
- if accessing the loader fails
-
service
public void service(CmsObject cms, CmsResource resource, javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.ServletException, IOException, CmsLoaderException Description copied from interface:I_CmsResourceLoader
Does the job of including the requested resource, this method is called directly if the element is called as a sub-element from another I_CmsResourceLoader.- Specified by:
service
in interfaceI_CmsResourceLoader
- Parameters:
cms
- used to access the OpenCms VFSresource
- the requested resource in the VFSreq
- the servlet requestres
- the servlet response- Throws:
javax.servlet.ServletException
- might be thrown by the servlet environmentIOException
- might be thrown by the servlet environmentCmsLoaderException
- See Also:
-
setFlexCache
Description copied from interface:I_CmsFlexCacheEnabledLoader
Will be called after the resource manager was initialized.- Specified by:
setFlexCache
in interfaceI_CmsFlexCacheEnabledLoader
- Parameters:
cache
- the (optional) flex cache instance to use- See Also:
-
triggerPurge
Triggers an asynchronous purge of the JSP repository.- Parameters:
afterPurgeAction
- the action to execute after purging
-
updateJsp
public String updateJsp(CmsResource resource, CmsFlexController controller, Set<String> updatedFiles) throws IOException, javax.servlet.ServletException, CmsLoaderException Updates a JSP page in the "real" file system in case the VFS resource has changed.Also processes the
<%@ cms %>
tags before the JSP is written to the real FS. Also recursively updates all files that are referenced by a<%@ cms %>
tag on this page to make sure the file actually exists in the real FS. All<%@ include %>
tags are parsed and the name in the tag is translated from the OpenCms VFS path to the path in the real FS. The same is done for filenames in<%@ page errorPage=... %>
tags.- Parameters:
resource
- the requested JSP file resource in the VFScontroller
- the controller for the JSP integrationupdatedFiles
- a Set containing all JSP pages that have been already updated- Returns:
- the file name of the updated JSP in the "real" FS
- Throws:
javax.servlet.ServletException
- might be thrown in the process of including the JSPIOException
- might be thrown in the process of including the JSPCmsLoaderException
- if the resource type can not be read
-
updateJspFromRequest
Updates the internal jsp repository when the servlet container tries to compile a jsp file that may not exist.- Parameters:
servletPath
- the servlet path, just to avoid unneeded recursive callsrequest
- the current request
-
dispatchJsp
protected byte[] dispatchJsp(CmsFlexController controller) throws javax.servlet.ServletException, IOException Dispatches the current request to the OpenCms internal JSP.- Parameters:
controller
- the current controller- Returns:
- the content of the processed JSP
- Throws:
javax.servlet.ServletException
- if inclusion does not workIOException
- if inclusion does not work
-
doPurge
Purges the JSP repository.<p<- Parameters:
afterPurgeAction
- the action to execute after purging
-
generateTaglibInclusions
Generates the taglib directives for a collection of taglib identifiers.- Parameters:
taglibs
- the taglib identifiers- Returns:
- a string containing taglib directives
-
getController
protected CmsFlexController getController(CmsObject cms, CmsResource resource, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, boolean streaming, boolean top) Delivers a Flex controller, either by creating a new one, or by re-using an existing one.- Parameters:
cms
- the initial CmsObject to wrap in the controllerresource
- the resource requestedreq
- the current requestres
- the current responsestreaming
- indicates if the response is streamingtop
- indicates if the response is the top response- Returns:
- a Flex controller
-
initCaches
Initializes the caches.- Parameters:
cacheSize
- the cache size
-
parseJsp
protected byte[] parseJsp(byte[] byteContent, String encoding, CmsFlexController controller, Set<String> updatedFiles, boolean isHardInclude) Parses the JSP and modifies OpenCms critical directive information.- Parameters:
byteContent
- the original JSP contentencoding
- the encoding to use for the JSPcontroller
- the controller for the JSP integrationupdatedFiles
- a Set containing all JSP pages that have been already updatedisHardInclude
- indicated if this page is actually a "hard" include with<%@ include file="..." >
- Returns:
- the modified JSP content
-
parseJspCmsTag
protected String parseJspCmsTag(String content, CmsFlexController controller, Set<String> updatedFiles) Parses the JSP content for the special<%cms file="..." %>
tag.- Parameters:
content
- the JSP content to parsecontroller
- the current JSP controllerupdatedFiles
- a set of already updated jsp files- Returns:
- the parsed JSP content
-
parseJspEncoding
Parses the JSP content for the<%page pageEncoding="..." %>
tag and ensures that the JSP page encoding is set according to the OpenCms "content-encoding" property value of the JSP.- Parameters:
content
- the JSP content to parseencoding
- the encoding to use for the JSPisHardInclude
- indicated if this page is actually a "hard" include with<%@ include file="..." >
- Returns:
- the parsed JSP content
-
parseJspIncludes
protected String parseJspIncludes(String content, CmsFlexController controller, Set<String> updatedFiles) Parses the JSP content for includes and replaces all OpenCms VFS path information with information for the real FS.- Parameters:
content
- the JSP content to parsecontroller
- the current JSP controllerupdatedFiles
- a set of already updated files- Returns:
- the parsed JSP content
-
parseJspLinkMacros
Parses all jsp link macros, and replace them by the right target path.- Parameters:
content
- the content to parsecontroller
- the request controller- Returns:
- the parsed content
-
readJspResource
protected CmsResource readJspResource(CmsFlexController controller, String jspName) throws CmsException Returns the jsp resource identified by the given name, using the controllers cms context.- Parameters:
controller
- the flex controllerjspName
- the name of the jsp- Returns:
- an OpenCms resource
- Throws:
CmsException
- if something goes wrong
-
showSource
protected void showSource(CmsObject cms, CmsResource file, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws CmsException, IOException Delivers the plain uninterpreted resource with escaped XML.This is intended for viewing historical versions.
- Parameters:
cms
- the initialized CmsObject which provides user permissionsfile
- the requested OpenCms VFS resourcereq
- the servlet requestres
- the servlet response- Throws:
IOException
- might be thrown by the servlet environmentCmsException
- in case of errors accessing OpenCms functions
-
updateJsp
Updates a JSP page in the "real" file system in case the VFS resource has changed based on the resource name.Generates a resource based on the provided name and calls
updateJsp(CmsResource, CmsFlexController, Set)
.- Parameters:
vfsName
- the name of the JSP file resource in the VFScontroller
- the controller for the JSP integrationupdatedFiles
- a Set containing all JSP pages that have been already updated- Returns:
- the file name of the updated JSP in the "real" FS
-
updateStrongLinks
protected boolean updateStrongLinks(CmsResource resource, CmsFlexController controller, Set<String> updatedFiles) throws CmsLoaderException, IOException, javax.servlet.ServletException Updates all jsp files that include the given jsp file using the 'link.strong' macro.- Parameters:
resource
- the current updated jsp filecontroller
- the controller for the jsp integrationupdatedFiles
- the already updated files- Returns:
true
if the given JSP file should be updated due to dirty included files- Throws:
javax.servlet.ServletException
- might be thrown in the process of including the JSPIOException
- might be thrown in the process of including the JSPCmsLoaderException
- if the resource type can not be read
-