Class PageInfo
java.lang.Object
org.apache.jasper.compiler.PageInfo
A repository for various info about the translation unit under compilation.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependant(String d, Long lastModified) Adds a dependent file to this page.voidAdds a single import to this page.voidaddImports(List<String> imports) Adds multiple imports to this page.voidAdds the given prefix to the set of prefixes of this translation unit.voidaddPrefixMapping(String prefix, String uri) Maps the given prefix to the given URI.voidaddTaglib(String uri, TagLibraryInfo info) Maps the given URI to the given tag library.booleancontainsPrefix(String prefix) Checks to see if this translation unit contains the given prefix.Returns the autoFlush attribute value.Returns the bean repository for this page.intReturns the buffer size in bytes.Returns the buffer value.Returns the content type.Returns the deferredSyntaxAllowedAsLiteral attribute value.Returns the map of dependent files.Returns the DOCTYPE name.Returns the DOCTYPE public identifier.Returns the DOCTYPE system identifier.Returns the errorOnELNotFound attribute value.Returns the error page URL.Returns the expression factory.Gets the value of the 'extends' page directive attribute.getExtends(boolean useDefault) Gets the value of the 'extends' page directive attribute.Returns the list of imports for this page.Returns the collection of include coda files.Returns the collection of include prelude files.getInfo()Returns the page info string.Returns the isELIgnored attribute value.Returns the isErrorPage attribute value.Returns the JSP file path.getLanguage(boolean useDefault) Returns the language attribute value.getNonCustomTagPrefix(String prefix) Gets the mark for a non-custom tag prefix.Returns the omit XML declaration setting.Returns the session attribute value.Gets the tag library corresponding to the given URI.Gets the collection of tag libraries that are associated with a URI.Returns the trimDirectiveWhitespaces attribute value.Returns the URI to which the given prefix maps.Returns the set of variable info names.booleanChecks if this page has a JSP root.booleanChecks to see if the given URI is mapped to a tag library.booleanChecks if autoFlush is enabled.booleanChecks if deferred syntax is allowed as literal.booleanChecks if EL is ignored.booleanChecks if error on EL not found is enabled.booleanChecks if error on undeclared namespace is enabled.booleanChecks if this page is an error page.booleanChecks if the JSP prefix has been hijacked.booleanCheck if the plugin ID has been previously declared.booleanChecks if scripting is invalid for this page.booleanChecks if this page is scriptless.booleanChecks if session is enabled.booleanChecks if this is a tag file.booleanChecks if directive whitespaces are trimmed.voidpopPrefixMapping(String prefix) Removes the URI at the top of the stack of URIs to which the given prefix is mapped.voidpushPrefixMapping(String prefix, String uri) Pushes the given URI onto the stack of URIs to which the given prefix is mapped.voidputNonCustomTagPrefix(String prefix, Mark where) Puts a non-custom tag prefix in the map.voidsetAutoFlush(String value, Node n, ErrorDispatcher err) Sets the autoFlush attribute.voidsetBufferValue(String value, Node n, ErrorDispatcher err) Sets the buffer value.voidsetContentType(String value) Sets the content type.voidsetDeferredSyntaxAllowedAsLiteral(boolean isELDeferred) Sets whether deferred syntax is allowed as literal.voidsetDeferredSyntaxAllowedAsLiteral(String value, Node n, ErrorDispatcher err, boolean pagedir) Sets the deferredSyntaxAllowedAsLiteral attribute.voidsetDoctypeName(String doctypeName) Sets the DOCTYPE name.voidsetDoctypePublic(String doctypePublic) Sets the DOCTYPE public identifier.voidsetDoctypeSystem(String doctypeSystem) Sets the DOCTYPE system identifier.voidsetELIgnored(boolean s) Sets the EL ignored flag.voidsetErrorOnELNotFound(boolean s) Sets the error on EL not found flag.voidsetErrorOnELNotFound(String value, Node n, ErrorDispatcher err, boolean pagedir) Sets the errorOnELNotFound attribute.voidsetErrorOnUndeclaredNamespace(boolean errorOnUndeclaredNamespace) Sets whether error on undeclared namespace is enabled.voidsetErrorPage(String value) Sets the error page URL.voidsetExtends(String value) Sets the extends attribute value.voidsetHasJspRoot(boolean s) Sets whether this page has a JSP root.voidsetIncludeCoda(Collection<String> coda) Sets the collection of include coda files.voidsetIncludePrelude(Collection<String> prelude) Sets the collection of include prelude files.voidSets the page info string.voidsetIsELIgnored(String value, Node n, ErrorDispatcher err, boolean pagedir) Sets the isELIgnored attribute.voidsetIsErrorPage(String value, Node n, ErrorDispatcher err) Sets the isErrorPage attribute.voidsetIsJspPrefixHijacked(boolean isHijacked) Sets whether the JSP prefix has been hijacked.voidsetLanguage(String value, Node n, ErrorDispatcher err, boolean pagedir) Sets the language attribute.voidsetOmitXmlDecl(String omit) Sets the omit XML declaration setting.voidsetScriptingInvalid(boolean s) Sets whether scripting is invalid for this page.voidsetScriptless(boolean s) Sets whether this page is scriptless.voidsetSession(String value, Node n, ErrorDispatcher err) Sets the session attribute.voidsetTrimDirectiveWhitespaces(boolean trimDirectiveWhitespaces) Sets whether directive whitespaces are trimmed.voidsetTrimDirectiveWhitespaces(String value, Node n, ErrorDispatcher err, boolean pagedir) Sets the trimDirectiveWhitespaces attribute.
-
Method Details
-
isTagFile
public boolean isTagFile()Checks if this is a tag file.- Returns:
- true if this is a tag file
-
isPluginDeclared
Check if the plugin ID has been previously declared. Make a note that this Id is now declared.- Parameters:
id- The plugin ID to check- Returns:
- true if Id has been declared.
-
addImports
-
addImport
Adds a single import to this page.- Parameters:
imp- The import to add
-
getImports
-
getJspFile
-
addDependant
-
getDependants
-
getBeanRepository
Returns the bean repository for this page.- Returns:
- The bean repository
-
setScriptless
public void setScriptless(boolean s) Sets whether this page is scriptless.- Parameters:
s- true if the page is scriptless
-
isScriptless
public boolean isScriptless()Checks if this page is scriptless.- Returns:
- true if the page is scriptless
-
setScriptingInvalid
public void setScriptingInvalid(boolean s) Sets whether scripting is invalid for this page.- Parameters:
s- true if scripting is invalid
-
isScriptingInvalid
public boolean isScriptingInvalid()Checks if scripting is invalid for this page.- Returns:
- true if scripting is invalid
-
getIncludePrelude
Returns the collection of include prelude files.- Returns:
- The include prelude files
-
setIncludePrelude
Sets the collection of include prelude files.- Parameters:
prelude- The include prelude files
-
getIncludeCoda
Returns the collection of include coda files.- Returns:
- The include coda files
-
setIncludeCoda
Sets the collection of include coda files.- Parameters:
coda- The include coda files
-
setHasJspRoot
public void setHasJspRoot(boolean s) Sets whether this page has a JSP root.- Parameters:
s- true if the page has a JSP root
-
hasJspRoot
public boolean hasJspRoot()Checks if this page has a JSP root.- Returns:
- true if the page has a JSP root
-
getOmitXmlDecl
Returns the omit XML declaration setting.- Returns:
- The omit XML declaration value
-
setOmitXmlDecl
Sets the omit XML declaration setting.- Parameters:
omit- The omit XML declaration value
-
getDoctypeName
-
setDoctypeName
Sets the DOCTYPE name.- Parameters:
doctypeName- The DOCTYPE name
-
getDoctypeSystem
Returns the DOCTYPE system identifier.- Returns:
- The DOCTYPE system identifier
-
setDoctypeSystem
Sets the DOCTYPE system identifier.- Parameters:
doctypeSystem- The DOCTYPE system identifier
-
getDoctypePublic
Returns the DOCTYPE public identifier.- Returns:
- The DOCTYPE public identifier
-
setDoctypePublic
Sets the DOCTYPE public identifier.- Parameters:
doctypePublic- The DOCTYPE public identifier
-
setIsJspPrefixHijacked
public void setIsJspPrefixHijacked(boolean isHijacked) Sets whether the JSP prefix has been hijacked.- Parameters:
isHijacked- true if the JSP prefix has been hijacked
-
isJspPrefixHijacked
public boolean isJspPrefixHijacked()Checks if the JSP prefix has been hijacked.- Returns:
- true if the JSP prefix has been hijacked
-
addPrefix
Adds the given prefix to the set of prefixes of this translation unit.- Parameters:
prefix- The prefix to add
-
containsPrefix
Checks to see if this translation unit contains the given prefix.- Parameters:
prefix- The prefix to check- Returns:
- true if this translation unit contains the given prefix
-
addTaglib
Maps the given URI to the given tag library.- Parameters:
uri- The URI to mapinfo- The tag library to be associated with the given URI
-
getTaglib
Gets the tag library corresponding to the given URI.- Parameters:
uri- The URI to look up- Returns:
- Tag library corresponding to the given URI
-
getTaglibs
Gets the collection of tag libraries that are associated with a URI.- Returns:
- Collection of tag libraries
-
hasTaglib
Checks to see if the given URI is mapped to a tag library.- Parameters:
uri- The URI to check- Returns:
- true if the given URI is mapped to a tag library
-
addPrefixMapping
-
pushPrefixMapping
-
popPrefixMapping
Removes the URI at the top of the stack of URIs to which the given prefix is mapped.- Parameters:
prefix- The prefix whose stack of URIs is to be popped
-
getURI
-
setLanguage
public void setLanguage(String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperException Sets the language attribute.- Parameters:
value- The language valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the language is not Java
-
getLanguage
Returns the language attribute value.- Parameters:
useDefault- Whether to use the default if not set- Returns:
- The language value
-
setExtends
Sets the extends attribute value.- Parameters:
value- The extends value
-
getExtends
Gets the value of the 'extends' page directive attribute.- Parameters:
useDefault- TRUE if the default (org.apache.jasper.runtime.HttpJspBase) should be returned if this attribute has not been set, FALSE otherwise- Returns:
- The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set and useDefault is TRUE
-
getExtends
Gets the value of the 'extends' page directive attribute.- Returns:
- The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set
-
setContentType
Sets the content type.- Parameters:
value- The content type value
-
getContentType
-
setBufferValue
Sets the buffer value.- Parameters:
value- The buffer valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the buffer value is invalid
-
getBufferValue
-
getBuffer
public int getBuffer()Returns the buffer size in bytes.- Returns:
- The buffer size
-
setSession
Sets the session attribute.- Parameters:
value- The session valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the session value is invalid
-
getSession
-
isSession
public boolean isSession()Checks if session is enabled.- Returns:
- true if session is enabled
-
setAutoFlush
Sets the autoFlush attribute.- Parameters:
value- The autoFlush valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the autoFlush value is invalid
-
getAutoFlush
-
isAutoFlush
public boolean isAutoFlush()Checks if autoFlush is enabled.- Returns:
- true if autoFlush is enabled
-
setInfo
-
getInfo
-
setErrorPage
Sets the error page URL.- Parameters:
value- The error page URL
-
getErrorPage
-
setIsErrorPage
Sets the isErrorPage attribute.- Parameters:
value- The isErrorPage valuen- The nodeerr- The error dispatcher- Throws:
JasperException- if the value is invalid
-
getIsErrorPage
Returns the isErrorPage attribute value.- Returns:
- The isErrorPage value
-
isErrorPage
public boolean isErrorPage()Checks if this page is an error page.- Returns:
- true if this is an error page
-
setIsELIgnored
public void setIsELIgnored(String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperException Sets the isELIgnored attribute.- Parameters:
value- The isELIgnored valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setErrorOnELNotFound
public void setErrorOnELNotFound(String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperException Sets the errorOnELNotFound attribute.- Parameters:
value- The errorOnELNotFound valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setDeferredSyntaxAllowedAsLiteral
public void setDeferredSyntaxAllowedAsLiteral(String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperException Sets the deferredSyntaxAllowedAsLiteral attribute.- Parameters:
value- The deferredSyntaxAllowedAsLiteral valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setTrimDirectiveWhitespaces
public void setTrimDirectiveWhitespaces(String value, Node n, ErrorDispatcher err, boolean pagedir) throws JasperException Sets the trimDirectiveWhitespaces attribute.- Parameters:
value- The trimDirectiveWhitespaces valuen- The nodeerr- The error dispatcherpagedir- Whether this is a page directive- Throws:
JasperException- if the value is invalid
-
setELIgnored
public void setELIgnored(boolean s) Sets the EL ignored flag.- Parameters:
s- The EL ignored flag
-
getIsELIgnored
Returns the isELIgnored attribute value.- Returns:
- The isELIgnored value
-
isELIgnored
public boolean isELIgnored()Checks if EL is ignored.- Returns:
- true if EL is ignored
-
setErrorOnELNotFound
public void setErrorOnELNotFound(boolean s) Sets the error on EL not found flag.- Parameters:
s- The error on EL not found flag
-
getErrorOnELNotFound
Returns the errorOnELNotFound attribute value.- Returns:
- The errorOnELNotFound value
-
isErrorOnELNotFound
public boolean isErrorOnELNotFound()Checks if error on EL not found is enabled.- Returns:
- true if error on EL not found is enabled
-
putNonCustomTagPrefix
-
getNonCustomTagPrefix
-
getDeferredSyntaxAllowedAsLiteral
Returns the deferredSyntaxAllowedAsLiteral attribute value.- Returns:
- The deferredSyntaxAllowedAsLiteral value
-
isDeferredSyntaxAllowedAsLiteral
public boolean isDeferredSyntaxAllowedAsLiteral()Checks if deferred syntax is allowed as literal.- Returns:
- true if deferred syntax is allowed as literal
-
setDeferredSyntaxAllowedAsLiteral
public void setDeferredSyntaxAllowedAsLiteral(boolean isELDeferred) Sets whether deferred syntax is allowed as literal.- Parameters:
isELDeferred- true if deferred syntax is allowed
-
getExpressionFactory
Returns the expression factory.- Returns:
- The expression factory
-
getTrimDirectiveWhitespaces
Returns the trimDirectiveWhitespaces attribute value.- Returns:
- The trimDirectiveWhitespaces value
-
isTrimDirectiveWhitespaces
public boolean isTrimDirectiveWhitespaces()Checks if directive whitespaces are trimmed.- Returns:
- true if directive whitespaces are trimmed
-
setTrimDirectiveWhitespaces
public void setTrimDirectiveWhitespaces(boolean trimDirectiveWhitespaces) Sets whether directive whitespaces are trimmed.- Parameters:
trimDirectiveWhitespaces- true if directive whitespaces are trimmed
-
getVarInfoNames
-
isErrorOnUndeclaredNamespace
public boolean isErrorOnUndeclaredNamespace()Checks if error on undeclared namespace is enabled.- Returns:
- true if error on undeclared namespace is enabled
-
setErrorOnUndeclaredNamespace
public void setErrorOnUndeclaredNamespace(boolean errorOnUndeclaredNamespace) Sets whether error on undeclared namespace is enabled.- Parameters:
errorOnUndeclaredNamespace- true if error on undeclared namespace is enabled
-