tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-servletapi-5/jsr152/examples/jsp2/simpletag RepeatSimpleTag.java.txt
Date Mon, 03 Feb 2003 23:34:28 GMT
kinman      2003/02/03 15:34:28

  Modified:    jsr152/examples/jsp2/simpletag RepeatSimpleTag.java.txt
  Log:
  - Patch by Jan Luehe
  
  This is to sync up the source that is being displayed
  with the real source. The source that is being displayed still supplies
  a Map parameter to the fragment invocation, which was removed a long time ago.
  This has led to some confusion.
  
  Revision  Changes    Path
  1.2       +3 -3      jakarta-servletapi-5/jsr152/examples/jsp2/simpletag/RepeatSimpleTag.java.txt
  
  Index: RepeatSimpleTag.java.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-5/jsr152/examples/jsp2/simpletag/RepeatSimpleTag.java.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepeatSimpleTag.java.txt	7 Sep 2002 00:48:00 -0000	1.1
  +++ RepeatSimpleTag.java.txt	3 Feb 2003 23:34:28 -0000	1.2
  @@ -8,6 +8,7 @@
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.tagext.SimpleTagSupport;
   import java.util.HashMap;
  +import java.io.IOException;
   
   /**
    * SimpleTag handler that accepts a num attribute and 
  @@ -17,10 +18,9 @@
       private int num;
   
       public void doTag() throws JspException, IOException {
  -        HashMap params = new HashMap();
           for (int i=0; i<num; i++) {
  -            params.put( "count", String.valueOf( i + 1 ) );
  -	    getJspBody().invoke(null, params);
  +            jspContext.setAttribute("count", String.valueOf( i + 1 ) );
  +            getJspBody().invoke(null);
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message