jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlu...@apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/scripting/scriptlet positiveScriptlet.jsp
Date Mon, 28 Jan 2002 23:59:17 GMT
rlubke      02/01/28 15:59:16

  Modified:    src/server/jsp-tests/jsp/core_syntax/scripting/scriptlet
                        positiveScriptlet.jsp
  Log:
   - content push from CTS
  
  Revision  Changes    Path
  1.3       +46 -11    jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/scripting/scriptlet/positiveScriptlet.jsp
  
  Index: positiveScriptlet.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/scripting/scriptlet/positiveScriptlet.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- positiveScriptlet.jsp	18 Dec 2001 14:26:57 -0000	1.2
  +++ positiveScriptlet.jsp	28 Jan 2002 23:59:16 -0000	1.3
  @@ -1,16 +1,51 @@
   <html>
  -<title>positiveScriptlet </title>
  +<title>positiveScriptlet</title>
   <body>
   <%  /**  Name:positiveScriptlet
  -         Description:Create a valid scriplet in the
  -              JSP page.Declare a variable and increment it.          
  -         Result: The page contents with the incremented
  -                 value of the variable
  -**/ %>                
  -<!--variable i=5 is incremented -->
  -<%! int i=5; %>
  -<% i++; %>
  -<% out.println(i); %>
  -<% i--; %>
  +         Description: Test a series of scriplets.
  +         Result: Output of all the scriplets in the order
  +                 they appear.
  +**/ %>
  +
  +<!-- Java-style comments -->
  +<%
  +// simple java comments
  +/* multiline java comments
  +*/
  +%>
  +
  +<!-- Multiline scriptlet -->
  +<%  int i=5;
  +    int j=10;
  +    if(j>i){
  +    %> 10 <% }
  +    else {
  +    %> 5 <% } %>
  +
  +<!-- Another version of a Multiline scriplet -->
  +<%! int k=5; %>
  +<%! int l=10; %>
  +<% if(l>k){ %>10 <%} else { %>
  +5 <% } %>
  +
  +<!-- A scriptlet accessing a bean -->
  +<jsp:useBean id="counter" scope="request" class="core_syntax.scripting.scriptlet.Counter"
/>
  +<%
  +    counter.setCounter(10);
  +    out.println(counter.getCounterValue());
  +%>
  +
  +<!-- A scriplet with try/throws/finally blocks -->
  +<%
  +    int q = 0;
  +    try {
  +        q = ( 9 / 0 );
  +    } catch ( ArithmeticException ae ) {
  +        out.println( "ArithmeticException caught!" );
  +    } finally {
  +        q = 0;
  +    }
  +%>
  +
   </body>
   </html>
  
  
  

--
To unsubscribe, e-mail:   <mailto:watchdog-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>


Mime
View raw message