Class UpdateTagSupport

    • Constructor Detail

      • UpdateTagSupport

        public UpdateTagSupport()
    • Method Detail

      • setVar

        public void setVar​(java.lang.String var)
        Setter method for the name of the variable to hold the result.
      • setScope

        public void setScope​(java.lang.String scopeName)
        Setter method for the scope of the variable to hold the result.
      • doEndTag

        public int doEndTag()
                     throws JspException

        Execute the SQL statement, set either through the sql attribute or as the body, and save the result as a variable named by the var attribute in the scope specified by the scope attribute, as an object that implements the Result interface.

        The connection used to execute the statement comes either from the DataSource specified by the dataSource attribute, provided by a parent action element, or is retrieved from a JSP scope attribute named javax.servlet.jsp.jstl.sql.dataSource.

        Specified by:
        doEndTag in interface Tag
        doEndTag in class BodyTagSupport
        JspException - if an error occurred while processing this tag
        See Also:
      • doCatch

        public void doCatch​(java.lang.Throwable t)
                     throws java.lang.Throwable
        Just rethrows the Throwable.
        Specified by:
        doCatch in interface TryCatchFinally
        t - The throwable exception navigating through this tag.
        java.lang.Throwable - if the exception is to be rethrown further up the nest chain.
      • doFinally

        public void doFinally()
        Close the Connection, unless this action is used as part of a transaction.
        Specified by:
        doFinally in interface TryCatchFinally
      • addSQLParameter

        public void addSQLParameter​(java.lang.Object o)
        Called by nested parameter elements to add PreparedStatement parameter values.
        Specified by:
        addSQLParameter in interface SQLExecutionTag
        o - the PreparedStatement parameter value