Node.Root (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.jasper.compiler, class: Node, class: Root

# Class Node.Root

java.lang.Object
org.apache.jasper.compiler.Node
org.apache.jasper.compiler.Node.Root

All Implemented Interfaces:
  `TagConstants`

Enclosing class:
  `Node`

public static class Node.Root extends Node
Represents the root of a Jsp page or Jsp document

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Node

  `Node.AttributeDirective, Node.AttributeGenerator, Node.ChildInfo, Node.ChildInfoBase, Node.Comment, Node.CustomTag, Node.Declaration, Node.DoBodyAction, Node.ELExpression, Node.Expression, Node.ForwardAction, Node.GetProperty, Node.IncludeAction, Node.IncludeDirective, Node.InvokeAction, Node.JspAttribute, Node.JspBody, Node.JspElement, Node.JspOutput, Node.JspRoot, Node.JspText, Node.NamedAttribute, Node.Nodes, Node.PageDirective, Node.ParamAction, Node.Root, Node.ScriptingElement, Node.Scriptlet, Node.SetProperty, Node.TagDirective, Node.TaglibDirective, Node.TemplateText, Node.UninterpretedTag, Node.UseBean, Node.VariableDirective, Node.Visitor`

- ## Field Summary

  ### Fields inherited from class Node

  `attrs, beginJavaLine, body, endJavaLine, innerClassName, localName, namedAttributeNodes, nonTaglibXmlnsAttrs, parent, qName, startMark, taglibAttrs, text`

  ### Fields inherited from interface TagConstants

  `ATTRIBUTE_ACTION, ATTRIBUTE_DIRECTIVE_ACTION, BODY_ACTION, DECLARATION_ACTION, DIRECTIVE_ACTION, DOBODY_ACTION, ELEMENT_ACTION, EXPRESSION_ACTION, FORWARD_ACTION, GET_PROPERTY_ACTION, INCLUDE_ACTION, INCLUDE_DIRECTIVE_ACTION, INVOKE_ACTION, JSP_ATTRIBUTE_ACTION, JSP_ATTRIBUTE_DIRECTIVE_ACTION, JSP_BODY_ACTION, JSP_DECLARATION_ACTION, JSP_DOBODY_ACTION, JSP_ELEMENT_ACTION, JSP_EXPRESSION_ACTION, JSP_FORWARD_ACTION, JSP_GET_PROPERTY_ACTION, JSP_INCLUDE_ACTION, JSP_INCLUDE_DIRECTIVE_ACTION, JSP_INVOKE_ACTION, JSP_OUTPUT_ACTION, JSP_PAGE_DIRECTIVE_ACTION, JSP_PARAM_ACTION, JSP_ROOT_ACTION, JSP_SCRIPTLET_ACTION, JSP_SET_PROPERTY_ACTION, JSP_TAG_DIRECTIVE_ACTION, JSP_TAGLIB_DIRECTIVE_ACTION, JSP_TEXT_ACTION, JSP_TEXT_ACTION_END, JSP_URI, JSP_USE_BEAN_ACTION, JSP_VARIABLE_DIRECTIVE_ACTION, OUTPUT_ACTION, PAGE_DIRECTIVE_ACTION, PARAM_ACTION, ROOT_ACTION, SCRIPTLET_ACTION, SET_PROPERTY_ACTION, TAG_DIRECTIVE_ACTION, TAGLIB_DIRECTIVE_ACTION, TEXT_ACTION, URN_JSPTAGDIR, URN_JSPTLD, USE_BEAN_ACTION, VARIABLE_DIRECTIVE_ACTION`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `accept(Node.Visitor v)`
  `String`
  `getJspConfigPageEncoding()`
  Gets the encoding specified in the JSP config element whose URL pattern matches the page containing this Root.
  `String`
  `getPageEncoding()`
  Returns the encoding of the page.
  `boolean`
  `isBomPresent()`
  Returns whether a BOM (Byte Order Mark) is present.
  `boolean`
  `isDefaultPageEncoding()`
  Returns whether the page encoding is the default encoding.
  `boolean`
  `isEncodingSpecifiedInProlog()`
  Returns whether the encoding is specified in the prolog.
  `boolean`
  `isXmlSyntax()`
  Returns whether this JSP page uses XML syntax.
  `String`
  `nextTemporaryVariableName()`
  Generates a new temporary variable name.
  `void`
  `setIsBomPresent(boolean isBom)`
  Sets whether a BOM (Byte Order Mark) is present.
  `void`
  `setIsDefaultPageEncoding(boolean isDefault)`
  Sets whether the page encoding is the default encoding.
  `void`
  `setIsEncodingSpecifiedInProlog(boolean isSpecified)`
  Sets whether the encoding is specified in the prolog.
  `void`
  `setJspConfigPageEncoding(String enc)`
  Sets the encoding specified in the JSP config element whose URL pattern matches the page containing this Root.
  `void`
  `setPageEncoding(String enc)`
  Sets the encoding of the page.

  ### Methods inherited from class Node

  `getAttributes, getAttributeValue, getBeginJavaLine, getBody, getEndJavaLine, getInnerClassName, getLocalName, getNamedAttributeNode, getNamedAttributeNodes, getNonTaglibXmlnsAttributes, getParent, getQName, getRoot, getStart, getTaglibAttributes, getText, getTextAttribute, setAttributes, setBeginJavaLine, setBody, setEndJavaLine, setInnerClassName`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### accept

    public void accept(Node.Visitor v) throws JasperException
    Throws:
      `JasperException`

  - ### isXmlSyntax

    public boolean isXmlSyntax()
    Returns whether this JSP page uses XML syntax.
    Returns:
      true if XML syntax is used

  - ### setJspConfigPageEncoding

    public void setJspConfigPageEncoding(String enc)
    Sets the encoding specified in the JSP config element whose URL pattern matches the page containing this Root.
    Parameters:
      `enc` - The page encoding from the JSP config

  - ### getJspConfigPageEncoding

    public String getJspConfigPageEncoding()
    Gets the encoding specified in the JSP config element whose URL pattern matches the page containing this Root.
    Returns:
      The page encoding from the JSP config

  - ### setPageEncoding

    public void setPageEncoding(String enc)
    Sets the encoding of the page.
    Parameters:
      `enc` - The page encoding

  - ### getPageEncoding

    public String getPageEncoding()
    Returns the encoding of the page.
    Returns:
      The page encoding

  - ### setIsDefaultPageEncoding

    public void setIsDefaultPageEncoding(boolean isDefault)
    Sets whether the page encoding is the default encoding.
    Parameters:
      `isDefault` - true if the page encoding is the default

  - ### isDefaultPageEncoding

    public boolean isDefaultPageEncoding()
    Returns whether the page encoding is the default encoding.
    Returns:
      true if the page encoding is the default

  - ### setIsEncodingSpecifiedInProlog

    public void setIsEncodingSpecifiedInProlog(boolean isSpecified)
    Sets whether the encoding is specified in the prolog.
    Parameters:
      `isSpecified` - true if the encoding is specified in the prolog

  - ### isEncodingSpecifiedInProlog

    public boolean isEncodingSpecifiedInProlog()
    Returns whether the encoding is specified in the prolog.
    Returns:
      true if the encoding is specified in the prolog

  - ### setIsBomPresent

    public void setIsBomPresent(boolean isBom)
    Sets whether a BOM (Byte Order Mark) is present.
    Parameters:
      `isBom` - true if a BOM is present

  - ### isBomPresent

    public boolean isBomPresent()
    Returns whether a BOM (Byte Order Mark) is present.
    Returns:
      true if a BOM is present

  - ### nextTemporaryVariableName

    public String nextTemporaryVariableName()
    Generates a new temporary variable name.
    Returns:
      The name to use for the temporary variable