JSTL Transaction With A JSP

 
 
This JSP source code is about JSTL: transaction with a JSP
 
 
  1. <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

  2. <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>

  3. <html>

  4. <HEAD>

  5.       <TITLE>Using a Transaction with a JSP</TITLE>

  6.      </HEAD>

  7. <body bgcolor="white">

  8.           <h2>View table Data</h2>

  9.  

  10. <sql:transaction> 

  11.    

  12.   <sql:update>

  13.   insert into atable values(2,'Joe','Id','Feb-24-1996','F')

  14.   </sql:update>

  15.  

  16.     <sql:query var="resultObj">

  17.     select * from atable

  18.     </sql:query>

  19.  

  20. </sql:transaction> 

  21. <table>

  22. <c:forEach items="${resultObj.rows}" var="row">

  23.   <c:forEach items="${row}" var="column">

  24.     <tr>

  25.    <td align="right">

  26.      <b><c:out value="${column.key}" /></b>

  27.      </td>

  28.      <td>

  29.        <c:out value="${column.value}" />

  30.      </td></tr>

  31.      </c:forEach>

  32.        </c:forEach>

  33.      </table>

  34. </body>

  35. </html>
 
Copy to Clipboard      Download code as Text Format
 
  Date entered : 23rd Jan 2007
  Rating : No Rating
  Accessed  :  991
  Submitted by :  javabill
 
   Add Comment  Printer friendly
   View All Comments  Email to a friend
   Add to my Favourites Download PDF version
   Rating  
 
                 Click each image to add
this page to each site.
 
 
 
Comments Available

    No comment available at the moment.Be the first one to make a comment

 
Related JSP Source Codes
  • Writing Log Records to Standard Error
  • Serializing an Immutable Bean Property to XML
  • Preventing a Bean Property from Being Serialized to XML
  • Deserializing a Bean from XML
  • Serializing a Bean to XML

  • Copyright © 2013 VisualBuilder. All rights reserved