smart card.doc
TRANSCRIPT
-
8/19/2019 smart card.doc
1/213
Smart Card
-
8/19/2019 smart card.doc
2/213
TABLE OF CONTENTS
S.NO. CONTENTS
1. INTRODUCTION1.1 ORGANIZATION PROFILE1.2 ABSTRACT
2 . SYSTEM ANALYSIS
2.1 EXISTING SYSTEM 2.3 PROPOSED SYSTEM 2.4 REQUIREMENT ANALYSIS 2.5 REQUIREMENT SPECIFICATIONS 2.6 FEASIBILITY STUDY
3. SYSTEM DESIGN3.1 PROJECT MODULES
3.2 DATA DICTIONARY 3.3 DATA FLOW DIAGRAMS
3.4 ER DIAGRAMS3.5 !ARDWARE AND SOFTWARE REQUIRMENTS
4. SYSTEM TESTING5. SOFTWARE TOOLES USED6. TEC!NICLAL NOTES
6.1 INTRODUCTION TO REAL TIME PROGRAMMING6.2 INTRODUCTION TO OOPS AND WINDOWS
6.3 INTRODUCTION TO JA"A#. BIBILOGRAP!Y
-
8/19/2019 smart card.doc
3/213
1. INTRODUCTION
1.1 ABSTRACT
T$% &'()%*+ ,-/ ,+ &'(0-- *('&(',+% -(',+-( ,
$(/&-+, /+,+-/+-*/ *, % 0-%7% - , 7% ( +$% I+%'%+. T$-/I(',+-( -/ +( % -+%',+% -+( +$% %8-/+- 7% &,% ( +$%*(&,9 :+ +$% ,**%// +( -+ 7(: % '%/+'-*+% +( +$% C$,-',, D-'%*+('/ (' ,9 (9 7$( $,/ %% ,:+$('-;% (' '%-/+%':/%'/.
A**('- &,+-%+/ %%/ +$% $(/&-+, ,,%%+ -+'(:*%S,'+ C,' S*$%%/ - F-'/+ P,+-%+ *$((/%/ +$% /,'+ *,'
,**('- +( +$% &,+-%+ '%?:-'%%+= %&%- ( S,'+ *,' &,+-%+ %+ +$% -/*(:+ ( %-*, -. E0%'9 &%'/( 7$( -/7-- +( +,
-
8/19/2019 smart card.doc
4/213
2. SYSTEM ENVIRONMENT
Hardware and Software Se!"f"!at"on#
T$% %0%(&%+ ( +$-/ &'()%*+ %,/ 7-+$ +$% ((7-
%0-'(%+
• !,'7,'% '%?:-'%%+/
• S(+7,'% '%?:-'%%+/
2.1 Hardware Re$%"re&ent#@
. T$% M,:,*+:'- O&+--;,+-( *, % %-*-%+9 ':
( P%+-: /9/+% 7-+$ ,+ %,/+ 12 MB RAM , !,' -/
-
8/19/2019 smart card.doc
5/213
--+-, /%%*+-( :'+$%' /%*:'-+9 -/ %%% +( %+%'-% +$%
%/-',--+9 ( &,'+-*:,' /(+7,'% *(&,'% 7-+$ (+$%' *,-,+%/.
T$-/ /%*+-( -'/+ /:,'-;%/ +$% ,&&-*,+-( '%?:-'%%+ ?:%/+-(
, +$% /:%/+/ ('% %+,-% *(&,'-/(/.
• O&%',+- S9/+% W-(7/
5NT2
• B'(7/%' IE
• W%A&&-*,+-( S%'0%' J,0,= W%
S%'0%'2.= T(*,+5.
• D,+,,/% S%'0%' O',*%
• D,+,,/% C(%*+-0-+9 JDBC
• O+$%' T((/ H T%*$((-%/ J,0, JD=
S%'0%+/ JSD= !TML.
-
8/19/2019 smart card.doc
6/213
(.)RO*ECTDESCRI)TION
A**('- +( C:/+(%' R%?:-'%%+/ +$%
*:/+(%' *$((/% *,'.
D:'- +$% *,' 0,--+9 &%'-(= - +$% *:/+(%' )(-% +$% $(/&-+,=
+$% *:/+(%' %+/ +$% -/*(:+ ( +$% +(+, !(/&-+, -= %&%-
( +$% *,' -/*(:+. T$% $(/&-+, :/+ % +-% :& 7-+$ +$% !(/&-+,
G'(:&.I +$% !(/&-+, (+ +-% :& 7-+$ +$% !(/&-+, G'(:&= +$% &,+-%+ (
(+ %+ +$% ,9 D-/*(:+. C:/+(%' %+/ +$% -/*(:+ I +$% *,' -/
0,-.
MODULES
C$,-',
B',*$ M,,%'
MODULE DESCRI)TION
C+a"r&an Mod%,e'
I +$-/ S9/+% C$,-', -/ +$% /:&%' U/%'. T$% ,*+-0-+9 ( +$%*$,-', -/ +( *'%,+% , N%7 B',*$ - -%'%+ (*,+-(/%&%- ( '%?:-'%%+. A ,/( ,//- , N%7 B',*$M,,%' +( N%7 B',*$.
-
8/19/2019 smart card.doc
7/213
A**('- +( R%?:-'%%+/ C$,-', %%',+% , N%7 !%,+$C,' , ,/( %-% C,' S&%*--*,+-(/ -.%. *,' :%'= *,',%= G'(:& *,&,*-+9= 0,--+9= D-/*(:+= ,(:+.
C$,-', $,/ , *,&,*-+9 +( '%(0% , B',*$ M,,%' ,,/( (-9 +$% *,' /&%*--*,+-(/.
C$,-', +( /%% +$% '%&('+/ ,/% ( +$% ',*$= /+,+%= *,'= ,-/+'-*+ 7-/%. T$%/% '%&('+/ $%&: +( -&'(0% $-/ :/-%//.
T$% M,- R(%/ ( +$% C$,-', ,'%@
• C'%,+% , N%7 B',*$ A//- , B',*$ M,,%'
• G%%',+% , %7 T9&% ( !%,+$ C,'
• A//-- ( !%,+$ C,' S&%*--*,+-(/
S%- Mod%,e#@
Bran!+@
A**('- '%?:-'%%+ +$% !(/&-+, G'(:& ,:*$ ,B',*$%/ - -%'%+ P,*%/ -.%. -/-% A$', P',%/$ , ,/( ,(:+/-% A$', P',%/$.
A ,/( ,//- , B',*$ M,,%' +( N%7 B',*$. C$,-',
%+%'/ +$% , +$% %+,-/ ( B',*$ M,,%' - ,+,,/% +$'(:$/9/+%. M,-9 M,,%' N,%= F,+$%'/ ,%= P%',%+A'%//= T%%&$(% :%'= %,- ,'%//. T$%/% +9&%/ ( -(',+-( %+%' -+( D,+, B,/% 9 +$% C$,-',. A+%' +$,+= +$%C$,-', -0%/ +( M,,%' $-/ :/%',% , &,//7('. M,,%'/
-
8/19/2019 smart card.doc
8/213
(- +( /9/+% 7-+$ +$%-' :/%',% , &,//7('. T$-/ +9&% ( A:+$%+-*,+-( I(',+-( 7- % -0% +( M,,%'/ 9 C$,-',.
T$% *$,-', $,/ : &'-0-%%/ ( M,,%'/= -.%. +',/%'/
+( ,,%'/ +( ,(+$%' &,*%/= '%(0% +$% M,,%'/= - , M,,%' *$,% $-/ &$(% :%'= +$% *$,-', $,/ , &'-0-%% +( :&,+%$-/ %+,-/.
Card@
T$% C$,-', %-% +$% *,' /&%*--*,+-(/= -.%. C,'
N,%= C,' N:%'= G'(:& L--+= T-% :',+-(= D-/*(:+=A(:+. T$%/% +9&%/ ( /&%*-,+-( (9 %-% 9 C$,-', C,':%' -/ %%',+% 9,-*,9. !%'% G'(:& --+ /&%*--*,+-(%,/ +$,+ ,8-: :%' ( '%-/+',+-(/ &%' C,' %&%-( +$% +9&% ( +$% *,'.
A9 (--*,+-(/ '%,'- +( *,' /&%*--*,+-(/= +$%*$,-', (9 +$% &%'/( (--% +$% *,' /&%*--*,+-(/.A**('- +( +$% '%?:-'%%+= +$% *$,-', %%',+%/ +$% %7*,'/ , ,/( %-%/ +$% /&%*--*,+-(/.
T$% *$,-', $,/ , ,:+$('-+9 +( %%+% +$% *,' (' (--*,+-(/ ( *,' /&%*--*,+-(/ %&%- ( '%?:-'%%+.
T$% /,'+ *,' 0,:% %-% 9 +$% C$,-', T$% *:/+(%' :/+ $,0% +( &,9 : *,' ,(:+. I :+:'%= +$% *:/+(%' 7-/:%' ,9 -/%,/%= +$% +$% *:/+(%' 7- )(- ,9 !(/&-+,
%(/ +( !(/&-+,/ G'(:&= +$% *:/+(%' 7- %+ -/*(:+ ( +(+,!(/&-+, B-.
-
8/19/2019 smart card.doc
9/213
T$%/% +9&%/ ( /,'+ *,'/ ,'% 0%'9 $%&: +( *:/+(%'/.O*% C:/+(%' %+ , /,'+ *,'= +$% +$% *:/+(%' %+ -/*(:+ ( ,9 !(/&-+,= +$,+ $(/&-+, %(/ +( !(/&-+, G'(:&.
T$% *:/+(%' '%-/+%'/ ,9 (% ( B',*$= , +$% *:/+(%' 7- %+ -/*(:+ ,9 !(/&-+,. !%'% +$% , ',*$%/ 7- /$,'%,+,,/%.
O*% *:/+(%'/ '%-/+%' +$%-' '%-/+',+-(= +$%'% -/ ( 7,9 (*,*%,+-( ( +$%-' '%-/+',+-( ,9 *-'*:/+,*%/.
2. Bran!+ Manaer' /
B',*$ M,,%' -/ +$% $%, ( +$% B',*$= ,//-% 9 +$%C$,-',. B',*$ M,,%' +,
-
8/19/2019 smart card.doc
10/213
• M(-9 +$% C:/+(%' D%+,-/ I '%?:-'%
S: M(:%/@
E?:-'9@
I +$-/ M(:%= B',*$ M,,%' -'/+ %+%'/ +$% *:/+(%'
%+,-/= (' :+:'% *(''%/&(%*% , ,/( %/+-,+%/ +$%
/+,+-*/ ( :/-%//.
R%-/+',+-(@
E0%'9 B',*$ $,/ , (% B',*$ M,,%'. B',*$ M,,%' $,/ , S:&%'-(' ( +$% B',*$. B',*$ ,,%' '%-/+%' +$%
*:/+(%' %+,-/.
0. SOFTARES)ECIFICATION
0.1 FRONTEND
OVERVIE OF *AVA TECHNOLOY
HISTORY OF *AVA
J,0, ,:,% 7,/ %0%(&% 9 J,%/ G(/- , $-/ +%, ,+
/: -*'( /9/+%/ , '%%,/% (',9 - 15. I+/ ('%' ,%
-/ (,
-
8/19/2019 smart card.doc
11/213
-+%'&'%+% , , *(&-% ,:,% . ),0, &'(',/ ,'% *(&-%
9 +$% ),0, *(&-%' -+( B9+% C(%/ 7$-*$ ,'% /%*:'% ,
&('+,% ,*'(// -%'%+ &,+('/ . +$%/% 9+% *(%/ ,'%
%//%+-,9 -/+':*+-(/ %*,&/:,+% - /-% +9&%= +( 7$,+ -/
-
8/19/2019 smart card.doc
12/213
• J,0, /:&&('+/ :+-+$'%,-. T$%'% (' -%'%+ &,'+/
( +$% &'(', *, % %8%*:+% ,+ +$% /,% +-%
*AVA AND INTERNET
J,0, -/ /+'(9 ,//(*-,+% 7-+$ -+%'%+ ,
-
8/19/2019 smart card.doc
13/213
': , ),0, &'(', ( '%(+% ,*$-% (0%' -+%'%+ 7-+$ +$%
/:&&('+ ( 7%.
*AVA ENVIRONMENT
J,0, %0-'(%+ -*:%/ , ,'% (. ( +((/ 7$-*$ ,'% &,'+
( +$% /9/+%
-
8/19/2019 smart card.doc
14/213
,*$-% , -+%'&'%+% , (+$%' ,*$-%/. T$-/ ,*$-% -/ *,%
),0, 0-'+:, ,*$-%.
)ARADIM OF *AVA
• D9,-* (7 (,- ,&&%+//, ,&&-*,+-(
&'(',/K
• E--,+-( ( ,+7,'% &$%(%( +$,+ -/ &'(0--
+$(/% %,+:'%/ ( , &'(:*+ +$,+ :/%' %%/ ,+ , +-%.
T$% '%,-- %,+:'%/ ( , &'(:*+ *, '%,- - +$%
/%'0%'.
• C$,- %*((-* (% ( +$% /(+7,'%
• U&+(,+% /(+7,'% ,0,-,--+9
• S:&&('+/ %+7('< %+-'% *(&:+-
• S:&&('+/ CORBA H DCOM
ABOUT HTML
!TML $9&%' +%8+ ,'
-
8/19/2019 smart card.doc
15/213
,:,% (' %/*'-- /+':*+:'% (*:%+/. !TML -/ , &,+('
-%&%%+. WWW W(' W-% W% &,%/ ,'% 7'-++% :/-
!TML. !TML +,/ *(+'( - &,'+ +$% '%&'%/%+,+-( ( +$% WWW
&,% 7$% 0-%7 7-+$ 7% '(7/%'. T$% '(7/%' -+%'&'%+/ !TML
+,/ - +$% 7% (*:%+ , -/&,9/ -+. D-%'%+ '(7/%'/ /$(7
,+, -%'%+9. E8,&%/ ( '(7/%'/ :/% +( % 7% &,%/
-*:%@
• N%+/*,&%
• I+%'%+ E8&('%'
*AVA SCRI)T
J,0, /*'-&+ -/ , %%', &:'&(/%= &'(+(+9&% ,/% = ()%*+
('-%+% /*'-&+- ,:,% %0%(&% )(-+9 9 /: , N%+/*,&%
, -/ %,+ (' +$% WWW . I+ -/ %/-% +( % %%% -
-0%'/% ,&&-*,+-(/ , /9/+%/= 7-+$ (:+ *(/:- :*$
%('9. ),0, /*'-&+ (''(7/ (/+ ( -+/ /9+,8 '( ),0, :+ ,/(
-$%'-+/ '( ,7< , &%' = 7-+$ /(% --'%*+ -:%*% '( /%
- -+/ ()%*+ &'(+(+9&% /9/+%.
J,0, /*'-&+/ 9,-*,9 +9&% +$,+ -/ &'(',/ ((+ %*,'%
0,'-,% +9&%/= , +$% +9&% ( 0,'-,% -/ :'%/+'-*+% , *,
*$,% ,+ ':+-%. S(:'*% *, % %%',+% ,+ ': +-% ,
%0,:,+% ,,-/+ , ,'-+','9 /*(&%. T9&-*, -&%%+,+-(/
-
8/19/2019 smart card.doc
16/213
*(&-% 9 +',/,+- /(:'*% -+( , /&%*--% 9+% *(% (',+= +(
*$%*< /9+,8 , /(:'*% *(/-/+%*9. N(+% +$,+ +$% ,0,-,--+9 +(
%%',+% , -+%'&',+% &'(',/ ,+ ':+-% -&-%/ +$% &'%/%*%
( , *(&-%' ,+ ':+-%.
J,0, /*'-&+ -/ , $-$ %0% /*'-&+- ,:,% +$,+ (%/ (+
%&% ( (' %8&(/% &,'+-*:,' ,*$-% '%&'%/%+,+-(/ ('
(&%',+- /9/+% /%'0-*%/. I+ &'(0-%/ ,:+(,+-* /+(',%
,,%%+= +9&-*,9 :/- , ,',% *(%*+('.
FEATURES'
• J,0, /*'-&+ -/ %%% -+( !TML (*:%+/ , -/
%8%*:+% 7-+$ - +$%.
• J,0, /*'-&+ -/ '(7/%' %&%%+
• J,0,/*'-&+ -/ , -+%'&'%+% ,:,% +$,+ *, %
-+%'&'%+% 9 +$% '(7/%' ,+ ': +-% .
• J,0, /*'-&+ -/ ((/%9 +9&% ,:,%
• J,0, /*'-&+ -/ , ()%*+ ,/% ,:,%.
• J,0, /*'-&+ -/ , E%+D'-0% ,:,% , /:&&('+/
%0%+ $,%'/ +( /&%*-9 +$% :*+-(,-+9 ( , :++(.
ADVANTAES
1. ),0, /*'-&+ *, % :/% (' *-%+ /-% ,&&-*,+-(
-
8/19/2019 smart card.doc
17/213
2. ),0, /*'-&+ &'(0-%/ %,/ +( *(+,- :+-',%
7-(7/ (' &'%/%+,+-( ( +$% 7%.
3. ),0, /*'-&+ &'(0-%/ ,/-* ,+, 0,-,+-( %('% -+
-/ /%+ +( +$% /%'0%'. E @ (- , &,//7('
*$%*
-
8/19/2019 smart card.doc
18/213
&:,% $%&%' 9+%*(% ()%*+/ ( +$% /%'0%' /-% +$,+ *, %
:/% +( 9,-*,9 %8+% /%'0%'/-% :*+-(,-+9.
+at "# a Ser3,et4
S%'0%+/ ,'% (:%/ +$,+ %8+% '%?:%/+'%/&(/%('-%+% /%'0%'/=
/:*$ ,/ J,0,%,% 7% /%'0%'/. F(' %8,&%= , /%'0%+ -$+ %
'%/&(/-% (' +,
-
8/19/2019 smart card.doc
19/213
U#e Ser3,et# "n#tead of CI S!r"t#5
S%'0%+/ ,'% , %%*+-0% '%&,*%%+ (' CGI /*'-&+/. T$%9 &'(0-%
, 7,9 +( %%',+% 9,-* (*:%+/ +$,+ -/ (+$ %,/-%' +( 7'-+%
, ,/+%' +( ':. S%'0%+/ ,/( ,'%// +$% &'(% ( (-
/%'0%'/-% &'(',- 7-+$ &,+('/&%*--* API/@ +$%9 ,'%
%0%(&% 7-+$ +$% J,0, S%'0%+ API= , /+,,' J,0, %8+%/-(.
S( :/% /%'0%+/ +( $,% !TTP *-%+ '%?:%/+/. F(' %8,&%= $,0%
/%'0%+/ &'(*%// ,+, P(/+% (0%' !TTPS :/- , !TML ('=
-*:- &:'*$,/% ('%' (' *'%-+ *,' ,+,. A /%'0%+ -
-
8/19/2019 smart card.doc
20/213
(, ,( /%0%', /%'0%'/ +$,+ -''(' +$% /,% *(+%+= ,
+( &,'+-+-( , /-% (-*, /%'0-*% (0%' /%0%', /%'0%'/=
,**('- +( +,/< +9&% (' (',-;,+-(, (:,'-%/.
A'*$-+%*+:'% ( +$% S%'0%+ P,*
-
8/19/2019 smart card.doc
21/213
T$% S%'0%+ -+%',*% %*,'%/= :+ (%/ (+ -&%%+= %+$(/
+$,+ ,,% +$% /%'0%+ , -+/ *(:-*,+-(/ 7-+$ *-%+/.
S%'0%+ 7'-+%'/ &'(0-% /(% (' , ( +$%/% %+$(/ 7$%
%0%(&- , /%'0%+.
C,"ent Intera!t"on
W$% , /%'0%+ ,**%&+/ , *, '( , *-%+= -+ '%*%-0%/ +7( ()%*+/@
• A S%'0%+R%?:%/+= 7$-*$ %*,&/:,+%/ +$% *(:-*,+-(
'( +$% *-%+ +( +$% /%'0%'.
• A S%'0%+R%/&(/%= 7$-*$ %*,&/:,+%/ +$% *(:-*,+-(
'( +$% /%'0%+ ,*< +( +$% *-%+.
S%'0%+R%?:%/+ , S%'0%+R%/&(/% ,'% -+%',*%/ %-% 9 +$%
),0,8./%'0%+ &,*
-
8/19/2019 smart card.doc
22/213
• T$% -&:+ /+'%,= S%'0%+I&:+S+'%,. S%'0%+/ :/% +$% -&:+
/+'%, +( %+ ,+, '( *-%+/ +$,+ :/% ,&&-*,+-( &'(+(*(/
/:*$ ,/ +$% !TTP POST , PUT %+$(/.
I+%',*%/ +$,+ %8+% S%'0%+R%?:%/+ -+%',*% ,(7 +$% /%'0%+ +(
'%+'-%0% ('% &'(+(*(/&%*--* ,+,. F(' %8,&%= +$%
!++&S%'0%+R%?:%/+ -+%',*% *(+,-/ %+$(/ (' ,**%//-
!TTP/&%*--* $%,%' -(',+-(.
T+e Ser3,etRe#on#e Interfa!e
T$% S%'0%+R%/&(/% -+%',*% -0%/ +$% /%'0%+ %+$(/ ('
'%&9- +( +$% *-%+. I+@
A(7/ +$% /%'0%+ +( /%+ +$% *(+%+ %+$ , MIME +9&% ( +$%
'%&9.
• P'(0-%/ , (:+&:+ /+'%,= S%'0%+O:+&:+S+'%,= , ,
W'-+%' +$'(:$ 7$-*$ +$% /%'0%+ *, /% +$% '%&9 ,+,.
I+%',*%/ +$,+ %8+% +$% S%'0%+R%/&(/% -+%',*% -0% +$%
/%'0%+ ('% &'(+(*(/&%*--* *,&,--+-%/. F(' %8,&%= +$%
!++&S%'0%+R%/&(/% -+%',*% *(+,-/ %+$(/ +$,+ ,(7 +$%/%'0%+ +( ,-&:,+% !TTP/&%*--* $%,%' -(',+-(.
-
8/19/2019 smart card.doc
23/213
Add"t"ona, Caa-","t"e# of HTT) Ser3,et#
T$% *,//%/ , -+%',*%/ %/*'-% ,(0% ,
-
8/19/2019 smart card.doc
24/213
o T$% :/%'/ '%?:%/+ -/ '%&'%/%+% 9 ,
!++&S%'0%+R%?:%/+ ()%*+.
o T$% '%/&(/% +( +$% :/%' -/ '%&'%/%+% 9 ,
!++&S%'0%+R%/&(/% ()%*+.
o B%*,:/% +%8+ ,+, -/ '%+:'% +( +$% *-%+= +$% '%&9 -/
/%+ :/- +$% W'-+%' ()%*+ (+,-% '( +$%
!++&S%'0%+R%/&(/% ()%*+.
Ser3,et L"fe!6!,e
E,*$ /%'0%+ $,/ +$% /,% -% *9*%@
• A /%'0%' (,/ , --+-,-;%/ +$% /%'0%+
• T$% /%'0%+ $,%/ ;%'( (' ('% *-%+ '%?:%/+/
• T$% /%'0%' '%(0%/ +$% /%'0%+
-
8/19/2019 smart card.doc
25/213
In"t"a,"7"n a Ser3,et
W$% , /%'0%' (,/ , /%'0%+= +$% /%'0%' ':/ +$% /%'0%+/ --+
%+$(. I-+-,-;,+-( *(&%+%/ %('% *-%+ '%?:%/+/ ,'% $,%
, %('% +$% /%'0%+ -/ %/+'(9%.
E0% +$(:$ (/+ /%'0%+/ ,'% ': - :+-+$'%,% /%'0%'/=
/%'0%+/ $,0% ( *(*:''%*9 -//:%/ :'- /%'0%+ --+-,-;,+-(.
T$% /%'0%' *,/ +$% --+ %+$( (*%= 7$% +$% /%'0%' (,/ +$%
/%'0%+= , 7- (+ *, +$% --+ %+$( ,,- :%// +$% /%'0%' -/
'%(,- +$% /%'0%+. T$% /%'0%' *, (+ '%(, , /%'0%+ :+- ,+%'
+$% /%'0%' $,/ %/+'(9% +$% /%'0%+ 9 *,- +$% %/+'(9 %+$(.
T+e "n"t Met+od
T$% --+ %+$( &'(0-% 9 +$% !++&S%'0%+ *,// --+-,-;%/ +$%
/%'0%+ , (/ +$% --+-,-;,+-(. T( ( --+-,-;,+-( /&%*--* +(
-
8/19/2019 smart card.doc
26/213
9(:' /%'0%+= (0%''-% +$% --+ %+$( ((7- +$%/% ':%/@
• I , --+-,-;,+-( %''(' (**:'/ +$,+ '%%'/ +$% /%'0%+
-*,&,% ( $,- *-%+ '%?:%/+/= +$'(7 ,
U,0,-,%E8*%&+-(.
A %8,&% ( +$-/ +9&% ( %''(' -/ +$% -,--+9 +( %/+,-/$ ,
'%?:-'% %+7('< *(%*+-(.
D( (+ *, +$% S9/+%.%8-+ %+$(
In"t"a,"7at"on )ara&eter#
T$% /%*( 0%'/-( ( +$% --+ %+$( *,/ +$% %+I-+P,',%+%'
%+$(. T$-/ %+$( +,
-
8/19/2019 smart card.doc
27/213
I= (' /(% '%,/(= 9(: %% +( %+ +$% &,',%+%' ,%/= :/% +$%
%+P,',%+%'N,%/ %+$(.
De#tro6"n a Ser3,et
S%'0%+/ ': :+- +$% /%'0%' ,'% %/+'(9/ +$%= (' %8,&% ,+ +$%
'%?:%/+ ( , /9/+% ,--/+',+('. W$% , /%'0%' %/+'(9/ , /%'0%+=
+$% /%'0%' ':/ +$% /%'0%+/ %/+'(9 %+$(. T$% %+$( -/ ':
(*%K +$% /%'0%' 7- (+ ': +$,+ /%'0%+ ,,- :+- ,+%' +$% /%'0%'
'%(,/ , '%--+-,-;%/ +$% /%'0%+.
W$% +$% %/+'(9 %+$( ':/= ,(+$%' +$'%, -$+ % ':- ,
/%'0-*% '%?:%/+. T$% !,- S%'0-*% T$'%,/ ,+ S%'0%+
T%'-,+-( /%*+-( /$(7/ 9(: $(7 +( &'(0-% , *%, /$:+(7
7$% +$%'% *(: % (':- +$'%,/ /+- ':- /%'0-*%'%?:%/+/.
U#"n t+e De#tro6 Met+od
T$% %/+'(9 %+$( &'(0-% 9 +$% !++&S%'0%+ *,// %/+'(9/ +$%
/%'0%+ , (/ +$% %/+':*+-(. T( %/+'(9 ,9 '%/(:'*%/ /&%*--*
+( 9(:' /%'0%+= (0%''-% +$% %/+'(9 %+$(. T$% %/+'(9 %+$(
/$(: :( ,9 --+-,-;,+-( 7('< , /9*$'(-;% &%'/-/+%+
/+,+% 7-+$ +$% *:''%+ -%('9 /+,+%.
-
8/19/2019 smart card.doc
28/213
T$% ((7- %8,&% /$(7/ +$% %/+'(9 %+$( +$,+
,**(&,-%/ +$% --+ %+$( /$(7 &'%0-(:/9@
&:-* *,// B((
-
8/19/2019 smart card.doc
29/213
Hand,"n Ser3"!e T+read# at Ser3,et Ter&"nat"on
A ( , /%'0%+/ /%'0-*% %+$(/ /$(: % *(&%+% 7$% ,
/%'0%+ -/ '%(0%. T$% /%'0%' +'-%/ +( %/:'% +$-/ 9 *,- +$%
%/+'(9 %+$( (9 ,+%' , /%'0-*% '%?:%/+/ $,0% '%+:'%= ('
,+%' , /%'0%'/&%*--* ',*% &%'-(= 7$-*$%0%' *(%/ -'/+. I 9(:'
/%'0%+ $,/ (&%',+-(/ +$,+ +,
-
8/19/2019 smart card.doc
30/213
'%+:'.
Tra!:"n Ser3"!e Re$%e#t#
T( +',*< /%'0-*% '%?:%/+/= -*:% , -% - 9(:' /%'0%+
*,// +$,+ *(:+/ +$% :%' ( /%'0-*% %+$(/ +$,+ ,'%
':-. T$% -% /$(: $,0% ,**%// %+$(/ +(
-*'%%+= %*'%%+= , '%+:' -+/ 0,:%.
T$% /%'0-*% %+$( /$(: -*'%%+ +$% /%'0-*% *(:+%' %,*$ +-%
+$% %+$( -/ %+%'% , %*'%%+ +$% *(:+%' %,*$ +-% +$%
%+$( '%+:'/. T$-/ -/ (% ( +$% %7 +-%/ +$,+ 9(:' !++&S%'0%+
/:*,// /$(: (0%''-% +$% /%'0-*% %+$(. T$% %7 %+$(
/$(: *, /:&%'./%'0-*% +( &'%/%'0% , +$% ('--,
!++&S%'0%+./%'0-*% %+$(/ :*+-(,-+9.
)ro3"d"n a C,ean S+%tdown
T( &'(0-% , *%, /$:+(7= 9(:' %/+'(9 %+$(
/$(: (+ %/+'(9 ,9 /$,'% '%/(:'*%/ :+- , +$%
/%'0-*% '%?:%/+/ $,0% *(&%+%. O% &,'+ ( (- +$-/
-/ +( *$%*< +$% /%'0-*% *(:+%'. A(+$%' &,'+ -/ +( (+-9
-
8/19/2019 smart card.doc
31/213
+$% (':- %+$(/ +$,+ -+ -/ +-% +( /$:+ (7.
F(' +$-/= ,(+$%' -% -/ '%?:-'% ,( 7-+$ +$% :/:,
,**%// %+$(/.
Creat"n )o,"te Lon/r%nn"n Met+od#
T+e f"na, #te "n ro3"d"n a !,ean #+%tdown "# to &a:e an6
,on/r%nn"n &et+od# -e+a3e o,"te,6. Met+od# t+at &"+t
r%n for a ,on t"&e #+o%,d !+e!: t+e 3a,%e of t+e f"e,d t+at
not"f"e# t+e& of #+%t down#; and "nterr%t t+e"r wor: "f ne!ee#ar6.
Ser3,et/!,"ent Intera!t"on
Hand,"n HTT) C,"ent#
A !TTP S%'0%+ $,%/ *-%+ '%?:%/+/ +$'(:$ -+/ /%'0-*%
%+$(. T$% /%'0-*% %+$( /:&&('+/ /+,,' !TTP *-%+
'%?:%/+/ 9 -/&,+*$- %,*$ '%?:%/+ +( , %+$( %/-% +(
$,% +$,+ '%?:%/+. F(' %8,&%= +$% /%'0-*% %+$( *,/ +$%
(G%+ %+$( /$(7 %,'-%' - +$% /-&% %8,&% /%'0%+.
Re$%e#t# and Re#on#e#
M%+$(/ - +$% !++&S%'0%+ *,// +$,+ $,% *-%+ '%?:%/+/ +,
-
8/19/2019 smart card.doc
32/213
1.A !++&S%'0%+R%?:%/+ ()%*+= 7$-*$ %*,&/:,+%/ +$% ,+,
from +$% *-%+
2.A !++&S%'0%+R%/&(/% ()%*+= 7$-*$ %*,&/:,+%/ +$%
'%/&(/% to +$% *-%+
HttSer3,etRe$%e#t O-
-
8/19/2019 smart card.doc
33/213
• F(' !TTP GET '%?:%/+/= +$% %+Q:%'9S+'- %+$( '%+:'/
, S+'- ( ',7 ,+, '( +$% *-%+. Y(: :/+ &,'/% +$-/ ,+,
9(:'/% +( (+,- +$% &,',%+%'/ , 0,:%/.
• F(' !TTP POST= PUT= , DELETE '%?:%/+/=
o I 9(: %8&%*+ +%8+ ,+,= +$% %+R%,%' %+$( '%+:'/ ,
B:%'%R%,%' (' 9(: +( :/% +( '%, +$% ',7 ,+,.
o I 9(: %8&%*+ -,'9 ,+,= +$% %+I&:+S+'%, %+$(
'%+:'/ , S%'0%+I&:+S+'%, (' 9(: +( :/% +( '%, +$%
',7 ,+,
Note' U/% either , %+P,',%+%'",:%/ %+$( or (%
( +$% %+$(/ +$,+ ,(7 9(: +( &,'/% +$% ,+, 9(:'/%.
T$%9 *, (+ % :/% +(%+$%' - , /-% '%?:%/+.
HttSer3,etRe#on#e O-
-
8/19/2019 smart card.doc
34/213
• T$% %+W'-+%' %+$( '%+:'/ , W'-+%'
• T$% %+O:+&:+S+'%, %+$( '%+:'/ , S%'0%+O:+&:+S+'%,
U/% +$% %+W'-+%' %+$( +( '%+:' +%8+ ,+, +( +$% :/%'= , +$%
%+O:+&:+S+'%, %+$( (' -,'9 ,+,.
C(/- +$% W'-+%' (' S%'0%+O:+&:+S+'%, ,+%' 9(: /% +$%
'%/&(/% ,(7/ +$% /%'0%' +(
-
8/19/2019 smart card.doc
35/213
• (G%+= (' $,- GET= *(-+-(, GET= , !EAD
'%?:%/+/
• (P(/+= (' $,- POST '%?:%/+/
• (P:+= (' $,- PUT '%?:%/+/
• (D%%+%= (' $,- DELETE '%?:%/+/
B9 %,:+= +$%/% %+$(/ '%+:' , BADREQUEST 4 %''('.
Y(:' /%'0%+ /$(: (0%''-% +$% %+$( (' %+$(/ %/-% +(
$,% +$% !TTP -+%',*+-(/ +$,+ -+ /:&&('+/. T$-/ /%*+-( /$(7/
9(: $(7 +( -&%%+ %+$(/ +$,+ $,% +$% (/+ *((
!TTP '%?:%/+/@ GET , POST.
T$% !++&S%'0%+/ /%'0-*% %+$( ,/( *,/ +$% (O&+-(/ %+$(
7$% +$% /%'0%+ '%*%-0%/ , OPTIONS '%?:%/+= , (T',*% 7$%
+$% /%'0%+ '%*%-0%/ , TRACE '%?:%/+. T$% %,:+ -&%%+,+-(
( (O&+-(/ ,:+(,+-*,9 %+%'-%/ 7$,+ !TTP (&+-(/ ,'%
/:&&('+% , '%+:'/ +$,+ -(',+-(. T$% %,:+ -&%%+,+-(( (T',*% *,:/%/ , '%/&(/% 7-+$ , %//,% *(+,-- , ( +$%
$%,%'/ /%+ - +$% +',*% '%?:%/+. T$%/% %+$(/ ,'% (+ +9&-*,9
(0%''-%.
-
8/19/2019 smart card.doc
36/213
Ser3,et De#!r"t"on#
I ,-+-( +( $,- !TTP *-%+ '%?:%/+/= /(% ,&&-*,+-(/=
/:*$ ,/ +$% J,0, W% S%'0%'/ A--/+',+-( T((= %+ %/*'-&+-0%
-(',+-( '( +$% /%'0%+ , -/&,9 -+. T$% /%'0%+ %/*'-&+-(
-/ , /+'- +$,+ *, %/*'-% +$% &:'&(/% ( +$% /%'0%+= -+/ ,:+$('= -+/
0%'/-( :%'= (' 7$,+%0%' +$% /%'0%+ ,:+$(' %%/ -&('+,+.
T$% %+$( +$,+ '%+:'/ +$-/ -(',+-( -/ %+S%'0%+I(= 7$-*$
'%+:'/ : 9 %,:+. Y(: ,'% (+ '%?:-'% +( (0%''-% +$-/
%+$(= :+ ,&&-*,+-(/ ,'% :,% +( /:&&9 , %/*'-&+-( ( 9(:'
/%'0%+ :%// 9(: (.
r"t"n Yo%r F"r#t Ser3,et
S%'0%+/ ,'% ,/( %,/9 +( %0%(&. T$-/ (*:%+ -/*://%/ +$%
((7- --: /+%&/ %%% +( *'%,+% ,9 /%'0%+@
1. W'-+% +$% /%'0%+
a. I&('+ +$% %*%//,'9 J,0, &,*
-
8/19/2019 smart card.doc
37/213
a. M,
-
8/19/2019 smart card.doc
38/213
+$'(:$ +$% /-+%. S%'0%'/-% ,&&-*,+-(/ *, :/% +$-/ ,*--+9 +(
*'%,+% ('% /+,+%: :/%' %8&%'-%*%/ , +( +',*< 7$(/ (- 7$,+
( +$% /-+%.
J,0, W% S%'0%' ,-+,-/ :/%' /+,+% 9 *'%,+- , S%//-( ()%*+
(' %,*$ :/%' ( +$% /-+%. T$%/% S%//-( ()%*+/ ,'% /+('% ,
,-+,-% ( +$% /%'0%'. W$% , :/%' -'/+ ,
-
8/19/2019 smart card.doc
39/213
T$% -'/+ &,'+ ( +$% (G%+ %+$( ,//(*-,+%/ +$% S%//-( ()%*+
7-+$ +$% :/%' ,
-
8/19/2019 smart card.doc
40/213
servletname.name
Se##"on In3a,"dat"on
S%//-(/ *, % -0,-,+% ,:+(,+-*,9 (' ,:,9. S%//-(
()%*+/ +$,+ $,0% ( &,% '%?:%/+/ (' , &%'-( ( +-% 3 -:+%/
9 %,:+ ,'% ,:+(,+-*,9 -0,-,+% 9 +$% S%//-( T',*
-
8/19/2019 smart card.doc
41/213
,*< ,/ , *((
-
8/19/2019 smart card.doc
42/213
+$% /%'0%+ /$(: ': +$% URL/ +$'(:$ , /&%*-, %+$( %('%
/%- +$% +( +$% (:+&:+ /+'%,.
T$% %*(%U' %+$( &%'('/ +7( :*+-(/@
1.Deter&"ne URL Rewr"t"n' T$% %*(%U' %+$(
%+%'-%/ - +$% URL %%/ +( % '%7'-++%. R:%/ (' URL
'%7'-+- ,'% /(%7$,+ *(&%8= :+ - %%', - +$% /%'0%'
%+%*+/ +$,+ +$% '(7/%' /:&&('+/ *((
-
8/19/2019 smart card.doc
43/213
T$% %+$(/ %*(%U' , %*(%R%-'%*+U' ,'% -/+-*+
%*,:/% +$%9 ((7 -%'%+ ':%/ (' %+%'-- - , URL
/$(: % '%7'-++%.
M%,t",e Ser3,et#
URL *(0%'/-(/ ,'% '%?:-'% (9 - +$% /%'0%+ /:&&('+/ /%//-(
+',*
-
8/19/2019 smart card.doc
44/213
I ,-+-( +( +$% S%//-( ()%*+= +$%'% ,'% , %7 ('% *,//%/ +$,+
,9 -+%'%/+ +$% /%'0%+ %0%(&%'.
De#!r"t"on C,a##
!++&S%//-(C(+%8+ T$% !++&S%//-(C(+%8+ -/ +$% ()%*+
+$,+ *(+,-/ , %8-/+- , 0,-
/%//-(/. T$% !++&S%//-(C(+%8+ *,
% (+,-% 9 *,-
%+S%//-(C(+%8+ ( +$% S%//-(
()%*+. T$% !++&S%//-(C(+%8+ %+/9(: - (+$%' S%//-( ()%*+/ 9 +$%-'
ID/ , -/+ +$% ID/ ( , 0,-
/%//-(/.
!++&S%//-(B--L-/+%%' !++&S%//-(B--L-/+%%' -/ ,
-+%',*% +$,+ *, % -&%%+% 9
()%*+/ &,*% -+( , S%//-(. W$%
+$% S%//-( ()%*+ -/ -0,-,+%= -+/
*(+,-% 0,:%/ ,'% ,/( '%(0%
'( +$% /9/+%. S(% ( +$%/% 0,:%/
,9 % ,*+-0% ()%*+/ +$,+ '%?:-'%
*%,:& (&%',+-(/ 7$% +$%-' /%//-(
-/ -0,-,+%. I , 0,:% - , S%//-(
()%*+ -&%%+/
!++&S%//-(B--L-/+%%'= +$% +$%
-
8/19/2019 smart card.doc
45/213
0,:% -/ (+--% 7$% +$% S%//-( -/
-0,-,+%= +$%'%9 -0- +$% ()%*+ ,
*$,*% +( &%'(' ,9 %*%//,'9
*%,:& (&%',+-(/.
Se##"on Swa"n and )er#"#ten!e
A I+%'%+ /-+% :/+ % &'%&,'% +( /:&&('+ ,9 0,- /%//-(/.
A ,'% /-+%= (' %8,&%= -$+ $,0% $:'%/= (' %0% +$(:/,/=
( /-:+,%(:/9 0,- /%//-(/. B%*,:/% %,*$ /%//-( *, *(+,-
,'-+','9 ,+, ()%*+/ &,*% +$%'% 9 +$% ,&&-*,+-( /%'0%+/= +$%
%('9 '%?:-'%%+/ (' +$% %+-'% /9/+% *,
'(7 &'($--+-0%9 ,'%.
T( ,%0-,+% /(% ( +$%/% &'(%/= +$% /%//-( +',*
-
8/19/2019 smart card.doc
46/213
,(7/ (' ('% /%//-(/ +( '%,- 0,- +$, *(: %8-/+ -
%('9.
S%//-( -0,-,+-( -/ (+ ,%*+% 9 /%//-( /7,&&-. I ,
/%//-( (%/ ::/% (' (%' +$, +$% (', -0,-,+-( +-%=
+$% /%//-( -/ -0,-,+%= 7$%+$%' -+ -/ - %('9 (' ( -/
-
8/19/2019 smart card.doc
47/213
(*% ,,- %*(% 0,-. T$-/ ,(7/ +$% /%'0%' +( % '%/+,'+%
7-+$(:+ (/- %8-/+- /%//-(/. O9 /%'-,-;,% ,+, %%%+/ -
+$% /%//-( 7- /:'0-0% +$-/ /$:+(7'%/+,'+ (&%',+-(.
Note' S%//-( &%'/-/+%*% -/ -+%% (' &'%/%'0- /%//-(/
,*'(// /%'0%' '%/+,'+/. I+ -/ (+ %,+ +( % :/% ,/ , %%', (
+%' /%//-( &%'/-/+%*% %*$,-/.
C%#to&"7"n Se##"on Tra!:"n
S%//-(+',*
-
8/19/2019 smart card.doc
48/213
+$,+ $,0% (%
::/% ( %(:$
+( % -0,-,+%.
",:% -/ , -+%%'=
/&%*-9- +$%
-+%'0, -
--/%*(/.
/%//-(./7,&-+%'0, T-% -+%'0, 7$%
J,0, W% S%'0%'*$%*
-
8/19/2019 smart card.doc
49/213
/%//-(/ ,'% /7,&&%
+( -/< 7$% J,0,
W% S%'0%' /$:+/
(7 , ,'%
'%0,-,+% '( -/
-
8/19/2019 smart card.doc
50/213
-/< ( , %,/+
'%*%+9 :/% ,/-/ +(
'%:*% +$% :%' (
'%/-%+ /%//-(/.
/%//-(.-0,-,+-(+-% A(:+ ( +-% ,
/%//-( -/ ,(7% +(
( ::/% %('% -+ -/
-0,-,+%. ",:% -/
/&%*--% ---/%*(/.
1
3 -:+%/
%,%./%//-(/ B((%, 0,:%
/&%*-9- 7$%+$%'
S%//-( T',*
-
8/19/2019 smart card.doc
51/213
-
8/19/2019 smart card.doc
52/213
--*,+- 7$%+$%'
+$% /%//-( ID -/
,% +( URL/ 7$%
+$% URL -*+,+%/ ,
/7-+*$ '( $++& +(
$++&/ (' 0-*%0%'/,.
/%//-(.*((
-
8/19/2019 smart card.doc
53/213
/%//-(.*((
-
8/19/2019 smart card.doc
54/213
O',*% -/ , '%,+-(, ,+,,/% ,,%%+ /9/+%= 7$-*$
(',-;%/ ,+, - +$% (' ( +,%/. O',*% -/ (% ( ,9
,+,,/% /%'0%'/ ,/% ( RDBMS (%= 7$-*$ ,,%/ , /%%'
( ,+, +$,+ ,++%/ +$'%% /&%*--* +$-/,+, /+':*+:'%/= ,+,
-+%'-+9 , ,+, ,-&:,+-(. W-+$ (',*% *((&%',+-0% /%'0%'
+%*$((9 7% *, '%,-;% +$% %%-+/ ( (&%= '%,+-(, /9/+%/
(' , +$% ,&&-*,+-(/. O',*% ,
-
8/19/2019 smart card.doc
55/213
O',*% *(,/ *, % :/% (' *(:-*,+- 7-+$ IBM
DB2 ,-',% RDBMS +$,+ -/ -%'%+ '( O',*%= +$,+ -/
O',*% *(&,+-% 7-+$ DB2. O',*% RDBMS -/ , $-$
&%'(',*% ,:+ +(%',+ DBMS= 7$-*$ -/ /&%*-,9 %/-% ('
(-% +',/,*+-( &'(*%//- , (' $,- ,'% ,+,,/%
,&&-*,+-(/.
SYSTEM ANALYSIS
2.SYSTME ANALYSIS
system analysis first stage according to System
Development Life Cycle model. This System Analysis is a
process that starts with the analyst.
Analysis is a detailed study of the various operations
performed by a system and their relationships within and
-
8/19/2019 smart card.doc
56/213
outside the system. ne aspect of analysis is defining the
boundaries of the system and determining whether or not a
candidate should consider other related systems. During
analysis! data is collected from the available files! decision
points! and transactions handled by the present system.
Logical system models and tools are used in analysis.
Training! e"perience! and common sense are re#uired for
collection of the information needed to do the analysis.
EXISTING SYSTEM:
$n the e"isting system the patient or the user has to go the
hospital with his total prescriptions and everything. $t is also
very economic if you went to multispecialty hospitals and
also when you transfer or migrate from one location to
another location.
PROPOSED SYSTEM:
$n the proposed system no need to ta%e all the prescription
with us because it stored in the database and it is also
economically good because they will provide the concisions
for the patients who are registered with that organi&ation.
-
8/19/2019 smart card.doc
57/213
REQURIEMENTS ANALYSIS
The re#uirement phase basically consists of threeactivities'
1. (e#uirement Analysis
2. (e#uirement Specification
). (e#uirement *alidation
Requirement Anal!i!:(e#uirement Analysis is a software engineering tas%
that bridges the gap between system level software
allocation and software design. $t provides the system
engineer to specify software function and performance!
indicate software+s interface with the other system elements
and establish constraints that software must meet.
The basic aim of this stage is to obtain a clear picture
of the needs and re#uirements of the end,user and also the
organi&ation. Analysis involves
interaction between the clients and the analysis. -sually
analysts research a problem from any #uestions as%ed and
reading e"isting documents. The analysts have to uncover
the real needs of the user even if they don+t %now them
clearly. During analysis it is essential that a complete and
-
8/19/2019 smart card.doc
58/213
consistent set of specifications emerge for the system. ere
it is essential to resolve the contradictions that could emerge
from information got from various parties.
This is essential to ensure that the final specifications are
consistent.
$t may be divided into / areas of effort.
1. 0roblem recognition
2. valuation and synthesis
). odeling
3. Specification
/. (eview
ach (e#uirement analysis method has a uni#ue point of
view. owever all analysis methods are related by a set of
operational principles. They are
• The information domain of the problem must berepresented and understood.
• The functions that the software is to perform must
be defined.
• The behavior of the software as a conse#uence of
e"ternal events must be defined.
• The models that depict information! function andbehavior must be partitioned in a hierarchical orlayered fashion.
-
8/19/2019 smart card.doc
59/213
• The analysis process must move from essential
information to implementation detail.
REQUIREMENTS SPE"I#I"ATION
S$e%i&i%ati'n Prin%i$le!:
Software (e#uirements Specification plays an important
role in creating #uality software solutions. Specification is
basically a representation process. (e#uirements are
represented in a manner that ultimately leads to successful
software implementation. (e#uirements may be specified in a variety of ways.
owever there are some guidelines worth following' ,
• (epresentation format and content should be
relevant to the problem• $nformation contained within the specification
should be nested• Diagrams and other notational forms should be
restricted in number and consistent in use.• (epresentations should be revisable.
-
8/19/2019 smart card.doc
60/213
S'&t(are Requirement! S$e%i&i%ati'n!:
The software re#uirements specification is produced at
the culmination of the analysis tas%. The function and
performance allocated to the software as a part of system
engineering are refined by establishing a complete
information description! a detailed functional and behavioral
description! and indication of performance re#uirements and
design constraints! appropriate validation criteria and other
data pertinent to re#uirements.
An 'utline '& t)e S'&t(are Requirement!
S$e%i&i%ati'n:
A simplified outline can be given for the framewor% of the
specifications. This is according to the $ Standards.
#EASI*ILITY STUDY
All pro4ects are feasible! given unlimited resources and
infinite time. 5ut the development of software is plagued by
the scarcity of resources and difficult delivery rates. $t is
both necessary and prudent to evaluate the feasibility of a
pro4ect at the earliest possible time.
-
8/19/2019 smart card.doc
61/213
Three %ey considerations are involved in the feasibility
analysis.
E%'n'mi% #ea!i+ilit:
This procedure is to determine the benefits and savings
that are e"pected from a candidate system and compare
them with costs. $f benefits outweigh costs! then the
decision is made to design and implement the system.
therwise! further 4ustification or alterations in proposed
system will have to be made if it is to have a chance of
being approved. This is an ongoing effort that improves in
accuracy at each phase of the system life cycle.
Te%)ni%al #ea!i+ilit:
Technical feasibility centers on the e"isting computer
system 6hardware! software! etc.!7 and to what e"tent it can
support the proposed addition. $f the budget is a serious
constraint! then the pro4ect is 4udged not feasible.
O$erati'nal #ea!i+ilit:
-
8/19/2019 smart card.doc
62/213
0eople are inherently resistant to change! and
computers have been %nown to facilitate change. $t is
understandable that the introduction of a candidate system
re#uires special effort to educate! sell! and train the staff on
new ways of conducting business.
S8ST DS$9:
The most creative and challenging phase of the life
cycle is system design. The term design describes a final
system and the process by which it is developed. $t refers
to the technical specifications that will be applied in
implementations of the candidate system. The design may
be defined as ;the process of applying various techniques
and principles for the purpose of defining a device, a process
or a system with sufficient details to permit its physical
realization”.
The designer+s goal is how the output is to be
produced and in what format. Samples of the output and
input are also presented. Second input data and database
files have to be designed to meet the re#uirements of the
proposed output. The processing phases are handled
through the program Construction and Testing.
-
8/19/2019 smart card.doc
63/213
of the impact of the candidate system on the user and the
organi&ation are documented and evaluated by management
as a step toward implementation.
The importance of software design can be stated
in a single word ;Quality” . Design provides us with
representations of software that can be assessed for #uality.
Design is the only way where we can accurately translate a
customer+s re#uirements into a complete software product or
system. =ithout design we ris% building an unstable system!
that might fail if small changes are made. $t may as well be
difficult to test! or could be one who+s
#uality can+t be tested. So it is an essential phase in the
development of a software product.
DATA #LO, DIAGRAMS
Data flow diagram is a structure analysis tool that is
used for graphical representation of Data processes through
any organi&ation . the data flow approach emphasis on the
logic underlying the system! by using combination of only 3
symbols. $t follows a top down approach. A full description of
a system actually consists of set of D
-
8/19/2019 smart card.doc
64/213
lower level diagrams that show additional feature of the
system.
-
8/19/2019 smart card.doc
65/213
O$en Re%tan-le
it is a data store,data at rest! or a temporary repository of
data. ere $ am giving only the Data
-
8/19/2019 smart card.doc
66/213
DATA ST(-CT-(
>T(:AL :T$T8
( DATA L$:?
0(CSS
DATA 5AS
DEMA"RO YORDAN NOTATION
-
8/19/2019 smart card.doc
67/213
DATA T(:AL :T$T8
( DATA L$:?
0(CSS
-
8/19/2019 smart card.doc
68/213
ErDia-ram!
ER /ia-ram
B',*$ !%,
NAME
P!ONEUSER
NAME
PASS
WORD
EMAIL
MOBILE
JDATE
ADDRESS
BRANC!
C-+9
P-
S+,+%
B(
Branc
h
R%
CNO
BRANC!
P!O NE
CNAME CAPA
CITY
"ADI
DISCOU
T
REGNO
!NA
E
DES
NA N
SEX
QUALIFICATIO N
ADDRESS
PIN
STATE
JDATE
-
8/19/2019 smart card.doc
69/213
Re
CNO
BRANC!
P!O NE
CNAME
CAPACIY
"ALI
DITY
DISCOU
T
REGNO
!NAM
E
DESIG
NATI N
SEX
ADDRESS
PIN
STATE
JDATE
C,'C(
C(
C,%
C,&,*-+9
",--+9
D-/*(:+A(:+
-
8/19/2019 smart card.doc
70/213
B',*$ !%,
NAME
P!ONEUSER
NAME
PASS
WORD
EMAIL
MOBILE
JDATE
ADDRESS
BRANC!
C-+9
P-
S+,+%
B(
Bran!
+
E?:-'9
QUALCATIO
S+
P$(%
N/-;%
B',*$
B,+%
A%
D-/+'-
S8
DESI NATI N
N,%
A'%//
-
8/19/2019 smart card.doc
71/213
PROJECT REPORT Smart Card Health Security System
/ >1 /
R%
CNO
BRANC!
P!O NE
CNAME
CAPACITY
"ALIDITY
DISCOUN
T
REGNO
!NAM
E
DESIG NATIO N
SEX
QUALIFICATIO N
ADDRESS
PIN
STATE
JDATE
ReN
o
REGNO NAME1
S
1AGE
1 RELATION
R%%/*
-
8/19/2019 smart card.doc
72/213
PROJECT REPORT Smart Card Health Security System
ID#D &'r ")airman
/ >2 /
S,'+*,'
!%,+$S%*:'-+9/9/+%
C$,-',
A N%7 B',*$
A//- , B',*$M,,%'
A N%7 !%,+$C,'
G%%',+% R%&('+/
-
8/19/2019 smart card.doc
73/213
PROJECT REPORT Smart Card Health Security System
ID#D &'r *ran%) Mana-er
/ >( /
S,'+*,'!%,+$
S%*:'-+9
/9/+%
B',*$ M,,%'
E?:-'9
R%-/+',+-(
G%%',+% R%&('+/
R%-/+%' R%,+-(/
-
8/19/2019 smart card.doc
74/213
PROJECT REPORT Smart Card Health Security System
5(A:C AD
IIle0el D#D &'r ")airman
CA(D
Data5ase
/ >0 /
C$,-',
S,'+ C,'!%,+$ S%*:'-+9
S9/+%
A//- , B',*$M,, %'
A N%7 !%,+$C,'
G%%',+% R%&('+/
-
8/19/2019 smart card.doc
75/213
PROJECT REPORT Smart Card Health Security System
IIle0el D#D &'r *ran%) Mana-er
:@-$(8
n#uiry
(eg
(egDes
Data5ase
/ >? /
B',*$ M,,%'
S,'+ C,'!%,+$ S%*:'-+9
S9/+%
E?:-'9
R%-/+',+-(
R%,+-(/
G%%',+% R%&('+/
-
8/19/2019 smart card.doc
76/213
PROJECT REPORT Smart Card Health Security System
/ >@ /
-
8/19/2019 smart card.doc
77/213
PROJECT REPORT Smart Card Health Security System
/ >> /
-
8/19/2019 smart card.doc
78/213
PROJECT REPORT Smart Card Health Security System
UML1S
/ > /
-
8/19/2019 smart card.doc
79/213
PROJECT REPORT Smart Card Health Security System
-se Case Diagram of Chairman'
Chairman
Add Branch Head
Add Card type
Reports
Chairman
/ > /
-
8/19/2019 smart card.doc
80/213
PROJECT REPORT Smart Card Health Security System
-se case Diagram of 5ranchead'
BranchHead
Enquiry
Registration
Reports
BranchHead
/ /
-
8/19/2019 smart card.doc
81/213
PROJECT REPORT Smart Card Health Security System
Se#uence Diagram of Chairman'
Add New Card: Chairmanogin Add New
Branch HeadReports
!ogin detai!s"eri#y
Branch $etai!s
Branch created
Add New Type o# Card
Card Created
Request #or Reports
Reports %enerated
/ 1 /
-
8/19/2019 smart card.doc
82/213
PROJECT REPORT Smart Card Health Security System
Collaboration Diagram of Chairman '
: Chairman
ogin Add New BranchHead
Add NewCard
Reports
&: "eri#y
': !ogin detai!s
(:
): Branch $etai!s
*: Branch created
+: Add New Type o# Card
,: Card Created -: Request #or Reports
: Reports %enerated
/ 2 /
-
8/19/2019 smart card.doc
83/213
PROJECT REPORT Smart Card Health Security System
Se#uence Diagram of 5ranchead'
/ ( /
-
8/19/2019 smart card.doc
84/213
PROJECT REPORT Smart Card Health Security System
: BranchHead!ogin Enquiry Registration Reports ogout
!ogin $etai!s
"eri#y
!ogin SuccedEnter Enquiry
stoted enquiry detai!s
Request #or Registration
Registration Success#u!
Requst ing #or Reports
%enerate reports
Reques #or ogout
ogout Success
/ 0 /
-
8/19/2019 smart card.doc
85/213
PROJECT REPORT Smart Card Health Security System
Collaboration Diagram of 5ranch ead'
: BranchHead
!ogin
Enquiry
Registration
Reports
ogout
': !ogin $etai!s
&: "eri#y
(: !ogin Succed
): Enter Enquiry
*: stoted enquiry detai!s
+: Request #or Registration
,: Registration Success#u!
-: Requst ing #or Reports
: %enerate reports
'/: Reques #or ogout
'': ogout Success
DATA DI"TIONARY
Data+a!e De!i-n:
Ta+le name: L'-in
/ ? /
-
8/19/2019 smart card.doc
86/213
PROJECT REPORT Smart Card Health Security System
username *archar2627 not nullpassword *archar2627 not null
Ta+le name: *ran%))ea/
name *archar2627username *archar2627password *archar26270hone :umber627Bdate Dateobile *archar2627mail *archar2627
Address *archar26275ranch *archar2627City *archar26270in :umber67State *archar26275no :umber617 0rimary ?ey
Ta+le name: "ar/
Cno :umber6/7 0rimary ?eyCname *archar2617Capacity :umber*alidity *archar2617Discount :umberAmount :umber
Ta+le name : Enquir
:A *A(CA(2627 A9 :-5(
/ @ /
-
8/19/2019 smart card.doc
87/213
PROJECT REPORT Smart Card Health Security System
S> *A(CA(2617 D$ST($CT *A(CA(2627 DS$9:AT$: *A(CA(2627 @-AL$ *A(CA(26170: :-5(6175(A:C *A(CA(2627@-AL$ /
-
8/19/2019 smart card.doc
88/213
PROJECT REPORT Smart Card Health Security System
A91 :-5((LAT$: *A(CA(2627
TECHNICAL NOTES'
OERIE, O# 3AA TE"4NOLOGY
Bava! whether you love it! or hate it! itFs here to stay. Li%e everyone
favorite language C! Bava has had a ma4or impact on the computin
scene. =hen the history of computers is written! its name will be u
there with the stars.
$f you were to choose 4ust one language to learn today! it should b
Bava. $tFs being pushed aggressively by Sun and is growing by leap
and bounds. There are lots of Bava programmers out there and mor
4oin the party every day.
Bava started out as a bit of an accident. A team under 5ill Boy wa
wor%ing at Sun on a new programming language for embedde
applications. Bava was originally e"pected to wor% in toasters an
fridges! not on modern computersG The initial prognosis for Bava wa
not good and it was only the rise of the $nternet which saved Bav
from oblivion. Since then! neither the :et nor Sun nor Bava ha
loo%ed bac% and all have grown from strength to strength.
=orld wide web is an open ended information retrieval system
designed to be used in the distributed environment. This system
contains web pages that provide both information and controls. =
/ /
-
8/19/2019 smart card.doc
89/213
PROJECT REPORT Smart Card Health Security System
can navigate to a new web page in any direction. This is mad
possible worth TL 4ava was meant to be used in distribute
environment such as internet. So 4ava could be easily incorporate
into the web system and is capable of supporting animatio
graphics ! games and other special effect. The web has become mor
dynamic and interactive with support of 4ava. =e can run a 4av
program on remote machine over internet with the support of web .
3AA ENIRONMENT
Bava environment includes a large no. of tools which are part o
the system %nown as 4ava development %it 6BD?7 and hundreds o
classes! methods! and interfaces grouped into pac%ages forms part o
4ava standard library6BSL7.
3AA AR"4ITE"TURE
Bava architecture provides a portable! robust ! high performin
environment for development. Bava provides portability by compilin
the byte codes for the 4ava virtual machine which are the
interpreted on each platform by the runtime environment . 4ava als
provides stringent compile and runtime chec%ing and automat
memory management in order to ensure solid code .
3AA IRTUAL MA"4INE
/ /
-
8/19/2019 smart card.doc
90/213
PROJECT REPORT Smart Card Health Security System
=hen we compile the code! 4ava compiler creates machine cod
6byte code7 for a hypothetical machine called 4ava virtual machin
64vm7. The 4vm will e"ecute the byte code and overcomes the issue o
portability . the code is written and compile for one machine an
interpreted all other machines . this machine is called 4ava virtua
machine .
PARADIGM O# 3AA
• Dynamic down loading applets6small applicatio
programs7H
• limination of flatware phenomenon that is providing thos
features of a product that user needs at a time. Th
remaining features of a product can remain in the server.
• Changing economic model of the software
• -p,to,date software availability
• Supports networ% entire computing
A*OUT 4TML
TL 6hyper te"t mar%up language7 is a language used t
create hyper te"t documents that have hyper lin%s embedded in them
. it consists of tags embedded in the te"t of a document with T
=e can build web pages or web document s. it is basically
formatting language and not a programming language. The browse
reading the document interprets mar% up tags to help format th
document for subse#uent display to a reader. TL is a language fo
/ /
-
8/19/2019 smart card.doc
91/213
PROJECT REPORT Smart Card Health Security System
describing structured documents. TL is a platform independen
===6world wide web7 pages are written using TL. TL tag
control in part the representation of the === page when view wit
web browser. The browser interpretes TL tags in the we
document and displays it. Different browsers show data differently
"amples of browsers used to be web pages include'
• :etscape
• $nternet "plorer
3AA S"RIPT
Bava script is a general purpose ! prototype based ! ob4ec
oriented scripting language developed 4ointly by sun and netscap
and is meant for the === . it is designed to be embedded in divers
applications and systems ! with out consuming much memory . 4av
script borrows most of its synta" from 4ava but also inherits from aw
and perl ! with some indirect influence from self in its ob4ec
prototype system.
Bava scripts dynamically typed that is programs donot declar
variable types! and the type of variable is unrestricted and ca
change at runtime . source can be generated at run time an
evaluated against an arbitrary scope. Typical implementation
compile by translating source into a specified byte code format! t
chec% synta" and source consistency. :ote that the availability t
/ 1 /
-
8/19/2019 smart card.doc
92/213
-
8/19/2019 smart card.doc
93/213
PROJECT REPORT Smart Card Health Security System
or whether the values entered are correct or whethe
all fields in a from are filled and reduced networ
traffic
3. it creates interactive forms and client side loo%u
tables .
3a0aData*a!e"'nne%ti0it53D*"6
O0er0ie( '& Ne( #eature!
Re!ult !et en)an%ement!
The BD5C 1. A0$ provided result sets that had the ability to scroll
a forward direc,tiononly. Scrollable result sets allow for mor
fle"ibility in the processing of results by
providing both forward and bac%ward movement through the
contents. $n addition!
scrollable result sets allow for relative and absolute positioning.
-
8/19/2019 smart card.doc
94/213
PROJECT REPORT Smart Card Health Security System
The batch update feature allows an application to submit multipl
update statements
6insertIupdateIdelete7 in a single re#uest to the database. This ca
provide a dramatic
increase in performance when a large number of update statement
need to be e"ecuted.
A/0an%e/ /ata t$e!
$ncreased support for storing persistent Bava programming languag
ob4ects 6Bava ob,4ects7
and a mapping for S@LJJ data types such as binary large ob4ects
and structured
types! has been added to the BD5C A0$. An application may als
customi&e the map,ping
of S@LJJ structured types into Bava programming language classes.
R'(!et!
As its name implies! a rowset encapsulates a set of rows. A rowse
may or may not
maintain an open database connection. =hen a rowset
Kdisconnected+ from its data
source! updates performed on the rowset are propagated to th
underlying database us,ing
/ 0 /
-
8/19/2019 smart card.doc
95/213
PROJECT REPORT Smart Card Health Security System
an optimistic concurrency control algorithm.(owsets add support t
the BD5C A0$ for the Bava5eans component model. A rowset ob4ect
a bean. A rowset implementation may be seriali&able. (owsets can b
created at design time and used in con4unction with other Bava5ean
components in a visual builder tool to construct an application.
3NDI &'r namin- /ata+a!e!
The Bava :aming and Directory $nterface 6B:D$7 A0$ can be used i
addition to a
BD5C technology,based driver manager 6BD5C driver manager7 t
obtain a connection
to a database. =hen an application uses the B:D$ A0$! it specifies
logical name that
identifies a particular database instance and BD5C driver fo
accessing that database.
This has the advantage of ma%ing the application code independen
of a particular
BD5C driver and BD5C technology -(L.
"'nne%ti'n P''lin-
The BD5C A0$ contains Khoo%s+ that allow connection pooling to b
implemented on
/ ? /
-
8/19/2019 smart card.doc
96/213
PROJECT REPORT Smart Card Health Security System
top of the BD5C driver layer. This allows for a single connection cach
that spans the
different BD5C drivers that may be in use. Since creating an
destroying database con,nectionsis e"pensive! connection pooling
important for achieving good performance!
especially for server applications.
Di!tri+ute/ tran!a%ti'n !u$$'rt
Support for distributed transactions has been added as an e"tensio
to the BD5C A0$.
This feature allows a BD5C driver to support the standard 2,phas
commit protocol
used by the Bava Transaction Service 6BTS7 A0$.
Ot)er ne( &eature!
Support for character streams has been added. This means tha
character data can be re,trieved and sent to the database as
stream of internationali&ed -nicode characters.
ethods to allow 4ava.math.5igDecimal values to be returned wit
full precision
/ @ /
-
8/19/2019 smart card.doc
97/213
PROJECT REPORT Smart Card Health Security System
have also been added. Support for time &ones has been added.
,)at1! A%tuall ")an-e/
A Ne( Pa%7a-e
The BD5C A0$ has been factored into two complementar
components. The first com,ponent is A0$ that is core to the Bav
platform 6the core JDBC 2. !"# 7 and comprises
the updated contents of the 4ava.s#l pac%age. This documen
contains the specifica,tion for the core BD5C 2.1 A0$. The secon
component! termed the JDBC 2.$ %ptional
"ac&age !" $! comprises the contents of a new pac%age! 4ava".s#
which as its name
implies will be delivered as an optional pac%age to the Bava platform
6formerly Bava
Standard "tension7. The BD5C 2. ptional 0ac%age A0$ is describe
in a separate
document. The 4ava.s#l pac%age contains all of the additions tha
have been made to the e"isting interfaces and classes! in addition t
a few new classes and interfaces. The new 4av,a".s#l pac%age ha
been introduced to contain the parts of the BD5C A0$ which ar
closely related to other pieces of the Bava platform that ar
/ > /
-
8/19/2019 smart card.doc
98/213
PROJECT REPORT Smart Card Health Security System
themselves ptional 0ac%,ages. such as the Bava :aming an
Directory $nterface 6B:D$7! and the Bava Transaction Service 6BTS7.
$n addition! some advanced features that are easily separable from
the core BD5C A0$! such as connection pooling and rowsets! have als
been added to 4av,a".s#l. 0utting these advanced facilities into a
optional pac%age instead of into core will help %eep the core BD5C A0
small and focused. Since optional pac%ages are downloadable! it w
always be possible to deploy an ap,plication which uses the feature
in the BD5C ptional 0ac%age that will ;run any,where! since if a
optional pac%age isn+t installed on a client machine! it can b
downloaded along with the application that uses it.
")an-e! t' "la!!e! an/ Inter&a%e!
The list below contains all of the BD5C 2.1 A0$ core classes an
interfaces. $nterfaces
and classes that are new are listed in bold type. All of the interface
and classes present
in the BD5C 1. A0$ are also present in the core BD5C 2.1 A0
however! some of the BD5C 1. technology interfaces have gaine
additional methods. The interfaces that contain new methods ar
listed in italics and those that have not changed are in normal type.
/ /
-
8/19/2019 smart card.doc
99/213
PROJECT REPORT Smart Card Health Security System
The separate core BD5C 2.1 A0$ documentation contains th
Bava programming language definitions of the 4ava.s#l interfaces an
classes listed above.
Re!ult Set En)an%ement!
This chapter discusses the new functionality that has been added t
result sets. The goal
of the enhancements is to add two new basic capabilities to resu
sets' scrolling and up,datability.Several methods have also bee
added to enable a BD5C driver to deliver im,proved performanc
when processing results. A variety of e"amples are included to
illustrate the new features.
S%r'llin-
A result set created by e"ecuting a statement may support the abilit
to move bac%ward
6last,to,first7 through its contents! as well as forward 6first,to,last7
(esult sets that sup,portthis capability are called scrollable resu
sets. (esult sets that are scrollable also
support relative and absolute positioning. Absolute positioning is th
ability to move
directly to a row by specifying its absolute position in the result se
while relative po,sitioning gives the ability to move to a row b
specifying a position that is relative to
/ /
-
8/19/2019 smart card.doc
100/213
PROJECT REPORT Smart Card Health Security System
the current row. The definition of absolute and relative positioning i
the BD5C A0$ is
modeled on the >Ipen S@L CL$ specification.
Re!ult Set t$e!
The BD5C 1. A0$ provided one result set typeMforward,only. Th
BD5C 2.1 core A0$
provides three result set types' forward,only! scroll,insensitive! an
scroll,sensitive. As
their names suggest! the new result set types support scrolling! bu
they differ in their
ability to ma%e changes visible while they are open.
A !%r'llin!en!iti0e result set is generally n't sensitive to change
that are made while
it is open. A scroll,insensitive result set provides a static view of th
underlying data it
contains. The membership! order! and column values of rows in
scroll,insensitive re,sultset are typically fi"ed when the result set
created. n the other hand! a !%r'll!en!iti0e result set is sensitiv
to changes that are made while it is open! and provides a Kdynami
view of the underlying data.
-
8/19/2019 smart card.doc
101/213
PROJECT REPORT Smart Card Health Security System
sensitive result set! changes in the underlying column values of row
are visible. The membership and ordering of rows in the result se
may be fi"edMthis is implementation defined.
"'n%urren% t$e!
An application may choose from two different concurrency types for
result set' read,only and updatable. A result set that uses rea/'n
concurrency does not allow updates of its contents. This can increas
the overall level of concurrency between transactions! since an
number of read,only loc%s may be held on a data item
simultaneously.
A result set that is u$/ata+le allows updates and may use databas
write loc%s to me,diate access to the same data item by differen
transactions. Since only a single write
loc% may be held at a time on a data item! this can reduc
concurrency. Alternatively!
an optimistic concurrency control scheme may be used if it is though
that conflicting accesses to data will be rare. ptimistic concurrenc
control implementations typically
compare rows either by value or by a version number to determine
an update conflict
has occurred.
Per&'rman%e
/ 11 /
-
8/19/2019 smart card.doc
102/213
PROJECT REPORT Smart Card Health Security System
Two performance hints may be given to a BD5C 2.1 technology
enabled driver to ma%e
access to result set data more efficient. Specifically! the number o
rows to be fetched
from the database each time more rows are needed can be specified
and a direction for
processing the rowsMforward! reverse! or un%nownMcan be given a
well. These val,ues
can be changed for an individual result set at any time. A BD5C drive
may ignore
a performance hint if it chooses.
"reatin- a re!ult !et
The e"ample below illustrates creation of a result set that is forward
only and uses read,only concurrency. :o performance hints are give
by the e"ample! so the driver is free
to do whatever it thin%s will result in the best performance. Th
transaction isolation
level for the connection is not specified! so the default transactio
isolation level of the
underlying database is used for the result set that is created. :ot
that this code is 4ust
/ 12 /
-
8/19/2019 smart card.doc
103/213
PROJECT REPORT Smart Card Health Security System
written using the BD5C 1. A0$! and that it produces the same type o
result set that
would have been produced by the BD5C 1. A0$.
Connection con
Driveranager.getConnection6O4dbc'myPsubprotocol'myPsubnameO7
Statement stmt N con.createStatement67H
(esultSet rs N stmt.e"ecute@uery6OSLCT empPno! salary
-
8/19/2019 smart card.doc
104/213
PROJECT REPORT Smart Card Health Security System
(esultSet rs N stmt.e"ecute@uery6OSLCT empPno!salary
-
8/19/2019 smart card.doc
105/213
PROJECT REPORT Smart Card Health Security System
statement and choose an alternative value for the result set type o
the statement accord,ing to the following rules'
1. $f an application as%s for a scrollable result set type the drive
should use a
scrollable type that it supports! even if this differs from the e"ac
type re#uested
by the application.
2. $f the application as%s for a scrollable result set type and the drive
does not
support scrolling! then the driver should use a forward,only result se
type.
Similarly! the metho
DatabaseetaData.supports(esultSetConcurrency67 can
be called to determine which concurrency types are supported by
driver. $f an appli,cation as%s a BD5C driver for a concurrency typ
that it does not support then the driver
should issue an S@L=arning on the Connection that produces th
statement and
choose the alternative concurrency type. The choice of result set typ
should be made
first if an application specifies both an unsupported result set typ
and an unsupported
concurrency type.
/ 1? /
-
8/19/2019 smart card.doc
106/213
PROJECT REPORT Smart Card Health Security System
$n some instances! a BD5C driver may need to choose an alternat
result set type or con,currency type for a (esultSet at statemen
e"ecution time. >>67 methods are used to modify the value of a
individual column in the current row! but do not update th
underlying
/ 1@ /
-
8/19/2019 smart card.doc
107/213
PROJECT REPORT Smart Card Health Security System
database. =hen the (esultSet.update(ow67 method is called th
database is updated.
Columns may be specified by name or number.
rs.first67H
rs.updateString61! O12O7H
rs.update /
-
8/19/2019 smart card.doc
108/213
PROJECT REPORT Smart Card Health Security System
rs.delete(ow67H
The e"ample below shows how a new row may be inserted into
result set. The BD5C
A0$ defines the concept of an insert row that is associated with eac
result set and is
used as a staging area for creating the contents of a new row befor
it is inserted into
the result set itself. The (esultSet.moveTo$nsert(ow67 method is use
to position
the result set+s cursor on the insert row. Th
(esultSet.update>>>67and (esultSet.
get>>>67 methods are used to update and retrieve individual colum
values from
the insert row. The contents of the insert row is undefine
immediately after calling
(esultSet.
moveTo$nsert(ow67. $n other words! the value returned by calling
(esultSet.
get>>>67 method is undefined after moveTo$nsert(ow67 is called unt
the
value is set by calling (esultSet.update>>>67. Callin
(esultSet.update>>>67 while on the insert row does not update th
underlying database or the result set.
/ 1 /
-
8/19/2019 smart card.doc
109/213
PROJECT REPORT Smart Card Health Security System
nce all of the column values are set in the insert row
(esultSet.insert(ow67 is called to update the result set and th
database simulta,neously.
$f a column is not given a value by calling update>>>67 while on th
insert
row! or a column is missing from the result set! then that colum
must allow a null value.
therwise! calling insert(ow67 throws an S@L"ception.
rs.moveTo$nsert(ow67H
rs.updateString61! O1/O7H
rs.update
-
8/19/2019 smart card.doc
110/213
PROJECT REPORT Smart Card Health Security System
row before (esultSet.moveTo$nsert(ow67 was called. $n the e"amp
above!
(esultSet.first67 is called to leave the insert row and move to the firs
row of the
resultset.
Due to differences in database implementations! the BD5C A0$ doe
not specify an e",act
set of S@L #ueries which must yield an updatable result set for BD5
drivers that
support updatability. Developers can! however! generally e"pec
#ueries which meet
the following criteria to produce an updatable result set'
1. The #uery references only a single table in the database.
2. The #uery does not contain any 4oin operations.
). The #uery selects the primary %ey of the table it references.
$n addition! an S@L #uery should also satisfy the conditions liste
below if inserts are
to be performed.
3. The #uery selects all of the non,nullable columns in the underlyin
table.
/. The #uery selects all columns that don+t have a default value.
Intr'/u%ti'n t' Ser0let!
/ 11 /
-
8/19/2019 smart card.doc
111/213
PROJECT REPORT Smart Card Health Security System
Servlets provide a Bava6T7,based solution used to address the
problems currently associated with doing server,side programming!
including ine"tensible scripting solutions! platform,specific A0$s! and
incomplete interfaces.
Servlets are ob4ects that conform to a specific interface that can be
plugged into a Bava,based server. Servlets are to the server,side
what applets are to the client,side ,, ob4ect bytecodes that can be
dynamically loaded off the net. They differ from applets in that they
are faceless ob4ects 6without graphics or a 9-$ component7. Theyserve as platform,independent! dynamically,loadable! pluggable
helper bytecode ob4ects on the server side that can be used to
dynamically e"tend server,side functionality.
,)at i! a Ser0let8
Servlets are modules that e"tend re#uestIresponse,oriented serverssuch as Bava,enabled web servers.
-
8/19/2019 smart card.doc
112/213
PROJECT REPORT Smart Card Health Security System
the serverFs environment or protocol. Servlets have become most
widely used within TT0 serversH many web servers support the
Servlet A0$.
U!e Ser0let! in!tea/ '& "GI S%ri$t!9
Servlets are an effective replacement for C9$ scripts. They provide a
way to generate dynamic documents that is both easier to write and
faster to run. Servlets also address the problem of doing server,sideprogramming with platform,specific A0$s' they are developed with
the Bava Servlet A0$! a standard Bava e"tension.
So use servlets to handle TT0 client re#uests.
-
8/19/2019 smart card.doc
113/213
PROJECT REPORT Smart Card Health Security System
This allows servlets to support systems such as on,line
conferencing.
•
-
8/19/2019 smart card.doc
114/213
PROJECT REPORT Smart Card Health Security System
The Servlet interface declares! but does not implement! methods tha
manage the servlet and its communications with clients. Servlet
writers provide some or all of these methods when developing a
servlet.
"lient Intera%ti'n
=hen a servlet accepts a call from a client! it receives two ob4ects'
• A Servlet(e#uest! which encapsulates the communication from
the client to the server.
• A Servlet(esponse! which encapsulates the communication from
the servlet bac% to the client.
Servlet(e#uest and Servlet(esponse are interfaces defined by the
4ava".servlet pac%age.
T)e Ser0letReque!t Inter&a%e
The Servlet(e#uest interface allows the servlet access to'
• $nformation such as the names of the parameters passed in by
the client! the protocol 6scheme7 being used by the client! and
the names of the remote host that made the re#uest and the
/ 110 /
-
8/19/2019 smart card.doc
115/213
PROJECT REPORT Smart Card Health Security System
server that received it.
• The input stream! Servlet$nputStream. Servlets use the input
stream to get data from clients that use application protocols
such as the TT0 0ST and 0-T methods.
$nterfaces that e"tend Servlet(e#uest interface allow the servlet to
retrieve more protocol,specific data.
-
8/19/2019 smart card.doc
116/213
PROJECT REPORT Smart Card Health Security System
A//iti'nal "a$a+ilitie! '& 4TTP Ser0let!
The classes and interfaces described above ma%e up a basic Servlet.
TT0 servlets have some additional ob4ects that provide session,
trac%ing capabilities. The servlet writer can use these A0$s to
maintain state between the servlet and the client that persists across
multiple connections during some time period. TT0 servlets also
have ob4ects that provide coo%ies. The servlet writer uses the coo%ie
A0$ to save data with the client and to retrieve this data.
T)at! it9
The classes mentioned in the Architecture of the Servlet 0ac%age
section are shown in the e"ample in bold'
• SimpleServlet e"tends the ttpServlet class! which implements
the Servlet interface.
• SimpleServlet overrides the do9et method in the ttpServlet
class. The do9et method is called when a client ma%es a 9T
re#uest 6the default TT0 re#uest method7! and results in the
/ 11@ /
-
8/19/2019 smart card.doc
117/213
PROJECT REPORT Smart Card Health Security System
simple TL page being returned to the client.
• =ithin the do9et method!
o The userFs re#uest is represented by an ttpServlet(e#ues
ob4ect.
o The response to the user is represented by an
ttpServlet(esponse ob4ect.
o 5ecause te"t data is returned to the client! the reply is sen
using the =riter ob4ect obtained from the
ttpServlet(esponse ob4ect.
Ser0let Li&e%%le
ach servlet has the same life cycle'
• A server loads and initiali&es the servlet
/ 11> /
-
8/19/2019 smart card.doc
118/213
PROJECT REPORT Smart Card Health Security System
• The servlet handles &ero or more client re#uests
• The server removes the servlet
Initiali;in- a Ser0let
=hen a server loads a servlet! the server runs the servletFs init
method. $nitiali&ation completes before client re#uests are handled
and before the servlet is destroyed.
ven though most servlets are run in multi,threaded servers! servlethave no concurrency issues during servlet initiali&ation. The server
calls the init method once! when the server loads the servlet! and wi
not call the init method again unless the server is reloading the
servlet. The server can not reload a servlet until after the server has
destroyed the servlet by calling the destroy method.
T)e init Met)'/
The init method provided by the ttpServlet class initiali&es the
servlet and logs the initiali&ation. To do initiali&ation specific to your
servlet! override the init67 method following these rules'
• $f an initiali&ation error occurs that renders the servlet incapabl
of handling client re#uests! throw an -navailable"ception.
Initiali;ati'n Parameter!
/ 11 /
-
8/19/2019 smart card.doc
119/213
PROJECT REPORT Smart Card Health Security System
The second version of the init method calls the get$nit0arameter
method. This method ta%es the parameter name as an argument and
returns a String representation of the parameterFs value.
The specification of initiali&ation parameters is server,specific. $n the
Bava =eb Server! the parameters are specified with a servlet is adde
then configured in the Administration Tool.
-
8/19/2019 smart card.doc
120/213
PROJECT REPORT Smart Card Health Security System
U!in- t)e De!tr' Met)'/
The destroy method provided by the ttpServlet class destroys the
servlet and logs the destruction. To destroy any resources specific toyour servlet! override the destroy method. The destroy method
should undo any initiali&ation wor% and synchroni&e persistent state
with the current in,memory state.
A server calls the destroy method after all service calls have
been completed! or a server,specific number of seconds have passed
whichever comes first. $f your servlet handles any long,running
operations! service methods might still be running when the server
calls the destroy method. 8ou are responsible for ma%ing sure those
threads complete. The ne"t section shows you how.
The destroy method shown above e"pects all client interactions
to be completed when the destroy method is called! because theservlet has no long,running operations.
4an/lin- Ser0i%e T)rea/! at Ser0let Terminati'n
All of a servletFs service methods should be complete when a servlet
is removed. The server tries to ensure this by calling the destroy
method only after all service re#uests have returned! or after a
server,specific grace period! whichever comes first. $f your servlet
has operations that ta%e a long time to run 6that is! operations that
/ 12 /
-
8/19/2019 smart card.doc
121/213
PROJECT REPORT Smart Card Health Security System
may run longer than the serverFs grace period7! the operations could
still be running when destroy is called. 8ou must ma%e sure that any
threads still handling client re#uests completeH the remainder of this
section describes a techni#ue for doing this.
$f your servlet has potentially long,running service re#uests! use the
following techni#ues to'
• ?eep trac% of how many threads are currently running the
service method.
• 0rovide a clean shutdown by having the destroy method notify
long,running threads of the shutdown and wait for them to
complete
• ave the long,running methods poll periodically to chec% for
shutdown and! if necessary! stop wor%ing! clean up and return.
Tra%7in- Ser0i%e Reque!t!
To trac% service re#uests! include a field in your servlet
class that counts the number of service methods that are
running. The field should have access methods to
increment! decrement! and return its value.
/ 121 /
-
8/19/2019 smart card.doc
122/213
PROJECT REPORT Smart Card Health Security System
The service method should increment the service counter each time
the method is entered and decrement the counter each time the
method returns. This is one of the few times that your ttpServlet
subclass should override the service method. The new method shoul
call super.service to preserve all the original ttpServlet.service
methodFs functionality.
Pr'0i/in- a "lean S)ut/'(n
To provide a clean shutdown! your destroy method should not destro
any shared resources until all the service re#uests have completed.
ne part of doing this is to chec% the service counter. Another part is
to notify the long,running methods that it is time to shut down.
-
8/19/2019 smart card.doc
123/213
PROJECT REPORT Smart Card Health Security System
dispatching each re#uest to a method designed to handle that
re#uest.
-
8/19/2019 smart card.doc
124/213
PROJECT REPORT Smart Card Health Security System
• The get0arameter method returns the value of a named
parameter. $f your parameter could have more than one value!
use get0arameter*alues instead. The get0arameter*alues
method returns an array of values for the named parameter.
6The method get0arameter:ames provides the names of the
parameters.7
•
-
8/19/2019 smart card.doc
125/213
PROJECT REPORT Smart Card Health Security System
• The get=riter method returns a =riter
• The getutputStream method returns a ServletutputStream
-se the get=riter method to return te"t data to the user! and the
getutputStream method for binary data.
Closing the =riter or ServletutputStream after you send the
response allows the server to %now when the response is complete.
4TTP 4ea/er Data
8ou must set TT0 header data 'efore you access the =riter or
utputStream. The ttpServlet(esponse class provides methods to
access the header data.
-
8/19/2019 smart card.doc
126/213
PROJECT REPORT Smart Card Health Security System
• do9et! for handling 9T! conditional 9T! and AD re#uests
• do0ost! for handling 0ST re#uests
• do0ut! for handling 0-T re#uests
• doDelete! for handling DLT re#uests
5y default! these methods return a 5ADP(@-ST 637 error. 8ourservlet should override the method or methods designed to handle
the TT0 interactions that it supports. This section shows you how to
implement methods that handle the most common TT0 re#uests'
9T and 0ST.
The ttpServletFs service method also calls the doptions method
when the servlet receives an 0T$:S re#uest! and doTrace when
the servlet receives a T(AC re#uest. The default implementation of
doptions automatically determines what TT0 options are supporte
and returns that information. The default implementation of doTrace
causes a response with a message containing all of the headers sent
in the trace re#uest. These methods are not typically overridden.
T)rea/in- I!!ue!
/ 12@ /
-
8/19/2019 smart card.doc
127/213
PROJECT REPORT Smart Card Health Security System
TT0 servlets are typically capable of serving multiple clients
concurrently. $f the methods in your servlet that do wor% for clients
access a shared resource! then you can handle the concurrency by
creating a servlet that handles only one client re#uest at a time. 68ou
could also synchroni&e access to the resource! a general topic in the
Bava 0rogramming Language that is note covered in this tutorial.7
To have your servlet handle only one client at a time! have your
servlet implement the SingleThreadodel interface in addition to
e"tending the ttpServlet class.
$mplementing the SingleThreadodel interface does not involve
writing any e"tra methods. 8ou merely declare that the servlet
implements the interface! and the server ma%es sure that your
servlet runs only one service method at a time.
-
8/19/2019 smart card.doc
128/213
PROJECT REPORT Smart Card Health Security System
information from the servlet and display it. The servlet description is
a string that can describe the purpose of the servlet! its author! its
version number! or whatever the servlet author deems important.
The method that returns this information is getServlet$nfo! which
returns null by default. 8ou are not re#uired to override this method!
but applications are unable to supply a description of your servlet
unless you do.
,ritin- Y'ur #ir!t Ser0let
Servlets are also easy to develop. This document discusses the
following minimum steps needed to create any servlet'
/. =rite the servlet
a. $mport the necessary Bava pac%ages
b. $nherit from 9enericServlet or the TT0 convenience class
ttpServlet
c. verride the service method 6this is where the actual wor%
is done by the servlet7
d.Save the file with a .4ava filename e"tension
. Compile the servlet
a.a%e sure 4ws.4ar is included in your classpath
b. $nvo%e 4avac
E. $nstall the servlet
/ 12 /
-
8/19/2019 smart card.doc
129/213
PROJECT REPORT Smart Card Health Security System
a.-se the Bava =eb ServerFs Administration Tool to install it!
and optionally configure it.
R. Test the servlet
a. $nvo%e the servlet from a BD?1.1,compatible browser.
=eFll discuss each one of these steps in its simplest form.
There are also lots of servlet e"amples complete with wor%ing code.
,rite t)e !er0let
The following class completely defines a servlet'
II$mport needed Bava pac%ages
import 4ava.io.H
import 4ava".servlet.H
import 4ava".servlet.http.H
II Create a class which inherits from 9enericServlet or
ttpServlet.
public class y
-
8/19/2019 smart card.doc
130/213
PROJECT REPORT Smart Card Health Security System
ere we handle the TT0 9T method by building a
simple web page.
I
public void do9et 6ttpServlet(e#uest re#uest!
ttpServlet(esponse response7
throws Servlet"ception! $"ception
0rint=riter outH
String title N Oy
-
8/19/2019 smart card.doc
131/213
PROJECT REPORT Smart Card Health Security System
X
DonFt forget to save the file with the name of the class and a .4ava
filename e"tension ,, in this case! weFll use y
-
8/19/2019 smart card.doc
132/213
PROJECT REPORT Smart Card Health Security System
where server(root is the directory of the installed Bava =eb
Server.
In!tall t)e !er0let
The process for installing a servlet into a web server varies from web
server to webserver.
-
8/19/2019 smart card.doc
133/213
PROJECT REPORT Smart Card Health Security System
o Clic% the Add button and you will see your servlet name
appear in the list of servlets in the lefthand pane under
Configure. The righthand pane will have changed to two
tabbed panels ,, Configuration and 0roperties. =e wonFt
need these for our simple e"ample so simply close the
window.
Te!t t)e !er0let
$f you successfully compiled y
-
8/19/2019 smart card.doc
134/213
PROJECT REPORT Smart Card Health Security System
A session is a series of re#uests from the same user that occur durin
a time period. This transaction model for sessions has many benefits
over the single,hit model. $t can maintain state and user identity
across multiple page re#uests. $t can also construct a comple"
overview of user behavior that goes beyond reporting of user hits.
Ser0erSi/e Se!!i'n O+
-
8/19/2019 smart card.doc
135/213
PROJECT REPORT Smart Card Health Security System
After the user has been idle for more than a certain period of time
6) minutes by default7! the userFs session becomes invalid! and the
corresponding Session ob4ect is destroyed.
A session is a set of re#uests originating from the same browser!
going to the same server! bounded by a period of time. Loosely
spea%ing! a session corresponds to a single sitting of a single
anonymous user 6anonymous because no e"plicit login or
authentication is re#uired to participate in session trac%ing7.
U!in- Se!!i'n Tra%7in- &r'm a Ser0let
The following e"ample uses the do9et method from a servlet that
prints the number of times users access a particular servlet.
public void do9et 6ttpServlet(e#uest re#uest! ttpServlet(esponse
response7
throws Servlet"ception! $"ception
II btain the Session ob4ect
ttpSession session N re#uest.getSession 6true7H
II 9et the session data value
$nteger ival N 6$nteger7
session.get*alue 6Osessiontest.counterO7H
/ 1(? /
-
8/19/2019 smart card.doc
136/213
-
8/19/2019 smart card.doc
137/213
PROJECT REPORT Smart Card Health Security System
output stream. This guarantees that the session trac%ing headers are
sent with the response.
St'rin- an/ Retrie0in- Data #r'm t)e Se!!i'n O+ /
-
8/19/2019 smart card.doc
138/213
PROJECT REPORT Smart Card Health Security System
Sessions can be invalidated automatically or manually. Session
ob4ects that have no page re#uests for a period of time 6) minutes
by default7 are automatically invalidated by the Session Trac%er
session$nvalidationTime parameter. =hen a session is invalidated! th
Session ob4ect and its contained data values are removed from the
system.
After invalidation! if the user attempts another re#uest! the Session
Trac%er detects that the userFs session was invalidated and creates a
new Session ob4ect. owever! data from the userFs previous sessionwill be lost.
Session ob4ects can be invalidated manually by calling
Session.invalidate67. This will cause the scession to be invalidated
immediately! removing it and its data values from the system.
4an/lin- N'n"''7ie *r'(!er! 5URL Re(ritin-6
s The Session Trac%er uses a session $D to match users with Session
ob4ects on the server side. The session $D is a string that is sent as a
coo%ie to the browser when the user first accesses the server. n
subse#uent re#uests! the browser sends the session $D bac% as a
coo%ie! and the server uses this coo%ie to find the session associated
with that re#uest.
There are situations! however! where coo%ies will not wor%. Some
browsers! for e"ample! do not support coo%ies. ther browsers allow
/ 1( /
-
8/19/2019 smart card.doc
139/213
PROJECT REPORT Smart Card Health Security System
the user to disable coo%ie support. $n such cases! the Sessio