You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by ho...@apache.org on 2002/01/16 23:43:51 UTC

cvs commit: jakarta-taglibs/standard/examples/web/sql index.jsp Update.jsp Transaction.jsp QueryParam.jsp QueryIterate.jsp QueryDirect.jsp

horwat      02/01/16 14:43:51

  Modified:    standard/examples/web/sql index.jsp Update.jsp
                        Transaction.jsp QueryParam.jsp QueryIterate.jsp
                        QueryDirect.jsp
  Log:
  Simplify table creation to support the majority of databases. Clarify documentation.
  
  Revision  Changes    Path
  1.6       +11 -4     jakarta-taglibs/standard/examples/web/sql/index.jsp
  
  Index: index.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/index.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.jsp	11 Jan 2002 19:49:28 -0000	1.5
  +++ index.jsp	16 Jan 2002 22:43:51 -0000	1.6
  @@ -28,10 +28,14 @@
   </table>
   <!-- #BeginEditable "body" --> 
   <h1>SQL Tags Examples</h1>
  -<p>Enter your Driver Name and DataBase URL name to test Database Tag Library. 
  -  NOTE: You can access the tags directly at the bottom of the page to look at 
  -  the source, but they will NOT run properly without the correct database driver 
  -  and url.</p>
  +<p>These examples create their own table for demonstration purposes.  Every database supports table creation in a slightly different way. For instance, different databases have different types and constraints. The simplest possible table was chosen, however it may still not be supported by your particular database. Check your database documentation or administrator if you have problems creating the table and modify the examples acordingly. Here is the table used in the examples:</p>
  +<pre><code>
  +    create table mytable (
  +      nameid int primary key,
  +      name varchar(80)
  +    )
  +</code></pre>
  +<p>Enter your Driver Name and DataBase URL to test the Database Tag Library. NOTE: You will need to have the DataBase Driver classes available in your server's CLASSPATH at startup.</p>
   <form name="myform" action="session.jsp" method="get" >
     <table width="90%" border="0" cellspacing="0" cellpadding="0">
       <tr> 
  @@ -51,6 +55,9 @@
       <input type="submit" name="Submit" value="Submit">
     </p>
   </form>
  +<hr>
  +<p>NOTE: You can access the tags directly here to look at the source. If you do not provide a valid Driver and URL using the above form the tags NOT run properly.</p>
  +<%@ include file="links.html" %>
   <!-- #EndEditable --> 
   <hr noshade color="#000099">
   <table width="100%" border="0" cellpadding="5">
  
  
  
  1.4       +2 -3      jakarta-taglibs/standard/examples/web/sql/Update.jsp
  
  Index: Update.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/Update.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Update.jsp	16 Jan 2002 02:22:20 -0000	1.3
  +++ Update.jsp	16 Jan 2002 22:43:51 -0000	1.4
  @@ -24,9 +24,8 @@
   
     <sql:update var="newTable" dataSource="$example">
       create table mytable (
  -      nameid int not null,
  -      name varchar(80) null,
  -      constraint pk_mytable primary key (nameid)
  +      nameid int primary key,
  +      name varchar(80)
       )
     </sql:update>
   
  
  
  
  1.3       +2 -3      jakarta-taglibs/standard/examples/web/sql/Transaction.jsp
  
  Index: Transaction.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/Transaction.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Transaction.jsp	16 Jan 2002 02:22:20 -0000	1.2
  +++ Transaction.jsp	16 Jan 2002 22:43:51 -0000	1.3
  @@ -24,9 +24,8 @@
   <sql:transaction dataSource="$example">
     <sql:update var="newTable" dataSource="$example">
       create table mytable (
  -      nameid int not null,
  -      name varchar(80) null,
  -      constraint pk_mytable primary key (nameid)
  +      nameid int primary key,
  +      name varchar(80)
       )
     </sql:update>
   </sql:transaction>
  
  
  
  1.4       +2 -3      jakarta-taglibs/standard/examples/web/sql/QueryParam.jsp
  
  Index: QueryParam.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryParam.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueryParam.jsp	16 Jan 2002 02:22:20 -0000	1.3
  +++ QueryParam.jsp	16 Jan 2002 22:43:51 -0000	1.4
  @@ -26,9 +26,8 @@
   
     <sql:update var="newTable" dataSource="$example">
       create table mytable (
  -      nameid int not null,
  -      name varchar(80) null,
  -      constraint pk_mytable primary key (nameid)
  +      nameid int primary key,
  +      name varchar(80)
       )
     </sql:update>
   
  
  
  
  1.4       +2 -3      jakarta-taglibs/standard/examples/web/sql/QueryIterate.jsp
  
  Index: QueryIterate.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryIterate.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueryIterate.jsp	16 Jan 2002 02:22:20 -0000	1.3
  +++ QueryIterate.jsp	16 Jan 2002 22:43:51 -0000	1.4
  @@ -22,9 +22,8 @@
   
     <sql:update var="newTable" dataSource="$example">
       create table mytable (
  -      nameid int not null,
  -      name varchar(80) null,
  -      constraint pk_mytable primary key (nameid)
  +      nameid int primary key,
  +      name varchar(80)
       )
     </sql:update>
   
  
  
  
  1.4       +2 -3      jakarta-taglibs/standard/examples/web/sql/QueryDirect.jsp
  
  Index: QueryDirect.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryDirect.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueryDirect.jsp	16 Jan 2002 02:22:20 -0000	1.3
  +++ QueryDirect.jsp	16 Jan 2002 22:43:51 -0000	1.4
  @@ -23,9 +23,8 @@
   
     <sql:update var="newTable" dataSource="$example">
       create table mytable (
  -      nameid int not null,
  -      name varchar(80) null,
  -      constraint pk_mytable primary key (nameid)
  +      nameid int primary key,
  +      name varchar(80)
       )
     </sql:update>
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>