Êþº¾0ý O€ O�‚ Nƒ N„ …†‡ˆ €‰ Š ‹ NŒ �Ž �o �‘ ’“ ” …• – —˜ ™ š›œ �ž Ÿ  ¡¢£¤¥¦ §¨©ª«¬­ ®¯°±² ³´ µ¶·¸¹º»¼½¾¿ÀÁ �ÂÃÄÅÆ ÇÈ šÉ Ê šË šÌ ÍÎÏÐ counterNameLjava/lang/String; ConstantValuedefaultInitialValueI  initialValue()VCodeLineNumberTableLocalVariableTablethis LCounter;init (Ljavax/servlet/ServletConfig;)Ve!Ljava/lang/NumberFormatException;confLjavax/servlet/ServletConfig;s ExceptionsÑdoGetR(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Vitempreq'Ljavax/servlet/http/HttpServletRequest;res(Ljavax/servlet/http/HttpServletResponse;countercookies[Ljavax/servlet/http/Cookie;cLjavax/servlet/http/Cookie; hadCookiesZ hadCounterbytesLjava/io/ByteArrayOutputStream;outLjava/io/PrintStream;ÒgetServletInfo()Ljava/lang/String; SourceFile Counter.java WX ^_initial ÓÔ VTÕ Ö×java/lang/NumberFormatExceptionjava/lang/StringBuffer0** Non-numeric format for 'initial' parameter: ØÙ Ú} ÛÜÝ Þß à}á âã äåjavax/servlet/http/Cookie æ} Úç èÜ Wé$Supports Cookie Counter Demo Servlet êÜë ìíjava/io/ByteArrayOutputStream Wîjava/io/PrintStream Wï ðÜCookie Counter(

Cookie Counter


&

Your session's counter was ðî' before you visited this page.%

The counter has been incremented.

+

You presented no session cookie. A new+cookie was created, with an initial counterholding the value Øñ.%

You presented these cookies:

    
  1. Name =  , Value = ò} , Domain = ó} , Path = 
0

Watch the value of the counter change as you0reload this page! The counter is updated by the2servlet which dynamically generates this web page.2

Try comparing how different browsers work with2cookies set using these two URLs on this server: ,/counter.html, and./servlet/Counter.1These URLs refer to different 'counter' servlets,2which initialize their counts to different values. User-Agent ôÔ

Your browser is  not known!. õX text/html öÜ ÷ø ùî úû üï/Demonstrates the 'Cookie' API for user sessionsCounterjavax/servlet/http/HttpServletjavax/servlet/ServletExceptionjava/io/IOExceptiongetInitParameter&(Ljava/lang/String;)Ljava/lang/String;java/lang/IntegerparseInt(Ljava/lang/String;)Iappend,(Ljava/lang/String;)Ljava/lang/StringBuffer;toStringlog(Ljava/lang/String;)V%javax/servlet/http/HttpServletRequest getCookies()[Ljavax/servlet/http/Cookie;getNamejava/lang/Stringequals(Ljava/lang/Object;)Zclone()Ljava/lang/Object;getValue(I)Ljava/lang/String;setValue'(Ljava/lang/String;Ljava/lang/String;)V setComment&javax/servlet/http/HttpServletResponse addCookie(Ljavax/servlet/http/Cookie;)V(I)V(Ljava/io/OutputStream;)Vprintln(I)Ljava/lang/StringBuffer; getDomaingetPath getHeaderflushsetContentTypesize()IsetContentLengthgetOutputStream%()Ljavax/servlet/ServletOutputStream;writeTo!NOPQRSTRUVTWXY/*·±Z/[ \]^_Y³C*+·*¶YMÇ * µ§,*,¸µ§!N* µ*»Y·  ¶ ,¶ ¶ ¶ ±!$Z& RTUX!\$Y%Z+[B^[*%`aC\]Cbc 6dQefghY K*´>:66+¹Y:ÆV66¾¢H2¶¶™22¶À:¶¸>`¸¶6§: :§ „§ÿ¶Ç»Y¸·:¶,¹»Y·:»Y·:  ¶  !¶  "¶  #¶ ™/ $¶  %¶  ¶& '¶  (¶  )¶ §. *¶  +¶  »Y· ,¶ ¶-.¶ ¶ ¶ ™Ž /¶ 6  ¾¢u 0¶   2¶¶  1¶   2¶¶  2¶2Y: Æ 3¶   2¶2¶  2¶4Y: Æ 5¶   2¶4¶ „ §ÿ‰ 6¶  7¶  8¶  9¶  :¶  ;¶  <¶  =¶  >¶  ?¶ +@¹A:  »Y· B¶  Æ §C¶ D¶ ¶ ¶  E¶  ¶F,G¹H,¶I¹J,¹K¶L±8\_ZDijkrsu(v8|E}N~Y\„_�aƒd…gumŽr��‘ˆ”�ĜŧǮȵɼÊÃÌÈÍÏÎÖÏÜÐãÑêÒôÔûÕÖÚ$Û+Ü6ß=àJáQâ^élêsë€íŽî•ï¢Ü¨ò¯ö¶÷½øÄúËûÒüÙýàþçÿîø ',4?!J"[˜a`a MiTi9jQ .ziT K\]KklKmnFoT4pqCrs @tu=vuœ¯wx§¤yz øSjQ ef{|}Y-M°Z)[ \]~