Edit D:\app\Administrator\product\11.2.0\dbhome_1\owb\jrt\default-web-app\WEB-INF\classes\Counter.class
?? 0 ? O ? O ? ? N ? N ? ? ? ? ? ? ? ? ? N ? ? ? ? o ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? counterName Ljava/lang/String; ConstantValue defaultInitialValue I initialValue <init> ()V Code LineNumberTable LocalVariableTable this LCounter; init (Ljavax/servlet/ServletConfig;)V e !Ljava/lang/NumberFormatException; conf Ljavax/servlet/ServletConfig; s Exceptions ? doGet R(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V i temp req 'Ljavax/servlet/http/HttpServletRequest; res (Ljavax/servlet/http/HttpServletResponse; counter cookies [Ljavax/servlet/http/Cookie; c Ljavax/servlet/http/Cookie; hadCookies Z hadCounter bytes Ljava/io/ByteArrayOutputStream; out Ljava/io/PrintStream; ? getServletInfo ()Ljava/lang/String; SourceFile Counter.java W X ^ _ initial ? ? V T ? ? ? java/lang/NumberFormatException java/lang/StringBuffer 0** Non-numeric format for 'initial' parameter: ? ? ? } ? ? ? ? ? ? } ? ? ? ? ? javax/servlet/http/Cookie ? } ? ? ? ? W ? $Supports Cookie Counter Demo Servlet ? ? ? ? ? java/io/ByteArrayOutputStream W ? java/io/PrintStream W ? <HTML><HEAD> ? ? <TITLE>Cookie Counter</TITLE> </HEAD><BODY BGCOLOR=#eeeeff> (<CENTER><H1>Cookie Counter</H1></CENTER> <CENTER> &<P> <em><b>Your session's counter was ? ? ' before you visited this page.</b></em> %<P> The counter has been incremented. </CENTER> +<P> You presented no session cookie. A new +cookie was created, with an initial counter holding the value ? ? . %<P> You presented these cookies: <OL> <LI> Name = , Value = ? } , Domain = ? } , Path = </OL> 0<P> Watch the value of the counter change as you 0reload this page! The counter is updated by the 2servlet which dynamically generates this web page. 2<P> Try comparing how different browsers work with 2cookies set using these two URLs on this server: ,<a href=/counter.html>/counter.html</a>, and .<a href=/servlet/Counter>/servlet/Counter</a>. 1These URLs refer to different 'counter' servlets, 2which initialize their counts to different values. User-Agent ? ? <P> Your browser is <em> not known! </em>. </BODY></HTML> ? X text/html ? ? ? ? ? ? ? ? ? ? /Demonstrates the 'Cookie' API for user sessions Counter javax/servlet/http/HttpServlet javax/servlet/ServletException java/io/IOException getInitParameter &(Ljava/lang/String;)Ljava/lang/String; java/lang/Integer parseInt (Ljava/lang/String;)I append ,(Ljava/lang/String;)Ljava/lang/StringBuffer; toString log (Ljava/lang/String;)V %javax/servlet/http/HttpServletRequest getCookies ()[Ljavax/servlet/http/Cookie; getName java/lang/String equals (Ljava/lang/Object;)Z clone ()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;)V println (I)Ljava/lang/StringBuffer; getDomain getPath getHeader flush setContentType size ()I setContentLength getOutputStream %()Ljavax/servlet/ServletOutputStream; writeTo ! N O P Q R S T R U V T W X Y / *? ? Z / [ \ ] ^ _ Y ? C*+? *? YM? * ? ? ,*,? ? ? !N* ? *? Y? ? ,? ? ? ? ! $ Z &