Web Technology Notes

July 30, 2018 | Author: Subhasini Murugesan | Category: Java Servlet, Hypertext, Cyberspace, Software Engineering, Technology
Share Embed Donate


Short Description

B.E web technology notes...

Description

WEB TECHNOLOGY First Edition

M. Thangavel B.E. (CSE) M.E. (CSE)

With the guidance of, R. Sujatha B.Tech (IT), M.E. (CSE)

Dedicated to, M.E. Students, Computer Science and Engineering Department, J.J. College of Engineering & Technology, Ammapettai, Poolangulathupatti (Post), Tiruchirappalli - 620 009, Tamil Nadu, India.

SYLLABUS

UNIT I

FUNDAMENTALS

Introduction – Network Concepts – Web Concepts – Internet Addresses – Retrieving Data with URL – HTML – DHTML Cascading Style Sheets – Scripting Languages Javascript – VBscript.

UNIT II

COMMON GATEWAY INTERFACE

Common Gateway Interface Programming CGI Scripts – HTML Forms – Custom Database Query Scripts – Server Side Includes – Server Security Issues – XML.

UNIT III

JAVA PROGRAMMING

Java Fundamentals Classes – Inheritance – Packages – Interfaces – Exceptions Handling – Multi threading – Applets.

UNIT IV

SERVER SIDE PROGRAMMING

Server Side Programming – Active Server Pages – Java Server Pages – Java Servlets. Servlet Container – Exceptions – Sessions and Session Tracking – Using Servlet

Context



Dynamic

Content

Generation



Servlet

Chaining

and

Communications.

UNIT V

APPLICATIONS

Simple applications – Internet Commerce – Database connectivity – Online databases – EDI Applications in Business – Plug–ins – Firewalls.



    







    









     

           5 !    ! " #  $% & ' ( # 6 )  % (( 7 



* +     , ! -'%.'/' 7 - 5 !''0' (   "% & %(  12 ! 



 13  4((  8   4(( # 6  !4(( ( )4((  !"     # !) 



!,  &1    , !6 



"-' " 4  (3   " 40( 1-' " 49 -'0:2#  " 4!- (  "! 4"1 "" 4)21  ") 48% # ('    "7 46 (  (  )5 47  ((;(  (  ) 45-'+#  ) 4 2 ( -'+# (9 2 1 )) 4-'9 2 )6 4'   2# :-'9 2 85 4! #1 8! 4"  1(121 ' 8" 4)2 0# 2   88 482  0# 2   86 46  (92   65 ) 2-' 6 );+<  ' ( #( ##    6   (3  

6

;+<  ,   1

6

 ##   4##(#( 

6

! 2% #  68 " 2   1 75 )1  92  ##    7 8&1 ;+<   7! 6%322    -';+<  ' ( # 7)





)0&  ' ( # 78   (3   78 0&  ;# 76 0&  ; ( 77 !0 -(#1  ;0  5 "1  ' 3   0&  ;' 3 ' &  5 



), ## &   ;' 3 ;& ;' 3 ;3  5! 89 2  1  ;9 3(;#3 57 6'  9 2  1  ;%3+2 (;,    70&  3++#1  5'   -'0&    



)9# (   ! 9#9# =9#>9#- !     29#  )   121 ' 6 !' ##

321 9# ?&  ./ 5 "4((1%(   :   

 )  1.(    4-4  8'1 : .#  ) 6  1'    #3 7 71   & 9#   54(& (9# =  %( (1  !   =9# # ( 8   =9# , & # !5









)!  (1  +3#     # ! 0  (3   ! 0%2#   (1 ! 0' &1,  (%  !) 0!(1 21 !7 0"(1 +#  "5 0)4(& (%  1(9# 1 " 08  (10# 2   ") 



8(1% # %

 "8 9  (3   "8 9# % #  "8 902+ (( (% # %

 "6 9! # 1% #  )5 9"10: #% # %

 ) 9)   10# 2   )! 981 3( )) 960# 2   2   )6 97 : 9# (  :' ( # )7 95 % # %

 8 



6@&  8! 6  (3   8! .%2#  12= 14 ; : 4* +1  8! .4  @&  12=4((1 1  86 .' 2     6 .!4 2  6 ."  '1=0A3# 4(, #  #;   6





6   #% 3 3  6) -  (3   6) -4#1  2 6) - 3(  (  6) -!   #% 3 3  68 -"9% #   % 3 3  66 -)9$0%0% #   % 3 3  67 -8*# ,    % 3 3  7 -6 3    ## (,     7 -7%   #   ## (,     7! -5412  ;   7) - 2  (  2  ;   78 -      76 -0  #  3    ## (,     77 -!9 ,    % 3 3  55 -"%  '3# # % #   % 3 3  5! -) ;$*-0,    % 3 3  5) -8 (  3 %  2   58 -6+ # ( (  3 %  2   56 -7 1#;   5 



693      (3     12' (3# @&%    122   (93    !93       ",( 2 32+ .     ) ) 3   (    8





8%  ,3#  8 6@& .# +#93   7 7, 3  5 50:2# 31, 3 =9+ %    , 3 &     



6"4 ! @  (3   ! @4 ! @ #1(4##  14 " @!,    (,    2  8 @"14 93   8 @)%  14 7 @8% 14= % %  5 @6'3# # %3+ (4 ! 



6";+<   ) B  (3   ) B' ;+<   ) 



B% 1;+<   8 B93(2  #; 4(% 1 8 B'  (; % 1;+<   6 B   1'  ( !5 B!% 1'  ( !5 B"%# 1% 1(;+ 1%3+ 1 ! B)-''3'  ( ! 







B! 40;+<   !! B"

# 4( 32+ ;+<   !) 



7>%  !8   (3   !8 ;   !8    (   #% 3 3  !6 !>% 93   " ">% 0:2#  12 " )4 "8 8% 1'3#   "7 6# ;+<   ) 7;    (   )" 



     







 22 .   C.D  4% 2 1 , 2 2+ + 3 .  4  .%   4*3 .E  4!*  .E  



 1221.%   .* #(*( * +    (/-'* . ! - .* E " !*  .% & E 7 



".% & , A3 2   7 ).% % 3 3   8#1F 3%  ! 6% ((.0& 2  >+#  " 7.%   +#  ) 5 93 3  .% 1 7 



-'9 2  9 2(.    19 2  + #13 9 #( ) !. 31, # (9 #( 8 " +# ((, (;#9 #( 7 )9 29 #(0&  -(#  !5 819 2   ! !3 2  + G3 %  ! (  (1  +  1 ! *4   + E !   + 4 2    ! !  1(19# 9#   +  !! " '  +  !) ), #  #  +  !7 8 +3111  + 4#   " 



"% & %( #3(  " 0%%%    " 0 131%% "! 01%%/-' "" 0! 22 %% 22( ")





)% & %( % 3 3  "7 9% & 3 12 "7 9.% 3 3 =,  1H1 +# 29(1% #3   )5 9( 4 = 3  *  #  8 



8/' 8) 9* /'E 8) 9    +

/'-' 8) 9- /'

 (E 88 9!/'

 87 9"/'% :,3#  6 9)/'0# 2   6) 98/'4 +3  66 



  



 .   @&  4     @&  4*@&2          4@&I'1=   (   4! @&3HH ( ! 4;& &  @& ) ;+<  ;  ( 1221 ) 49 %2#  12 5 4%  (%   12  !    #%  2   ! "1#   (  8 ) :#3  7 8 @&#+  

   >+# (4  @&%  1# (131    %2#     1   !9#  1     "  ! )

#  " 8>+#  ) 6  &  ( 1 7 74 5 



!;   ! 4 2 ;   !    ;   7 , #  #;   ! !

#  1#;   ! " 412  ;   !! ) E;   !! 8;    (   !" 



"   #%  2   !) 0@&I% #   %  2  

!)

0   %  2   !7 0@32%  2   " 



)  (31#  "" 9#93(2  # "" 9 #1;+<   "8 



9411;+<  ,    >+# 

"8

9!  (31'  ( "6 9"  3  ) 9)  B  ( )! 98.+1  ##    )" 96 #H CD'  ( )) 974% # )) 95;& # (1'  ( )7 91;+<  2  8 94132  1 8 9, 31;+<   8! 9!, 3  8" 9"4    # 8) 9)   88 989# 87 96  (( #  87 97 % 1# 6 95 22( 4132   6 



8    6! .    6! .1%3  66 .'3# # & #-  7 .!*   3 4 ## ( 7" ."'  (;& (1 7) .) 2'  (   78 .814+  #  5 .61#      5 .7 ;+<  # 5!

61 (   5" -1  5) -4     56 -2  11   -!    70:   -(#1 5 0:   -(#193(2  # 5 0:      31 0:     !1 (   "'3# #  #3  ! )  ( %  2   ) 8   8 6   6 7## 7 5@&I3# 0:    5   1F 3; 0:   %3+#    (0:     5'3#   ( ( 1221 " @ @& (' ( # " @ ' ( 6 @  1 ( !5 @!  1'3# #  ( !! @"14#& CD(< CD !" @) (    !6 @8% H   "5 @6   ( 223   "! @7%3 (1, 321(% 1 ( "7 @51'3#   (1 )





$; ) B%  2 ) B, (1  # 3  )! B* 1  # ;3 3  )) B!  * # )) B", (1(* 19#  )8 



 4#  8 4#  8 4# 4  3  8! 44# % #  8! !%2# 4#  #'  ( 88 ", A3  1,  1 87 ) -'401

65

8 43( #   6 6 4# % 3+   6 7;3 3 1     #  6 54#  12 6 







 

 

 

   

  

    ! "    !           

                    

                                              

                           

      

                  

   #$                     

   

 

               !     

    "                          

$$%%      

      #           

      $      %         &'        

    

                   



 

 

   

 

    

             '   

        '              

 )           

                 

           *       

                              *       

 

  &&'("#'$)"* '  

     +              

   

    + *  )  ,   -    $),-% ),-     )-  

        ) .       

)-  

    )       

 !   !

 $) !!  /00  0% "(+&,-'&($&-#+%           /                       

              *   '                 

              1                        /   

                               

  

(

 

 

   

"#&#(#                     

   /     

           '                     3 1 1'   -   $''-%     

   

  4     )56(2                         $       %  .       ! /'&'%$$0 ,   

       1                               ,       

      

                              

 



                  '  

            #                      '       1                                   

                        $    %                  

2

 

 

   

'                +                '  ' -0)-         )  ™ )      ) 1                ™ '                ™ '                                 ™ '            

                             

    

    

   

        $'$ "      #                         '           #     ' -     

#

   

  #          

7

 

 

   

'          )-   

 

+   

         

    '                                       #                               *   

 (''$ '                        

    )-      *     '           )-   * 

 

  * 

     *       '   *                 

 

#     

 

 

   9    *                   #      

           

          '          #  

          

         

  

)      #%&,&#,&-#+ / )      )- )               '   

                      

8

 

 

   

'                    ;       ---  ;  )-               '                          

 $                   % 

  

     #12&%&#(#11'(&-'&(#& 3          *               ' 

                   '

                           ,                        

         

          

     ,        



              '         '               9         

  ' .  ---  " 

   $56(%          

#     +   ,     

                    ' .  && / ' 1         

           

         )  9,)                  

  

:

 

 

   

                         +                 

              ') -   $)-%                               

 )- )-= !>?)                ' .                    

      

 @   

               )-      (6:6        :888   '  )-           /       666$ 7% 

)-4  66$  :% )-:      )-:            6  8        7     4 1      $ 8%)-  :6           2                          $   +1  + 1  +       +    %   +    !               

 



      

  

 ™ 0(5    *                      ,   

             )-7  

       6 !   1            6  2  

          ;    1              = $        %   *

 %  ?.C                )  )     

        

     $ 3'- ''-%                   ' 1 ?.C /  88  ;   88  02     ''-       

      

 

      '                #   $H% @                 

 $S%        1   4     , ))      

       1               

  

28

 

 

   

,      *    )      P(6 T '       P(   H T S H P76#  '  2  

%'12?#1-'&'2&?'$%?#1$1'$$%% Q'CRQ@RQ')'CR,3 Q0')'CRQ0@R  Q>9@UR  Q39.'9@HB' ')9!HE0 0 ER  Q-.R  -    /Q)!-?'!HE  E,)JH76R  -      

/Q)!-?'!HE E,)JH76R  Q0-.R  Q)!-?''U-HE,?>)'ER  Q039.RQ0>9@URQ0'CR  '      2         / B'-9,')     61      # 

  ?.C       3    -9,' #        B'0 0 G  H T S H P76#  ''-06 

" #9+        

   

        $  

 

  0  

%     #      

2:

 

 

   

-9,'0  0   ''-6 /  01    /:8 B'             -9,'            3

!"     @        )       !       



             #  )  

 )- 

 

)- 

      4    

     )-7  

              )-  

  :  4  )-: 

  "# 

            6   (88          

 >                    3  1   

        8(((('   #  "#( 

          1    

              

    +   ) 1  )-:)-7     )-: 

      )-7 # 

 ' ) *   

   & * +

  $@!,% @!, 

       $     % )-  

  

  $  8((((%      9   )- 

 

  

2!$,  !%   ?   1      ) 

VW>!$,  !%   ?   1      ) 

C  $%   ?   1    

25

 

 

   

          @!,          ) 

 F 

  '         

     

$ %   !$ %               '          4                    1   @!,    1 9   

     *      ) 

 F    !     $      



%          )*                         &7           

    @!,    ' 

     ) 

 F    )-  

      '       ) 

 F    )-  

        ) 

> 

$VW 

%   ?   1 007    ) 

> 

$,  !VW 

%   ?   1 007  2>'(%&&'(& $$%%&/1)&'#%&1*&#-% +#-#%& 6(2&'# ) 

>!$%   #      ) 

            *            )     * )- 

 @!, >!$%  / F) 

 

HF) 

>!$E   E%4   

2A

 

 

   

)    F) 



       >!$%  / ) 

 

H) 

>!$E   E%4 ' ) 

>!$ %       ?   1      *                       ?   1 $     

)91 % -        

 0  0  FN4  

9. >!X      $, VW  %X  X ) 

 

H) 

>!$E   E%4 ,   $ 

%4 Y$?   1 1%X ,   $E      E%4 YYY  ,         #  1      )-  

   ) 

>!$%/ ) 

 

H) 

>!$E(65(6(2A2'( %&&'( & $$%%E F & /1)&' #%&1* &#-% +#-#%& 6(2&'# ,   

      )   

 B     ) 

>!$%     

         

  

    )        / ) 

VW 

 H) 

>!$E E%4 C  ) 

>!$ % ) 

>!$ %     ?   1                            ?   1   2>'(

%&&'(

& $$%%

&/ $$%%)>/&E

F

$$%%*

&#-%

+#-#%& 6(2&'#88G5 2>'( %&&'( & $$%% &/ $$%%)&' #%&14 >/&EF $$%%* &#-%+#-#%& 6(2&'#88G5 





U   

   

         > 

$%  

   ) 

 F   1     @              

    7 : ;    *)-7 )-: 

;?   1   

  

7

 

 

   

2>'(%&&'(& $$%%& #(#%&)*&#-%+#-#%& 6(2&'# ') 



        ) 

 F '     ) 

C  $%     ) 

    



 

* 

 

C 

) 

>!$

%



) 

>!$ %      ?   1    *     

       $      * % )    

    / ) 

H) 

C  $%4 ('&/%%%

    ) 

 F                       #  @!,                  )- 

     $    %

   %                ) 

 F        '              ) 

>!$ %    ) 

 ?           ) 

 F        )- 

      @!,     

  ?             @!,                                       ?           ) 

C  $%              )- 

 ('(>/&EF& $$%%)* )         )-  

      

$ %     )-  

 

       '         

    

   + ;

 &

      +  '   )-: 

    

     

)     

 

*  / ) 

H) 

C  $%4 VW 

H 

$%%4    

77

 

 

   

"'&&"$$%%#?&#(1('  FN4  

 

'  X     D

$) 

 %X VW 

H  

$%4  $ 

HH7%  74   $ 

HH:%  :4    4 YY 

$$%%/2% 

)-7  

     ((7666   (2A(88(88(88     

 

                 ) 

 F       /    C  

$%    C   

$%    C  C  

$%    , C  

$%       

$%     B $%     ! C $%     C  C $%     , C $%     9 C $%  3.  5    :  &7    

 )7 

): 

        )-7 

  )-: 

 /

  

78

 

 

   

  

)7 

1 ) 

   

): 

1 ) 

 )7 

 

       ) 

  *          ): 

                    

 )-7   

$%/    )-7   

$% 

'               

  

   )-7

 

   )-:   ;          + '  

  6/6/6/6/6/6/6/1111 

)          

  

> $%    )7 

    33    !     &7 ! ) 

     )- 

'                       ' ! )  

                 

 

 

     ) 

 F  ' ) 

 F                 (&#/ &#$% 2>'(%&&'(&-#+&?(&/1)&'1*&#-% #(+& 6(2&'# ' >!$ %       ! )  F                  )  *          

  '     

  

7:

 

 

   

2>'( %&&'( &-#+&?( &/& $$%%)& $$%% $$%%* &#-%#(+& 6(2&'# '>) 

$%    ! )  F                  )-  

 )          )- 

       )       ,  1  2>'(%&&'( 1&'#&&-#+&?(%)*&#-%#(+& 6(2&'# ' ! )  $%       F                 && &#$% 2>'( 1&'#&& $$%%%)*                 )-  

 ' 

  *       ') 

 $% 

    F         ) 

 F    )-  

       2>'(&'&1)* ' !$ %              ! )  F  6   2>'(&'& '%2/1)* ' @ !$ %                 ! ) ;   E   6E

  

7@(& &#$% ' ! )  

     # $%   $ %   , $ %        /   # $%     $%  ,  , $% '  ! )  F    #             $         

 %  )- 

9    #  5

  9    '           #    



   ) ?.C   #   4             ""  &[  

    

   

  -) 

   

)  ?.C  #1& ?.C            '

      

                 $/%                '       )- 

    4          $00%    $0%      $/% '                          $/%    $0% '              ''-  

       '$6&1   

75

 

 

   

&[    

        

       ?#1$ 6(2&'#9        ?.C               / ?.C$,    %  '1             ?.C         / ?.C$,    ,     ,  % ?.C$,    ,   ,  %      #                  1   ?.C   

  1 ?.C  1         [  #    ?.C$?.C  !,    % :: &    %' 0  FN4 

?.C@ X      $,   VW%   ?.C1 X ?.CH?.C$E/00   0   E%4 ,   $E-   /ET-   $%%4 ,   $E- /ET- $%%4 ,   $E /ET $%%4 ,   $E3 /ET3 $%%4 ,   $E1/ET 1 3 $%%4 YY "         / -   / - /  /    3 /0    1//00   0      

7A

 

 

   

'  

                      #(&'# F     #2#(&'#)*   /     $% #2#(&'#)*      / ?.C     $% )    #(&'# F

      F)   6(2&'#   #(&'#  #(&'#       

   

      

     )      1      #(&'#    #2#(&'#) *       F        1    [      /  00@   ?.C    FN4  F N4  F @4 

? @  X     $,   VW%  1 X 4 ?.CH?.C$E/00   E%4 ?.C   H   $%4 00  H @$%4 $HH6% ,   $E!    E%4   ,   $E@/ET@$%%4  00    

86

 

 

   

,   $E '/ET  '$%%4 001   H 1  $%4 $HH6% ,   $E! 1     E%4   ,   $E1  /ET@$%%4 00     H C    $%4 $HH6% ,   $E!        E%4   ,   $EC    /ET@$%%4 00  H  C$%4 $HH% ,   $E  E%4   ,   $E C/ET%4 $LH6%X ,   $EHHH HHHE%4 ),  H ), $%4  H4  $$$H  $%%LH%%X00SS$ R6%%X ,   $$ %%4 Y  $%4 Y X ,   $E!   E%4 YYY '     #(&'# 

                  ''-  

     

8

 

  7

 



  

   

"        'C  #                       $      

      %  "        #"$     "       ?          3    -  'C  %        1   "        [ ) 1   ! [     9 

    'C                 $    [            %          &     

.

  " 'C      " '()  

     1    $    *   +    %         0 0  1         +    *   +    ='C      $"  

% #        ='C    "    3  1   ---$'&(#18>##+%8$#-#$%&1    "    [   

   #   $#-#$%&1    "       ---$'&(#1'       >##+% 

3

   = "  "  'C          ) 

1  88 

$   %'C  'C     

   [    '  

    'C   , - , - , -.    ***' /  *,0 -   

8(

 

 

   

,0 -  , - ,-* 1'()2,0- ,0 - ,0 -  #11& ' 'C    

                          

          



  'C  [                           'C   "       'C       ;%'(&% 'C       1                     [     ,        'C        ' &1     $        %      $        % '              'C            ' 

                            "  'C                                   $ H&1I%          8    $H8&1I%                      >  

             

    +   # $J% 'C          ;  ' " [        $   &'&  '               $[       

82

 

 

   

' $                 &1 [    '&'&   " '                   1        

           #'&%  ##+1+%  

          '    )  "   1)        / %

1         @       $   1  ---$'&(#1%

(% C) 1   2 ''    2   2%

    2   [  #-%        '(#%#?& && 62#   

7% !         71    1'&1  2 8%

   !    )  1        9  1         



5

  'C     1                 

                                        

  

  $ .3%         , - , - , -.    ***' /  '  ,0 - ,0 - , - ,3-+3'  ,03- ,4-+4  ,04- ,5-+5  ,05- ,6-+6  ,06-   

87

 

 

   

,7-+7  ,07- ,8-+8  ,08- ,0 - ,0 - 

7

! 9    'C     %9    $ 

 % %        'C     ) 'C   1            "   

      1           1       

          1 ,       $;= ;:=% 1      1H2IH82I     "     

             1 >  

   1    H%&#I   C       $  %      1 '&  ?.C

                     "          

 '               " &&288---$'&(#1 "  ?.C                "   "

        "  '       '$6&14     "  

        "  

)"      #        

    "        



    , :;>>0: >0: >0: &&#%  'C          )      "          $     

  [   %  %(       

  

85

 

 

   

'      

      %  1      >       1   C   '1  >   1         

D

" 

         ! " 1   

    $H%   

      'C   ,             

            1



 3 1  H2I'?6HA&'(1&6>/H82I

    1

    

  $H%             H2IH82I 'C                 $     LM%  

     

" 

       H2I'?6L&MA&'(1&6>/H82I        ?@  

    , :;>>0: >0: 04HH4,0- ,0 - ,0 - , +  ;< 

 My CD Collection Title Artist

Thangavel Murugan

16

    

  

      !

"" # 



                

                        

    

        •

      



               

 !

    #       !  "   # $ %      &

' $  ( $ )    ) ( !  *   ++ *  $ ,            $          !  -.$/    -/ ++0        1      2    !            

     3                4   ! ! #5    6            #5            7   8   

  "        $       8                 ! #5               9  )         !

      7             !  *        !         $

 "     *    $    !       4        

  !           !      



    

  

 '  7  !   !   8  !           & !           9    !     !  7    ;      !  4       !       ! 87       %%&'( %%)*&)+'        !      3           !            !              !    $       3                 *     7  !8    3   ! !   ! !         $ 4   $          

                    4       *              

   ! !        7  !   8 !     ? (  1?(2          ?(        !               7   !  ?(     4   

          *          !  $            !               !  ?(            .   8  $7    ! !               !        !    !                           $     )      *  1* 2      !           :  *        ?(   !    7  

      8!8       



     0

  

 11 /" $!     !          

>>  •

) 



)  



# 



.4 8  



=  



(  



3    8 



*    



;    



A   



A! 

 ")2%   !           ! * !   !           4 8               B! 7!   4 8               3       

                              

-3*&4 )&(   $     9- !    4 /       9- !   !!/   4        !  7      !         $    8      4     

@

    

  

+-'&                         !    $ 7    1    8  2 ( !            $             !        !    !          !  &7                      !>  -   / !  

! 8 8        !    4 8   7     &)&((         !        !     !  8 !     !               !   >     !  

   !      !   *)&*&4& 3             !   ! .       

             7      !        !                    1    2   8              #    !    

  

   

D

    

  

      7 !        4 8           .4 8        >          1    4 2      8           3 4 8         >    

    -'&*&)+ 3    4 8        3         !  $       ..# 3        

       3     !      7             

   F 4               *                               ! !           3           !      

               

 )*)%' 3 4 8                 ! 

   4 8    

!         

 !    *%'&)+ &                         $                 . !   $                               !

!          3

  

         !    8      

 

E

    

  

*        3

       1  2    !   4 &  4   

         !         !      '      4            

       C 4 !   ! !    !  

!          

  !        )

 !    !              &       ! $      

         !    7       $   ! $             !  

 !             !              

        )&* *     !   4  6        4                                    $        4     

 

       

                   

,

    

  

(       !          4                    !          3           C !       

     

           * !          

          !  

     !    !    $                   9   )       !    

! 

    !             3 !                         ! 

   +,2+%)'2 # !  1  " $ -! /2                  

       ! 7            $1   8   8    2

 

+

    

  

F        6    !   $.  $          8                 $           (   !       !      7  !    -          /                

               7 !!          

!    *      94     

  1     2         $

# ""     BH          I&74I HB

&7J BBF         12      1)  KL2J )!     1I      I2C M M

 &)& +2         !               !             !    '    7             &74N 9!*     

!      *   7                  6       4 7   3!  ! $          !      &7           8    

G

    

  

+2%))& +2     &7    7       4  

!               OP4 &74 4        &7       !                 4            ! 7    !    !          4     &7 8      OP4&7                   !                                     7   ! 7         4  !   !

!         !            7   *      !        !          7   *          7         

    +'++7&&#)'&"2% +2           BH          I&74I HB         !                         !          BH     HB 3!          !     ! 

    7           

&7J  



    

  

       $!                 &7                     

            !  1J2    

 !  1M2  7         8      BBF         12       !      !  3  8       BB       7             1)  KL2J      12  3                     7  3   7  !

  12     $!    

 

            

       !              !      !

!              $! '&&)* 2)89                          !    2)8 9   !  

        ! 4      $!  +)(  !       2)89       3   12        Q        8   (           3!      !              !   

                           

 

:

    

  

* 12    !         )  KL                 !        )  13 !        4 2.4   !)        *       ! 8            7             J        129 !3             

       9    !         !    7       %    

    12 )!     1I      I2C        -      /  !     .    !

 !   8   12  *      1 2  !          )!      

    

  !                     

" /"    BH;     7    I&7:4IHB

&7:J      1)  KL2J

 CBB       RGGCBB    GG )!     1I   I2C RH:C )!     1I  H: I2C )!     12C M M

  



    

  

!      !                        N 9 $     $   !                        

                          2  1 $      2 6            !    '                ;  

   !                   !              8     $! )&

     !*                    2 GG*        6  7         2  !  -   / ! "  "  #$    $ % &

 0

   " "

)5"&&2& )5    $  $ *'    !   '    !  !    )5    S*        

12   C ;   7  *       

7  *       !   

@

    

  

 ;  7

1TGG2  1I  GGI2C *     2           GG    7    %)&89 7  *2         6 GG  %)&89   !                 !    

 7  ;   

%&+ ) T



N 

P



"    

RR



&6 

 %       6 !   6 ;      

   )5     BHA        I*)4IHB 

*)J      1)  KL2J

 7!C 7RGC !R:GC

17T!2)!     1I7  !I2C 7R7H:C

17RR!2)!     1I7 6 !I2C 7R7H:C

17P!2)!     1I7     !I2C BB   U  !!  

17RR!2)!     1I!  U   I2C M M   

0

    

  

     !        7  ! 7 6 ! 7     !  %             

 7!C      :,!  8      5+++% N                ! !        7              #        5+       5+    

 #   '      &      *                              7         

   *           5+       *           7           

        ;           5+    BHA         I'  4IHB 

'  J      1)  KL2J

 7C  17RGC7TGC7R72 )!     1I   7I72C M M  

D

    

  

               7G   7   7:   7   7@   70   7D   7E   7,   7+  *   7 :         *     >  >   

  >    5+3         1       2     :;!               > 

B      )   ' 7  !    $  !  

          

                    4                      ;          .4                                           >  

       !"   3&  >?    ?  3 ' #4&  3 '' #4"     ?    ' %4&  >?    >  3    >?       ,3  - , . 3 . , , . "& 3 '  < %& /   ' #44&  @A   >?    3   >?       ,3  , . 3"& //  

:,

    

  

 E    "  / " .' &+2&)*+')+'   !        !         $             •

   !   



   !        !             ?     $   ' 

7 )& ! !     -,&  7



      6   '&)*+2%&)-,%' 3       !       !        '  7   !    )&  -,& [  

        ! -,&   )&   $            ?   $    !    7

!$                 !              !!     3    !7

 !   *      1 8 2 ;   

    !    

    3    !     

   8          !  3 !  $            

        8            !           

          !      6         



         !"   

:+

    

  

 &   ' %8B&   ' 7%7 #9%&     ,C       ,"&  '  " &     ,   , .  . , , . "&     ,C       ,"&  ' " &     ,   , .  . , , . "&     ,C       ,"&  '  " &     ,   , .  . , , . "& / /                        %8B #           7%7 #9% 7%7           7%7 #9% DB   F

" 3        $8 !          !   

 3 !  ! !      !         3 

    ! 

!  7 

4/)2')+ ,' 3        !       $8 !       !!       !     !        !       KLC    6    8   !     R K  LC

 

G

    

  

;  

   !       

          !     !      $   !      6       ! !    

!  !              !  !6   !

  > >  .      !    8    '   !             ! !) !      !      !  6     !    ! ! !    

   W!KLC   W!R  K:LC   W!KGLRC   W!KLR:,C   W!K:LRC   W!KLRGC 3 !    > !                >    ! 3          8   7   !  !           !     !     !               ! 

!   !   >      6 

   W!KLRJ:,GGGGMC  !  $ $ !   

 ! !                !  8 !    $     ! 7        " 

E        !"    ! ' #4 #$ ## %$ #% 7$ #7 9$ #9 8/&    ' 4&  &  



    

  

'4& F8& .."   '   .  !&     ,E   , .    8"& / / &)()2')+ ,' *         !  !   !           !   

!     7         6   $ ' 7        8   ! 

&6+/

   AKLKLR  K@LK0LC       @ ! 0  !      &6+/ *  !    7 

   )&   !   !  $ $     '  

)     *   +  ,( *     !    !     !!  !

!   !       1   2    F               !             !         !       !     

:

    

  

)      !    !  !  !      !  !      ;        



2?E       !"   ? ! ! '  ?  9! !& ? 4! '  ?  #!& ? #! '  ?  %!& ? %! '  ?  7!& ? 7! '  ?  9!&  $ G$ > ' 4& '4& F9& .." G'4& GF.#& G.."  ? ! G! ' >& >..& / '4& F9& .."  G'4& GF.#& G.."     ? ! G! . , ,"&     "& / / /              G : @0 DE,+  !  !     $ $  

 



    

  

&&) ,/*&)+",&:       !    !  KL &  ;   6    $      ! 

           ! ' 7          6  

 KLR  KLC

 KL:R  KLC          6  

   KLKLR  KLK@LC

 KLKL  :R  KLK@LC   0

  "         (          

                  / !

   " 3         7    !  

!                

 

@

    

  

')* )&2&)* %&+'                                         !       *                D   )&")5&          PP                 

    *       PP  

@

    

  

;   

           8          PP      

            

 !  )&6)' %&+ '')2&' 3    !                                       '  7                !     6   RPP@C PPR@C N $                          7  .=- 6   R]C ]RC  / 

      "                    

 )

 ! !   6 !             



    

@:

     / 0

  



      "             ! -++  3

    !           -++         -++

           K L  M     -++    !   !             O          O&II5'O5'II&                

   

@

    

  

"+&4)*)&+)* %&+'                     !  

   

     !        3%A  .=

   $         3!         .=      & 

&       )   ! 3%A      5'    5'      * !    LL  KK        L  K                8        7         !            !     8       & 5'        !  / =

 ""     

        6   I       

 $          !       *          ' 3

C ;   !        !  3

 / ?

P        

   1  8!2          

!  8 8    P     3

# P 3

%  3

7 ;  3

#   ! 7         -++  * 3

# &  3

%  C    3

7       P        7     3

%  3

7   6        !   9   +)( ;    7  !   P  !  R RRG[GB C   

@@

    

  

      7      $  7       6  $*(+26>   7   ?   6   $                 P 7   * (+2     6 >    7                 P7       ! P   

   &)+  / A

   /

     

@0

      =

  

  " " 3            7  

                    9   

                          4          !                7        7        :          7              1            2L     !     7           !

 ."" " "        )5'6)&*     

!       !    97     $  !      5 )5    9       *         7             ;          )5    

12   #C    %C ;       !                      !  1   >2  !7        -++   '      )5  $  $   *        # 7  .      % 1  7  2 7       $ & 

  F "  ' 4&   ' 4&  

@D

    

  

'&()5' 3   )5 )5             )5 '% )5    !        !  )5            '     !        )5             $ '     !

  '     '' #4"   G F %4"  ' &  > 5 #44"  ' &       ' &  

  ?   /   ' &         '' #4" )54'4)5(( 3            6   )5      *  $ $    "

  &   "

  &   "

  &



  &

'6)&* '6)&*    9 !     *   ! !     7           !          7  ;          

?  3

"    #-     0   >&   %-  

@E

    

  

    0   >&

  M-     0   >&  -       0  /   7       ! !        C      

          !    7   '6)&*    $ $     7                  *'     *         6        *'      7   *              7     (5&      7   ;    (5&       * *'  (5&           $  -7          '6)&*           6 -7       7                 '6)&*        -4   /  '6)&* -7      *!    -77         7 *'*       *'   -7        '&('6)&*"&&2&' F         6        

        )               $                         '  7         !  

 

@,

    

  

?"   #-

? "      ?  4-     ,    ,"&  >&  #-     ?   ?     ,    ,"&  >& /  >&  %- 

 ;                                  !               *                     *  !                               !   6 !  

™

 ! !  7        $ !       7          ™ %             .            !             

  ™ 3     ! 

         $

  " " 9          5+ 6)  (+46)     

    ! 

6)  6)    9             *          $     7       

@+

    

  

;      ? "      /     !   7     !        7          7         

   7       !        !      !  !                ?  

N       !"    ' #4& ?  5 4"      ,> , . "& & / / / (+46)

    7       6)     !     !          7      ;           7    ! 6)         7       (+46) !7    !         7         *            / ? "& &      (+46)   7    !          7   *   7            .           

0G

    

  

 "      ?  

N       !"    ' #4&       ,> , . "& & / ?  5 4"& / /  #+          & &  "    /  * !                !                     >       7  " !   7                        *              > 7    !7    %7               7   *  !               *  7       !    7  *

       %7          7      !7                                7    7     !       7       7                 7      

0

    

  

 !      

       !"   $ & '#( '9& F& ..( "      , ' , . "&     , ' , . "& / / /  $            

H2>       !"     $             '#4& 54& "     ,> , . "& / / '&(++%' N $                      !    ' 7           O      

M         !"   $ G& '4& F#4& .."  G'& GF#4& G.."     , ,"&     "& ///  

0:

    

  

     !       

            

 " "      4     -7 *+&)  & 

            !      ')-7 *   -7         '    !           6  '6)&*   )    7       -

  >/     ')-7&+:)&++% !    $ !                !  

  7    !        !        $                               7         ;   7      >  3   

1 >O       !"   '4& F#44& .."    '' #4"  >&        #4  

0

    

  

    ,- , . "& /     ,O   ,"& / / ')-7'#+2+5+&+     -7        $ C ;           $      -77            $    $      -7             !      $      !      -7     7      $  ')*+&) )           !         *+&)             * 6)  (+46)    *+&)              !     7    

    *5+              5+         7   '       !        !        

       !"   '4& F#4& .."       . , ,"&  J% '' 4"  &     ,,"& / / /  

0@

    

  

&        & &     7

!                   $         3       >   4     3  !        &          7        $           &      !            7     ?

 / """       *            

           4 3  

     4 8        # !

 ""#/  " 3      4  4     

 #+2+5'' 3    !  *''$!                !  !    7         1 !  2       7        *''       



 J     #C     %C BB     MC    #1   2J BB !    M    %1   2J BB !    M   

00

    

  

BB    M1   2J BB !    M M                

             !                    *                  

 !                      9 

 ?                    

      1      4    2      !            4        6           & < E     13 

   13  G  "" N 9      !7      $3 >

     8  8         $  $  $    <                

DD

    

  

)  $            !              $!    $     $!    ;    "&*7      $       2 

      >    #4 



>   > ! '  ?  #4!&   &  :   > >"   ' #& /  I       >     "    ''6"     ,>   ,"& 

> .. ! '  & /  I      >  "    F 4"      ,>   ? ,"&   4& /    >  !& / /

"&*7             $    

  !   ! '&*7    !  7 !    &+'   !

    7       $  "&*78 9      > &+'  Z        !   $   %'89      $     %+%89)   

    $   %'89%+%89       $    !  !        $  

DE

    

  



2 >       !"  >  ># '  ? >"& >  >% '  ? >"&         >  '4& F#4& .."  >#  "&  '#4& F%4& .."  >%  "&        >     ,>   >#-,"&  '4& F#4& .."      ># ""&     ,>   >%-,"&  '4& F#4& .."      >% ""& / /              >   >#- 6 ( B D 8 9 7 % # 4 >   >%- #6 #( #B #D #8 #9 #7 #% ## #4  

D,

    

  

# !- , . >"& /  "      ,.G.>- , . .G.>""& / / 

 :        !"  E  Q '  ? E"&  

,@

    

  

1 Q '  ? 1"&  2  

      

 Q  ' #4&

 Q G ' %4&     ,    Q- ,"&

 Q ?G"&     "& < 2 

 

         

' 6&     ,   Q- ,"&

Q ?G"&

Q ?>"&     "&     ,  $ G  >  Q-,"&

Q "& //                  .

4G:G     .

4E, $+ )  4$ .

4$:@  &           !   8                  !  '                      *''           

 

 7   

 J BB !   M  

,0

    

  

2- **''()&*   < :  

 $           

2      ?   C ;  >       $ '  7         

  $ , *7  $(!# $C  !      $' 7  *''    !  !          , *7          !

, *7  F       !  $    !    $         !                $        $>#K>%K>7LLC 3  $    !          !   !      ! ' 7 $    $4  C    3R6&R)23S6&S)2 36&)2 !   5%*Y   (

  !   !

 

GD

    

  

#)() *7'( ""  ;    8 ! $    $  $  !   [     '  !   8 !  

   $   !     ) !  

!  !   !  N3))#3 ;   

-  E  > > ;I>& 

1    &  & 1  $  "   ' &  ' & /  ?"   F4"     ,5 ,"&      . ,- V, . "& / / 

E1       !"  1   ! '  ? 1 7!&   4! '  ? 1 ,T L H ,$ #%7 %7"&   #! '  ? 1 ,N 2 ,$ #8B 4%"&   %! '  ? 1 ,2 L> ,$ #% 77"&  '4& F7& .."   ! ?"& / /  &7   4(!# $3

     

GE

    

  

 $

""  



 $          

            # $                   $                  9               !      $           !    •

)    $



% 8    $



)      $



        $     



  %)&%-)*%+&*&(    ! 

!    ! 

 6 !    

   9

    !      !      3!      %-)*   

   !  3!     %)&                   7

 

 

                 $     



 

G,

    

  

* !                !       $   !     !     !      %+&*&( &7     $     =                $                   $<    :

- .  /  "0 > #&  

I     ' #&   U ' %&     U ' 7&   U ' 9&  I "      ,  ,"&     , ' , . "&     ,U ' , . U"&     ,U ' , . U"&     ,U ' , . U"& //

.  1 "0 > #& 

   3  I     "      ,    ,"&     , ' , . "&  

      ,U ' , . U"&     ,U ' , . U"&     ,U ' , . U"& // .  !/2 "0 > #& 

 I>   I> "  I   '  ? I "&  

G+

    

  

    ,  >  ,"&     , ' , .  "&  

      ,U ' , .  U"&     ,U ' , .  U"&     ,U ' , .  U"& // .  /  "0 > %& 

I % 3  # I   I %"      ,     >  ,"&  

 >       , ' , . "&  

      ,U ' , . U"&     ,U ' , . U"&     ,U ' , . U"& / /

.  3 /2 "0 > %& 

Q I>  Q I> "  # I   '  ? # I "&     ,  >  ,"&  

 >       , ' , .  "&  

      ,U ' , .  U"&  

$ 

 >       ,U ' , .  U"&     ,U ' , .  U"& //

 

G

    

  

    2     *     > # > #&  :    

 #  

        !"  I  # '  ? I "&    % '  ?   "&  I> 7 '  ?  I> "& //          * -    > % > %&  :    

 %  

        !"  I % # '  ? I %"& Q I> % '  ? Q I> "& / /   

  > "                  $

      !                         !        *        )2%+&    

    !      %*7     1   7  2    !              )2%+&   

 >#K>%L1

 ]H2C  ;  $      8  $  $:          $       $  ! 12' !! 

!   7

    1H2           

    $  



    

  

        

 4 A C

 4 HC  3                    $

 3              $     3  $ 3  % ! !       !  $     !                        !  3    

!

 !           *7' 

   0

 # " 5   $!  )&5* !   !     9       

      )&5*!  

!             *      !  !         !  $               ! !                         !     ;                

  !        $!  !  !  >  -        /   !  

 

:

    

  

*           !            % !                               $                /5))&5* 3        $             

         #   "&     %   "&   # '  &   % '  & 

    M   "&   M '  & /  ;  

              

 

       

         !         $                  !!            !       %                     !                !  !    C          !  

       &    

              ?                  !   

!      !   !     !      >    3     

! 

           

 



    

  

 2%2&)&5*' .                    

   

                

         !         

         $ $    





 3   

!       $  

!!   

 / ;  

           *        

                  *      

               !                         3   !            7 !  !   

 

         **'')2%2&&)+'+&5* 5*' F      4              

 ! 3!     !                  !   !                                          $!           7    $! !                                           $ !     - /               

  4   

@

    

  

   :    > 

E      >   :   >*      > "      ,E      >,"&     , 0   , . 9%"& / /             

 $  @: 3       $ 6  ED@  &)2%2&&)+' *          !       !               ' 7   

:     >   $ &  ?"       . , , . "& / 

/  

0

    

  

%%,)&5*'        >       :>      "&       "&        /  E     :>   3   

H3 >    :>    > !&    &     > H3 >  " 

> '  ?   !&  ' #& /  I       >      "    '' >  #"            ,>   ,"& 

> .. ! '  & /  I      >   "    F 4"      ,>   ? ,"&   4& /    >  !& / / 

:H2        !"  H3 >  ># '  ? H3 >8"& H3 >  >% '  ? H3 >("&         >  '4& F8& .."  >#  "&  '4& F(& .."  >%  "&        >  

D

    

  

    ,>   >#-,"&  '4& F8& .."      ># ""&     ,>   >%-,"&  '4& F(& .."      >% ""& / /

)-')&5*' F                     !  !                      >      !             1     !  -  / 

   2                                  B          S                G  R&         MQ ' 4&  +@ ' #&  ;E+1@ ' %&  OE2@R ' 7&  QQM ' 9&  M@P@R ' 8& / 

X         R  '  ? R"&   >"    ' " #44 <   3 ""&   F 74"   MQ&  74J    F D4"   +@&  74J  

E

    

  

   F B8"   OE2@R&  #8J    F 6("   QQM&  #7J    M@P@R&  %J / / 

E >;       

   ?   " 

? "   MQ-     ,M,"&  >&  +@-     ,+ ,"&  >&  ;E+1@-     ,; ,"&  >&  OE2@R-     ,O ,"&  >&  QQM-     ,,"&  >&  M@P@R-     ,M  ,"&  >& / /      !"  X  0 '  ? X "&  ? 0  >""&  ? 0  >""&  ? 0  >""&  ? 0  >""& / /  

,

    

  

&5*':&(( .         !  $! 7  ! 7                                        

            BB.     7   

   3J   12C   :12C M BB    12 :1288  12

   7 3J   12C M BB       3

(!  J    12J )!     1I*  12I2C M    :12J )!     1I*  :12I2C M    12J )!     1I*  12I2C M M

*'&7 J      1)  KL2J (! R(!12C  12C  :12C  12C M M     

+

      F

  

@   / 3 3          6    

*   7    8     !

@  4 /#/  " 3  7     4       7   1     2

   

      7      4      7     ?              !    7        &7        !   8  !   !   !    ! !    &7     !                             7       7           $!  &, *&* &+6 &+6'5),#       !      7   

    &, $*7  

    &, $     F         7   1  *&*2           )! 8   7       !   !   8  !   !  7   $! &+63!7                  

     !  &+6'  3!      ! 7           5), $       7  8  $    >       /  @3 2 # 3Q"   3     @3 2 # /  

:G

    

  

 @3 2 % 3Q"   3     @3 2 % / 

   >     3      >  /   $

@   "



37   !      8  +6- +6-

         7           .    !:*%&)+        7                       !      !     7   !        :*%&)+  &)2:*%&)+ 

        ! +     7        

7      

  !!    &7    ! +    !   8  !                8    )  $    7      

 @  "     7       !   8!8

>   

@34       !"    ' 4&   ' 9%  & / /     8  !             ! >  

     7   4    ?   7       7    :*    ' 4&  ' 9%  &     ,2 ?     ,"& /  E @3  "            ,     ,"& /     ,E       ,"& / /                    E       . 7               &, $    *&*  $ .   *&*      7            7           &,B*&*   3 &,   *&*               *&*          

 !    !   &,   3 *&*       7    !  &,                ! &,      !  !           8    *&*         7  

              =  3      G  R& 

= @   

:

    

  

     !"   '4$ '4$ '4& R  '  ? R"&  '4& F7%444& .."     '   3:"&  '   3:"&  ' #%798  "& /  E @3  "      ,     ,"&  ' 4&         /     ,- , . "& / / / /)'%,)/'*)%&)++5:*%&)+ +6-    &+"&)8 9    1  ! -3*&2                      7   F    !      %)&89   ! !  7      E @3  "      ,@3 - , . "&  ' 4&         / @ ;  - &7  43  &7  B!>    =

&)%*&*'' *     7     !     

    !     !   

!      *&*   

        !  7    7        *&*                   !       7   7  

 

:@

    

  

3    *&*     7        !  7  

      &,B*&*  $

     7       

7   !         



;       !"      ' 

 &     , ' , . "&   ' 9%  &   ! '  # /&  9%! ' 66& / E @3  "      ,  4- , . "& / E: 3QQ 1 @3  "      ,E  3 - , . "& /     ,E    >

,"& / /  ;        !    ! -C5G ;  ' 4   4- G  E @3 -     E    >

-C5G ; 2 E  ' # E  3 - G  E: 3QQ 1 @3  E    >

  !     *&*               7          !            *&*         7      !!                    

:0

      ?

  

"/ " "  &,             &,         

 $   &,&  &,         7    7  

    $ *    &,           *&*         7      $      7  &,    9 *&*    

             *&*     

         &,       7  *   *&*          8 !   7    E 3        



M 2       !"      ' 

 & < :      $  ?    ?        3 

  1"        ,  1,"&  & /       ,1* ,"& / /  @3    > 

  "        ,  ,"& /       ,* ,"& / /      !"    E"&  

:+

    

  

/  @3  "      ,@3  ,"& / 1"& "& / / ;        !         E EK  @3     1 1K     K   !..& / /   "   '  & /   "   "& / / 

=OI       !"  2   2 " I2  ;E)UIR:QR:2+"& >   '  ? > 2  MQR;UIR:QR:2+ . %"& >   '  ? > 2  MQR;UIR:QR:2+  %"&  "&  "&   2   #4444"& /  :  @3  "      ,;      ,"& /  "&  

@+

    

  

 "&  N            G"&   G"& /  :  @3  "      ,:  @3  ,"& /     ,O?  - , .  >"&     ,=  - , .  >"& / /  A

" 1         

      ! !

             ! !           !            Q! !   >          1    23   4     !7   $  3 .!   

?          6  $          3           $          3           ?     3                    ')",*+)D(&+('    4 9  4            ',*+)D( $!           !   >           !   1 !  !   >  2          7        6      4    7             !     !   >     

0G

    

  

   2      

     "      , , .  "&   2   #444"& / :  @3  "      ,:  ,"& /     ,!,"& // 

     R    &   & 2  &    $  "    ' &   ' &  '  ? 2  "&  "& /   "     "& / / 

       !"     '  ?  "&   # '  ?   $ ,= ,"&   % '  ?   $ , ,"&   7 '  ?   $ ,N,"&  ?        #  G"& %  G"& 7  G"& / :  @3  "      ,:  ,"& ///  

0

    

  

;        !     =    N! ! !      2         *8 9  *8 9    $"&)    2'         2'     6    $                  *8 9         $    2'     ( '%8!$  

     

  !    !   > 4  '  7              4  Y             4 F*    Y   !!   >    F   $7  ;       F      !!   >   Y        

Y       $ F              A $                 ¾ *  

  !  !      8  4     ! ¾ * !          !   > 4     E 3   > 

E 

   1 "    ' 2   2 "  M "&      . ,    E ,"&   2   #444"& / @3  "   

0E

    

  

    ,E :  ,"& /      . ,    1  ","&   "& /

    "      ,:  E  ,"& // 

1 

   E "    ' 2   2 "  M "&      . ,    1 ,"&   2   #444"& / @3  "      ,1 :  ,"& /      . ,    E  ","&   "& /

    "      ,:  E  ,"& // 

 >    R  E  '  ? E"& 1  '  ? 1"&  >"  2   2 " M ,;2 ,"& 2   '  ? 2  $ ,R2 ,"&  "&  "&    >           ,1>    ,"& /   "   "&    >            ,1>     ,"& /      !"   ?  >"& //  



0,

    

  

!      !         ;2     E  R2     1  ;2     1  " R2     E  "  F

"" /B "B /"   /"  ''%(89    (       :  

  ''%(89     !   3        $      *               $      6  .       !            $ '289       *             ''%(89        '&+%89    (       :              !   3        !          !  

 *                     

       

M ?2     R    &      2  &     H& M ?2    "   '   &  '  ? 2  $  "&     ,M ?  - , . "&

  H '  &  "&      /  2          "   

0+

    

  

    ' #8&  5 4& "       . ,- , . "& 2   %44"&

  "  ?    H"  ?"& / / / /  :  @3  "       . ,    ,"& /      . , 3 ,"& /     " 

  H '  & /

     " 

  H '  &  "& / / 

  R        !"  M ?2  # '  ? M ?2 ,Q ,"& M ?2  % '  ? M ?2 ,2?,"&   2   #444"& #    "&     ,     Q ,"& 2   #444"& #   "&     ,R    Q ,"& %    "&     ,     2?,"& 2   #444"& %   "&     ,R    2?,"& /  :  @3  "   

DG

    

  

    ,;   :  ,"& /  ?             ,N       ,"& #  G"& %  G"& /  :  @3  "      ,;   :  ,"& /     ,;   3 ,"& / /

 ! $

 / "   *     

 !   ",'&2 )    

   8             !    ",'&2 )   55( ( 4         55( (      *     !        = 1= R  2  ;  R           $       55( (       (    .         %&"&2 (     !            %&"&2 ( 4     $ ",'&2 )        * ) = 1* )  2   ",'&2 )    4   !%&"&2      #                   55( (       $!     =  R = 1 * ) = 1)!  22C  

D@

    

  

()*&'       55( ((89    (89     

  12  *.&7   &    (89                

   *    Z        3! 

     :*%&)+      1  R             G  0

    "" )&)&         8  5      8

      $         >!     )&)&             IN Q   $    QM ? "  

DD

    

  

;    4   ! &%&"&2  QM ?               !   %)&8 9      *  QM ?  &     ! $   * 5'                IN   G   "&

H   "&   ' ,:   " ,& /  :          "    .' , :   " ,& /         ??   Y "    .' , :   " ,&  ? $ #4$ 74"& / /

 =

U"    %)&8 9       !  3  *    3  8 

!   7      !    9 %(&8 9         

   %)&89          !               !          %)&89  3     7      %)&89  

 !       %)&8 9          N 9  $               %)&89        12

 

E+

    

  

                         

              1       ?   2 ;        8        

 !                    ?   



   

   7 (  6       

        ! 3      %(&89  !   !      !                   !.              %)&89     1 3 2     1 3   3    ?   2 ; 3  

  7           %(&89     *   %(&89 

  9     ?

    3##N&            ; (N   

    3    7   3##N&                $%  %  *   &7   ;      !       

 ! 7      

3##N&       $      F EIIO@2 Q@1E@ '   RO! Q@ '  H EO2 '   2 3! ME;@ '  :  M ! N:2= ' 3  =@:Y=2 ' 3  EO:YM '  ! PIE@ ' 3  ! =IE@ ' 3  ! 5 F IERE; ME;@ ' E M PEO@ ' E P 5! F IERE; ME;@ ' E M % PEO@ ' E P 5!  

,G

    

  

=2;O         L! FEIIO@25  / " .A&3)&          

    5=N    

       !            9 7      1

  !  .A& 2  ; (N   9 5=N   !     .A&3)&          

   .A&3)&              ; (N      / .A&   6                   !    9   *''              5=N           !    ; (N         !    ! .A&3)&      3N            

!    7       !       3##N&    9    !                   ; (N !             9       %3(&          

!           3                       !                !   & %%&8 9    !  %%&+&:&      / / *A ;;&*";   6        >1  72     !   

,

    

  

 3N*"%          

                   ; (N*("     N&'  =*";  3).

.# .

.( (*AAN& 3)&N*%&

&Y

.# 3)(*AAN& 

.(



"  /"        ?)#3&

     7       ;)#3& 

       7          !9     *(" 9?)#3&;)#3&       /   #3=3(    !   

!  

       ; (N 3 

      & 2&89     / /  " " )   !      9  7       9    >  3##N&    A

 /   #   ()+)%           %,8 9 1!      

  2 '&+%8 9 1  !    2  ++%8 9 1!      !2 3  !      & ()+)%89!      !    E

 " #   %%&"&-          !       

   1      2    F        ! !    

      

,:

      F

  

   "  3         9       

    3 

      (6"&)8 9                !                            (   )     4&56 %                      

 

   

 #?'?@ 

     

  

:

     

  

6      !"#$#%!!&.=  /0!                                    )*&, .)&(&*         @             %      /0!       A               /0!            

    $    B 2%           /0!            C6+1DE+D2     /0!     &  '(         

   

   3                                 $   /0!     1                69                                ? @!&!A    A   $       

  %        /0!     &/                #             FF        ? @!&!A          %  #   .** /    

   

7

      #G

  

  6 6  &'                    $   

     $           $          F !!!&  &  ! 5 $          $              #  %   $     "                 , ,  ,                           !!!&G:$     ,         3 9      9     3   +   !  '      

   >          %%&,  >  3(              %      %              &/,*  -;   * %%&,         #    +!'        E           +!'                +!'           3+!'  %   +  ! ' ,         &'      $            %           +!' 5  +  ! '           +!'          &! &  !  #.1"&' !!.  !! ! %&$   H:%?;K#'"# G?(2))A+?)):;:LI;B ,D; &!& )) ( ('))****+);@)$'",):;:)$'",2 &!& ..( '"$"&!('))****+),---)$'"( ' . G&! &# ?&&1.) !//($)!!(  0$2 &&3   



     

  

5&2!7,C3 13 5&2!7,C3 5&25 "/  6! &!2!54 )!/ )' . ./ H22&1.'' .22 H22M&1.=1 ()&1.!)' .!'"(22 'CG&! &# ?&&1.)'C  5!! !!. &6&' "!!  G5!!&> &.G5   H22 5"'&5" &5"'1!22 5" &(!! !("'.(!(    .K1 "). .&1/($(!7(9D( & "(1!& "()). )  .&'& "). .&1/($(!7(9D( & "(5& "( = 1(/15& "()). )  .&';). .&1/($(!7(9D( & "(.( = 1(.1"&()). )    

:

     

  

.&'&&). .$  & "(&&(*!(+( !(ED( @ '!$*'' &5" &/1*1.!)$  ). ) )  &1/(!1"(= 1(!1"() &1/(!(= 1( () )5" H22M&1.=1 ()&1.!)5!'"(22 )./ )'" *    ,      

 



   

@

     

  

  &  , * *  H22=2!.&1.5& &&LI;B 22 '!/(1() "''(,DD(!()" !)1C15( (1() '!/(1()  &  , ,  *  H22=2!.&1.5& &&LI;B 22 '!/(1()  !/($2 &&( '5(" .!(.&&5" &) 2  !/($2 &&( '5(" .(& '.) ) '!/(1()  

*,      +  ! '     

  2 &'            

                  (        

       )     (         

   ) 



  

G

      

  

$ +  ! '                 

 (    ),            $                 ,               

9    % ,   $       

  ,               (           $ 

 )     ,           

$      ,          ,         

              (  ,    % )              *,          % (     % )  #H

   1     



+   !  '             +9B (+  4

9 B >  )+9B                                  

$             

                             4&569&56 456      +  4            

4&56                      

            0         4&56                  $                

               

      ,                   

            +                   ,    

          $             

                   

     $      

H

      

  

+  ! '   +9B        

9                          A        !J6       +9B                  B6290             .   ! !  #.1"&5& &*''.   ! %&$ :"&&&6&:   =.' &.&. %&@!1" $ !!&(( &&&=? % ? &&&%& ? I &.   '.! &:  =? % ? &:  %& !!&&:   ? I &.  1I &.  G5 1"D;'& :"& &!!& &&N( !!(NO ?'N((N?'N(      3      $    +         !'    'D*)$ $           (,(A#D%)       D%)  'D*)$      3-+))%   

  

-7

     

  

 1 %   (,(A#D%)     D%)     B    $      

 EA6   (,(A#D%)F **)KK,(,%*HLHLK'D*)$KD%)K(,(A#D%) $       ,    !'               !'       ,              #

 :  G"!              

   %     !  '     >        F  &   J1!  !!!&   !'            >      &!  +      !'      >   B >       ! %           2           >  B >   J1!! %             #  %  !'                         !'         A      >                              B >     !!!& ! %      3        : &/)&(&*,+D(*% 



  

-

     

  

  #        * &             9    (    ./2  /0)     !'                /                              !' !                       !'9         !'     %           >?N&*(,* JLO?@ !              !'    

   !'    !'          %    

    ! !J1&!   

-@

     

  

 : %()%;(%  #B

   $       !'      P# ! &. . &!     

    !'            ,     !'                        0   !'                +        >D%) &@  >KD%) &@   &                            456        %>D%) &K@    : %*' '(*&,%

    

-G

     

  



  #B#$ >:  @  !  '        8   .  0 &      .= +  >D%)&('@             ! '                 %        !'   >D%)&('@              B      &('            !'   !'                               !'     &('       !'   

    

-H

     

  

#B#3 >: 1  @ + . , 40    !'               A            !'        !'         +  >D%)9, - '@    ) 

       

     EA       (     $   )              #B#7 >:  @ + >D%))&@    0  $     

  ,+D(* /+'4&56            

   P = #12&      



 #B# >:   @ +  >D%)%@     !'        >           >     %  >       !'   

-I

     

  



  (%%+/       !'  

 

    %   >            

   *C) 6,  !'    >    >          >D%)%@   ) ;%* %%%&,   ))&(*&,         $   B >     )                        5   !'          >          #  %   !'                 >     ;%*   

  • •

 >D%)* ,) *C@        %  >?J ,**, #*&A45?@ !   >D%)* ,) *C@        %  >?J ,**, #*/45?@

  +  L>F '  M     0                             0      A                                 >    !  0  0  *     6# 9      

7;

     

  



  #G

   :=!         !'               

   

(      )                     !'9   (   ./  /0)                                  !'       #G#$                   

     !'    !'                      

      %            

              ,     !' 

  

7

     

  







: '& (*&%





 

   

7-

     

  

 ** &+*%,9*)'& (*&  #G#3          .=                   !'

    &('    

  89&8       EA6                    &('    >D%)&('@            #H

    !' 1!"    !              

 %     !'*          1!"  !   !'                      

                        ( (,  )  ))

 



% 



( 

 

5 ( 

  

77

     

  

                 %      $         ,   $       >D%)%@   0        %        !'       >D%)%@   0       ,    &    >D%)%@ 

 0       8

 0      !'     $               ,       0      $             $        %    ,    #

:   

#$

            ,     ,    

        $      1   

   

                                                >   "                       >           3   ,              ,         ,                  ,      

    !2 !. ""1& &!     

      ,  8    !     ,                    ,  D#*     2 !. ""1& &!         !       

8               

7

     

  

&      ,-           >   ,  (  , )   A   5     (A5)    ,  (  , )   * B >   A    0 ,  +     (*BA0+)

       -+'   A5 ,  

   >        

  / 

5  (        )          !            >                

    , (           ,  >  )    

      >        *BA0+,          A5, +,       A5  *BA0+    A5           >     *BA0+                *BA0+8  

       *     F                                                             ,  8    ! ' ( !')  +    %           ',  > %    > %  

                    ',  > %  >  > %  >  %                %           ! '  E    % !'  $                                                 +              $ $  $   $ $ $  $     $     

      (     )           $   (    )   

7:

     

  

                      4&56 $    !             $                   $                 4&56                    #3

                      &' (& %     '  )

       $ $ $  EA(E A      8      E  A    6     EA6)            *EA               % ,    ,       #    EA6     7 K+  #      &'     7 K'  K&' #      $ $ $     7    !  '     %       1  !'                      %    ,                         1                       %     ,                  A        ,        ,       !'       1             !'                %                               

7@

     

  

!     !  '                                >  $            1   '  +  !  5  3       !  (!)   +  &' !  02+3 $ 6     053 $ !        $  $  $  * 3 $                          &'  +   &'                                                                                      !'   2      0               8    &564&56  456             

        #3#$  1       1   +                +    ,           *  ,   (           ,      ) +   3                          8                    0                    ,     3    +      %                   +            3                                9   3           2           %  (         )        %   $                

   3                

7G

     

  

 *,'%,9&* 9( *4)(AD.#% *5#       ,                       !  8 D  !   (    ,  > %  )   &

!   (   , > %  

)               !   5    %    D  !   &

!              %  % **) *                %     $   ,         % &(           >       >      >                 

                               

                      %           * .()*&,  .()*&,             

7H

     

  

#3#3     $        %   &

!   * &

!                              $      &'     (,     )    +     (   )    *            &56         +        (   )       *                    8           

                         

 * *   ,

6   *&

!     D '                                                        5          

                     

7I

     

  

5 &

!                     #             &

!  A     &

!  A       #        #      &'     

FKK7 K'  K  5  ',*  ', ,%*          **) * ;%*  >  **) * %),% >                     **) * ;%*,                      **) * %),%   ,           3     $     #3#7     P  1  2    D    '     &

!        >            &

!  A      $      %            &

!  A     >            3      (     D  ' )

   

;

     

  

   >                 +                           3   !          !  A   8      &

!  A    %   #3#        1  2    D    '     &

!        >            &

!  A     $      %            &

!  A    >             3      (     D  ' )  >                              !         !  A  8       &

!  A   %  



  



      #   •

                      ,            !  A     !  A    >   1    

                           

# +                    &'      F •

$                     ( )



#              > %  !  A        > %  !  A  



 ,               !  A     !  A   >  



$             

   

,- *% % -*  % * (,*&  ',% 9,  (   ;%* 9,   % *Q&  •

        ,'% * % * (%% ' (% * &&* /*,' ,9 *% *            



      ,       D.#% *# * ;%*  D.#% *# * %),%     



      * ;%* * %),% >    ,

   % &(/*,'#



#      '%* ,C /*,'                  

   



      #B

  

   = 

 #B#$     P       &'              EA68     &56 4&56  ( $   ) $    ,  D &569   

*      

     (,/ *#                  4&56         3 #&A1!&!A3 ))!&.LI;B  & ))! LI;B .1"& 1&&3 1&&3 1!3))!! ""'  4 4  ',  D.#% *#**)       **) *          &' *     &' ),%*             D.#% *# *         &'       * (,/ * % **) *     ! **) *     #   *                 

    3       **) * %),%  >          3          ',*      3       %  

  ) %)    ',*             (                   )       +%)   

  

@

     

  

          *             4&56        %   

    **) * %),% >      %),% >  3   (                                                       ,  BGB   (B11!G&&B $&!&)     

%),%  >  3 7    

       

&* &*  >                      *     4&56              ,*  >  3                       * &     $     $                A            4&56          , (    &-   2%   , (    &- 1  1       4&56         9, /    ,            9, /3(*&, K'D*)$K-(,/$     EA6    ,       9, /3/*,'   

       *                    3 ',*   '"$"&!('))****+),---)$'"( ' . I &.& &I;;#@J1!) )' . ./ 5" &() .=',)*",("'.((   

G

     

  

 ?'1&&='!= &1/(!1"(= 1(I;B :1"&() ) ) )5" )./ )'"  ',(/*&-&(*9, /R%(*&,&,A%(,/ ** , *&%-(,/$%)(&9&'&-+#./  

 

   +EA6      * 8 , '!& "      *'K'    ,  &'$    ,(,%*      ,             ,       ,     

  

H

     

  

   %  ,(,%*                                        HLHL     *'                       $    *' H;           ,                 *' H;H;     %         $          $   3           %        EA6                                                           8        ' &.!'  & $                               ?                  *2&*&&1"                  $        #  %   $         ,      H;     + $    ,        ,     $           &56        !       EA6    $ 

          H;   !        H;H;            $      ,     !  '               H;H;  **&)*)(,/(*            !'         $                       !'       

I

     

  

         !'        

 $    + !  # 3+ $     5  3       !  (!)              - 2   2         !5             ( 7-7)    DA *#)(#, K+&'%KDA *"*,/(*K %K7#3#7K+&K                                             DA *"*,/(*"7#3#7 O              $6%!   2%                           , 0                    DA *"*,/(*"7#3#7 #      ,                   : I   I  : I                    ( '8D'A$#7#$)I        

   ( '8DA *"*,/(*"7#3#7)  + 

                 B    (  )      +&DA *"*,/(*"7#3#7

            *         $E14(6% ! )            *,/(*%* *           %  *' H;H;

          $       %  *' H;       %         $        EA6 **)KK,(,%*HLHLK 

  

:;

     

  

                   ,(,%*      $                             

  ,/(*',(/**&,,/)# 4, *%C,9)(,9*- 1,'*&,#5 

             EA6 **)KK$3G#L#L#$HLHLK   ,(,%*     ' $3G#L#L#$           *,/(*%*,)    (  )  ),C&+))&(*&, !'                     $    1  $                    >,   7-7   

:

     

  

+ $       ,               

                                                        $      !  ,$+A        %   $+A                          %     %           $+A                       $              &$ 8            $  8       

  0          $        (,/ *  #     ,          (   )       %        $     $           )     (,9       DA *"*,/(*"7#3#7456             B           

                    3 #&A1!&!A3 ))!&.LI;B .1"&& ))! LI;B .1"& 1&&3 1&&3 1&&3 ))&.LI;B .1"& 1&&  3                            * &                    '"$"&!('))****+),---)$'"( ' . #!!&J1!!*'.  ) )' . ./ 5" &() .=',)*"C("'.((   ;//15!& " &.!!'1"1& )&1/($(& "(5!& "() &1/(!1"(= 1(1"() ))  )5" )./ )'" 

   

::

     

  

   #B#7     P  + &' ),%*                 &56                 #  %     $    ),%*             &56    $   0      ' (   ,) $        ,                                     $       %         ,          %                             "                     $  0        3   ),%*         %  ),%*             #  %                $                             2                $      $                      &56         *                        $  !                  

  

:@

     

  

+   ),%*    *                     $      (,/ *7              %           ', ,%*      ),%*         ',*            ', ,%*                 **) * ;%*          3       >            **) * %),%          3  + ',* ', ,%*   * .()*&,          3         .()*&,                (,/ *7 %),'%*,),%* ;%***(,*&%'*    ". .=',!=!3 " = $!=Q3 " = $!='Q3 " = Q3 1 !!A"=+$&.!I=0 ))!!(!(J1!5"& .=..#! '*!=$&6G%$& 0 &5! "J1!#  "3 #&A1!&!A3 ))!&.LI;B  & ))! LI;B .1"& 1&&3 1&&3 1&&3 ))&.LI;B .1"& 1&&3 1&&3 1&&3 ))./!&5.1"& 1&&3 ))5'  &/!6""&. 5 'G  5  B                   ! !   6      

(**NN  /0@)!   

$      !  ! !    ,                >    &

!      (    %          )             !01         ,   &

!  >         4&56         2       , !       K!01      &

!  >       

@G

     

  

  ". .=',!=!3 " = $!=Q3 " = $!='Q3 " = Q3 " = 1Q3 1 !!!!&=$&.!I=0 = 5& B !&*I !'B 3 ))& 7B ! 1=.& 0 !13 !13 !13 !13 4 ))= &1 !& &. I!!& ))& &&""&..5'& .=..#! '*!=$&6G%$& 0 & &1 J1!#  "3 ))'1!!!!!& ))?  !!!&5&.!&$! I!!&!!!&J1!!!&3 )) .. = 151!!'!!!& !!!&! 13 !&!!?&&;/3 ))./!&5.1"& 1&&3 1&&3 1&&3 1&&3 1&&                      !  * %   * %                 > 

     ,                 *,*.*(,*.*J* *,*.*45O )-#) &*4(,*.*#*&*  /* 4T /&T55?                                %     552               !  * %  >       !  * >     $               "    

G7

     

  

*,'% $# 8    9

A  

 

  

  



          

       3# "  89  A    2       

            %  7#  )8   *9A  !  * %  >         EA6    # +  8    9A  !             %    "                %      2      %  "     B#   : ;  89  A     >        !   +'

        G# : ( 8  ,9A    552           552   , H#  : ;  89A        !  +'          U# " ' *8    9A  A   9    >              $L# *8   *9  A    !               $$#  ' *8   *9A  A   9    >                    $3#  8   *9A  EA6               $7#    8   *9A               !  >     

G

     

  

 $#  * 8   *9A     ,                                      $    

       %  

  

G:

     

  

&99 (+*- *,*.*' *,9& $# !  * % 9                     3# !  *          >                            "  +     "   B16Q          7#  !  * %  >       !  * >  

 $               "  # Q            !  * %   >    L %   M  %                      

 



!                    &56     EA6                       $                  

            *         ,   !     + !       9 &56 (9&56)  #                         (    %  )                             9&56                    #   456&

A    $    $                          '&' '  +!' +!'12 !' *#                *D   (*D)    ./& " *  !  ,              ,(9&56 ) 

  

GG

     

  

C/&(-+%&*%                                           ,                 ,         >                  %                                  ,                %       9                      &*"%&'(,** *&,   *                                             (   

  !  )               &56    (     )                 F       +  0           &56 R +     &56 R 0?   S  S      (+)    (0)    "%&' *&, !       •

            



                           T'&'U      &''B! ,  

  

GH

     

  

,/+&'(&*'%  (,** *&, +>%           

               D  5   %          +>%      #$L    

!   *                       

   !   +     ,                

 EA6           !         !    B      !     ,   

        !  * ))!=    = $!=Q3   = Q3   = $!='Q3 

!=)  I=0 && "3 =?&5&53   . * 4 =$&6G%$&0 !&!!?&&;/3 #&A1!&!A3 & "J1!#  "0 J1!! 13 .5* .3 ))* .'= 1 &'&.!= 4 0 !&!!&.    ,   0          0                     +      *  ( )      *  '   

  *    >      ?   *  ()       ,              F ) 9                               ,(    !  * %  >  )

) !                    ) !                   (     )

  

HG

     

  

                                   



$   ,             K          

    

 AF97* *,6   * @







D ()  A=97*  )  @ 

             

 MMMM  MMMM   

I;

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS SERVLETS

SESSION BEAN What Is a Session Bean? A session bean represents a single client inside the J2EE server. To access an application that is deployed on the server, the client invokes the session bean's methods. The session bean performs work for its client, shielding the client from complexity by executing business tasks inside the server. As its name suggests, a session bean is similar to an interactive session. A session bean is not shared--it may have just one client, in the same way that an interactive session may have just one user. Like an interactive session, a session bean is not persistent. (That is, its data is not saved to a database.) When the client terminates, its session bean appears to terminate and is no longer associated with the client. State Management Modes There are two types of session beans: stateful and stateless. Stateful Session Beans The state of an object consists of the values of its instance variables. In a stateful session bean, the instance variables represent the state of a unique client-bean session. Because the client interacts ("talks") with its bean, this state is often called the conversational state. The state is retained for the duration of the client-bean session. If the client removes the bean or terminates, the session ends and the state disappears. This transient nature of the state is not a problem, however, because when the conversation between the client and the bean ends there is no need to retain the state.

Thangavel Murugan

1

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

Stateless Session Beans A stateless session bean does not maintain a conversational state for a particular client. When a client invokes the method of a stateless bean, the bean's instance variables may contain a state, but only for the duration of the invocation. When the method is finished, the state is no longer retained. Except during method invocation, all instances of a stateless bean are equivalent, allowing the EJB container to assign an instance to any client. Because stateless session beans can support multiple clients, they can offer better scalability for applications that require large numbers of clients. Typically, an application requires fewer stateless session beans than stateful session beans to support the same number of clients. At times, the EJB container may write a stateful session bean to secondary storage. However, stateless session beans are never written to secondary storage. Therefore, stateless beans may offer better performance than stateful beans. When to Use Session Beans In general, you should use a session bean if the following circumstances hold: At any given time, only one client has access to the bean instance. The state of the bean is not persistent, existing only for a short period of time (perhaps a few hours). Stateful session beans are appropriate if any of the following conditions are true: The bean's state represents the interaction between the bean and a specific client. The bean needs to hold information about the client across method invocations. The bean mediates between the client and the other components of the application, presenting a simplified view to the client.

Thangavel Murugan

2

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

Behind the scenes, the bean manages the work flow of several enterprise beans. For an example, see the AccountControllerEJB session bean . To improve performance, you might choose a stateless session bean if it has any of these traits: The bean's state has no data for a specific client. In a single method invocation, the bean performs a generic task for all clients. For example, you might use a stateless session bean to send an e-mail that confirms an online order. The bean fetches from a database a set of read-only data that is often used by clients. Such a bean, for example, could retrieve the table rows that represent the products that are on sale this month. Example: The CartBean Example The CartBean session bean represents a shopping cart in an online bookstore. The bean's client can add a book to the cart, remove a book, or retrieve the cart's contents. To construct CartBean, you need the following code: Session bean class (CartBean) Home interface (CartHome) Remote interface (Cart) All session beans require a session bean class. All enterprise beans that permit remote access must have a home and a remote interface. To meet the needs of a specific application,

an

enterprise

bean

may

also

need

some

helper

classes.

The CartBean session bean uses two helper classes (BookException andIdVerifier) which are discussed in the section Helper Classes. The source code for this example is in the /j2eetutorial14/examples/ejb/cart/ directory.

Thangavel Murugan

3

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

Session Bean Class The session bean class for this example is called CartBean. Like any session bean, the CartBean class must meet these requirements: It implements the SessionBean interface. The class is defined as public. The class cannot be defined as abstract or final. It implements one or more ejbCreate methods. It implements the business methods. It contains a public constructor with no parameters. It must not define the finalize method. The source code for the CartBean class follows. import java.util.*; import javax.ejb.*; public class CartBean implements SessionBean { String customerName; String customerId; Vector contents; public void ejbCreate(String person) throws CreateException { if (person == null) { throw new CreateException("Null person not allowed."); } else { customerName = person; } customerId = "0"; contents = new Vector(); }

Thangavel Murugan

4

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

public void ejbCreate(String person, String id) throws CreateException { if (person == null) { throw new CreateException("Null person not allowed."); } else { customerName = person; } IdVerifier idChecker = new IdVerifier(); if (idChecker.validate(id)) { customerId = id; } else { throw new CreateException("Invalid id: "+ id); } contents = new Vector(); } public void addBook(String title) { contents.addElement(title); } public void removeBook(String title) throws BookException { boolean result = contents.removeElement(title); if (result == false) { throw new BookException(title + "not in cart."); } } public Vector getContents() { return contents; } public CartBean() {} public void ejbRemove() {} public void ejbActivate() {} public void ejbPassivate() {} public void setSessionContext(SessionContext sc) {} }

Thangavel Murugan

5

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

The SessionBean Interface The Session Bean interface extends the Enterprise Bean interface, which in turn extends the Serializable interface. The SessionBean interface declares theejbRemove, ejbActivate, ejbPassivate, and setSessionContext methods. The CartBean class doesn't use these methods, but it must implement them because they're declared in the SessionBean interface.

Consequently,

these

methods

are

empty

in

the CartBean class. Later sections explain when you might use these methods. The ejbCreate Methods Because an enterprise bean runs inside an EJB container, a client cannot directly instantiate the bean. Only the EJB container can instantiate an enterprise bean. During instantiation, the example program performs the following steps. 1. The client invokes a create method on the home object: Cart shoppingCart = home.create("Duke DeEarl","123"); 2. The EJB container instantiates the enterprise bean. 3. The EJB container invokes the appropriate ejbCreate method in CartBean: public void ejbCreate(String person, String id) throws CreateException { if (person == null) { throw new CreateException("Null person not allowed."); } else { customerName = person; } IdVerifier idChecker = new IdVerifier(); if (idChecker.validate(id)) { customerId = id; } else {

Thangavel Murugan

6

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

throw new CreateException("Invalid id: "+ id); } contents = new Vector(); } Typically, an ejbCreate method initializes the state of the enterprise bean. The preceding ejbCreate method,

for

example,

initializes

the customerName

and

customerId variables by using the arguments passed by the create method. An enterprise bean must have one or more ejbCreate methods. The signatures of the methods must meet the following requirements: The access control modifier must be public. The return type must be void. If the bean allows remote access, the arguments must be legal types for the Java Remote Method Invocation (Java RMI) API. The modifier cannot be static or final. The throws clause can include the javax.ejb.CreateException and other exceptions that are

specific

to

your

application.

The ejbCreate method

usually

throws

aCreateException if an input parameter is invalid. Business Methods The primary purpose of a session bean is to run business tasks for the client. The client invokes business methods on the remote object reference that is returned by the create method. From the client's perspective, the business methods appear to run locally, but they actually run remotely in the session bean. The following code snippet shows how the CartClient program invokes the business methods: Cart shoppingCart = home.create("Duke DeEarl", "123"); ... shoppingCart.addBook("The Martian Chronicles"); shoppingCart.removeBook("Alice In Wonderland");

Thangavel Murugan

7

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

bookList = shoppingCart.getContents(); The CartBean class implements the business methods in the following code: public void addBook(String title) { contents.addElement(title); }

public void removeBook(String title) throws BookException { boolean result = contents.removeElement(title); if (result == false) { throw new BookException(title + "not in cart."); } }

public Vector getContents() { return contents; } The signature of a business method must conform to these rules: The method name must not conflict with one defined by the EJB architecture. For example, you cannot call a business method ejbCreate or ejbActivate. The access control modifier must be public. If the bean allows remote access, the arguments and return types must be legal types for the Java RMI API. The modifier must not be static or final. The throws clause can include exceptions that you define for your application. The removeBook method, for example, throws the BookException if the book is not in the cart.

Thangavel Murugan

8

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

To indicate a system-level problem, such as the inability to connect to a database, a business method should throw the javax.ejb.EJBException. When a business method throws an EJBException, the container wraps it in a RemoteException, which is caught by

the

client.

The

container

will

not

wrap

application

exceptions

such

as BookException. Because EJBException is a subclass of RuntimeException, you do not need to include it in the throws clause of the business method. Home Interface A home interface extends the javax.ejb.EJBHome interface. For a session bean, the purpose of the home interface is to define the create methods that a remote client can invoke. The CartClient program, for example, invokes this create method: Cart shoppingCart = home.create("Duke DeEarl", "123"); Every create method in the home interface corresponds to an ejbCreate method in the bean class. The signatures of the ejbCreate methods in the CartBeanclass follow: public void ejbCreate(String person) throws CreateException ... public void ejbCreate(String person, String id) throws CreateException Compare

the ejbCreate signatures

with

those

of

the create methods

in

the CartHome interface: import java.io.Serializable; import java.rmi.RemoteException; import javax.ejb.CreateException; import javax.ejb.EJBHome;

public interface CartHome extends EJBHome { Cart create(String person) throws

Thangavel Murugan

9

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

RemoteException, CreateException; Cart create(String person, String id) throws RemoteException, CreateException; } The signatures of the ejbCreate and create methods are similar, but they differ in important ways. The rules for defining the signatures of the create methods of a home interface follow. The number and types of arguments in a create method must match those of its corresponding ejbCreate method. The arguments and return type of the create method must be valid RMI types. A create method returns the remote interface type of the enterprise bean. (But an ejbCreate method returns void.) The throws clause

of

the create method

must

include

the

java.rmi.RemoteException and the javax.ejb.CreateException. Remote Interface The remote interface, which extends javax.ejb.EJBObject, defines the business methods that a remote client can invoke. Here is the source code for the Cartremote interface: import java.util.*; import javax.ejb.EJBObject; import java.rmi.RemoteException;

public interface Cart extends EJBObject {

public void addBook(String title) throws RemoteException; public void removeBook(String title) throws BookException, RemoteException; public Vector getContents() throws RemoteException; }

Thangavel Murugan

10

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

The method definitions in a remote interface must follow these rules: Each method in the remote interface must match a method implemented in the enterprise bean class. The signatures of the methods in the remote interface must be identical to the signatures of the corresponding methods in the enterprise bean class. The arguments and return values must be valid RMI types. The throws clause must include the java.rmi.RemoteException. Helper Classes The CartBean session bean has two helper classes: BookException and IdVerifier. The BookException is thrown by the removeBook method, and theIdVerifier validates the customerId in one of the ejbCreate methods. Helper classes must reside in the EJB JAR file that contains the enterprise bean class. Building the CartBean Example Now you are ready to compile the remote interface (Cart.java), the home interface (CartHome.java),

the enterprise bean

class (CartBean.java),

the client class

(CartClient.java), and the helper classes (BookException.java and IdVerifier.java). 1. In a terminal window, go to this directory: /j2eetutorial14/examples/ejb/cart/ 2. Type the following command: asant build Creating the Application In this section, you'll create a J2EE application named CartApp, storing it in the file CartApp.ear. 1. In deploytool, select File

New

Application.

2. Click Browse.

Thangavel Murugan

11

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

3. In the file chooser, navigate to /j2eetutorial14/examples/ejb/cart/. 4. In the File Name field, enter CartApp. 5. Click New Application. 6. Click OK. 7. Verify

that

the CartApp.ear file

resides

in /j2eetutorial14/examples/ejb/cart/. Packaging the Enterprise Bean 1. In deploytool, select File

New

Enterprise Bean.

2. In the EJB JAR screen: a. Select Create New JAR Module in Application. b. In the Create New JAR Module in Application field, select CartApp. c. In the JAR Name field, enter CartJAR. d. Click Choose Module File. e. Click Edit Contents. f. Locate the /j2eetutorial14/examples/ejb/cart/build/ directory. g. Select BookException.class, Cart.class, CartBean.class, CartHome.class, and IdVerifier.class. h. Click Add. i. Click OK. j. Click Next. 3. In the General screen: a. In the Enterprise Bean Class field, select CartBean. b. In the Enterprise Bean Name field, enter CartBean. c. In the Enterprise Bean Type field, select Stateful Session. d. In the Remote Home Interface field, select CartHome. e. In the Remote Interface field, select Cart. f. Click Next. 4. Click Finish. Packaging the Application Client

Thangavel Murugan

12

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

To package an application client component, you run the New Application Client wizard of deploytool. During this process the wizard performs the following tasks. Creates the application client's deployment descriptor Puts the deployment descriptor and client files into a JAR file Adds the JAR file to the application's CartApp.ear file To start the New Application Client wizard, select File

New

Application Client. The

wizard displays the following dialog boxes. 1. Introduction dialog box a. Read the explanatory text for an overview of the wizard's features. b. Click Next. 2. JAR File Contents dialog box a. Select the button labeled Create New AppClient Module in Application. b. In the combo box below this button, select CartApp. c. In the AppClient Display Name field, enter CartClient. d. Click Edit Contents. e. In

the

tree

under

Available

Files,

locate

the /j2eetutorial14/examples/ejb/cart/build directory. f. Select CartClient.class. g. Click Add. h. Click OK. i. Click Next. 3. General dialog box a. In the Main Class combo box, select CartClient. b. Click Next. c. Click Finish.

Specifying the Application Client's Enterprise Bean Reference

Thangavel Murugan

13

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

When it invokes the lookup method, the CartClient refers to the home of an enterprise bean: Object objref = initial.lookup("java:comp/env/ejb/SimpleCart"); You specify this reference as follows. 1. In the tree, select CartClient. 2. Select the EJB Ref's tab. 3. Click Add. 4. In the Coded Name field, enter ejb/SimpleCart. 5. In the EJB Type field, select Session. 6. In the Interfaces field, select Remote. 7. In the Home Interface field, enter CartHome. 8. In the Local/Remote Interface field, enter Cart. 9. In the JNDI Name field, select CartBean. 10. Click OK. Deploying the Enterprise Application Now that the J2EE application contains the components, it is ready for deployment. 1. Select CartApp. 2. Select Tools

Deploy.

3. Under Connection Settings, enter the user name and password for the Application Server. 4. Under Application Client Stub Directory, check Return Client Jar. 5. In

the

field

below

the

checkbox

enter /j2eetutorial14/

examples/ejb/cart/. 6. Click OK. 7. In the Distribute Module dialog box, click Close when the deployment completes. 8. Verify the deployment.

Thangavel Murugan

14

WEB TECHNOLOGY

UNIT 4 – ADDITIONAL TOPICS

a. In the tree, expand the Servers node and select the host that is running the Application Server. b. In the Deployed Objects table, make sure that CartApp is listed and that its status is Running. c. Verify that CartAppClient.jar is in /j2eetutorial14/ examples/ ejb/ cart/. Running the Application Client To run the application client, perform the following steps. 1. In

a

terminal

window,

go

to

the /j2eetutorial14/

examples/ejb/cart/ directory. 2. Type the following command: appclient -client CartAppClient.jar 3. In the terminal window, the client displays these lines: The Martian Chronicles 2001 A Space Odyssey The Left Hand of Darkness Caught a BookException: Alice in Wonderland not in cart.

Thangavel Murugan

15

    

  

!"      #$

     

#$

    



   

   

                     

                

!   

      "  #          $%&!     

 '    (

      ) # 

       #             

                               #     

   

    * 

     #      #     #        %%&'&() +

             

 #   #     !# , -     '  #        

    .   #    #           



    

  

*&) ¾

(

    )    ' 0  0          1               2

¾

+

  )      2

¾

 )                      2

¾

(

             #        

¾

              # ( # % # & '#  !              

+ ,-'.) ™ (

     )                 #   

           #         2 ™ "                 

 #                     2 ™ "     

       #        '  #           #   

 1             

    ! ™                  

        #                              

/

     #/

  

    010 

 &2 (,) ''))&-&&3 %     )      

                                 (         (4&      

  4" *           4"         55           #           6        4"  .     (4&#        &&2-&&3(& ',&5-) 7     

    .         $%&    #                         #               $ #          &&&2&55%-&&3    

          #    

       8"#     #              #        9  &2)3& &(     

               #                                    

3

    

  

2 4 

$;       # 9+  

 #

         #         $ #              4%% ( 4#@

LQ       " RS !Q

  

:

    

  

Q "  H0. E) ECC/JJ/J//JE:C-02 *   H- %  *   #00#00!2 " H   " !2 
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF