0% found this document useful (0 votes)
5 views

java assignment

Java assignment unit 3

Uploaded by

jaishwaljaishi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

java assignment

Java assignment unit 3

Uploaded by

jaishwaljaishi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

declarea tannot inkrlae

deelan
Serylet Serulet. javax. ie
iotrfoss
to allow not does Jara
1initO
doXxx.
Analysiz tftorm Service
Ready
itializotoinit() dzstroyC)
(Destruchon
Lelientregsti
Tnstatiahoo baqelolleckor) bor
"class
Servtet
erverinnoihb ucb
SerdetotatrUE. ta-the Reguet LL
C)
Thread
Bservite Toread Containet
hred) Serrlet
initl)
vlet:alSes Machin Virtcl Jara
qazbag Thally Destrayed
Colleeked looded
Serutes trtiakead Zaskaotiake
Toibicalizdl e be
hoo desicihe cyce theLe Serlet Explaus
senlet
Page
Date.
Page.

t hau toidecla e acohermethod such cs ait )

init) ls duclored
publk vold ini (Servlet(ontiy aotig)throus Serdletta
tephon DAtaikatiotoAiekshaseecst
Duriog intiaizahen the Jervdet hás aces to hoo.
Objeck a
" Servlet (onhg
"SeryletContext
Thi% because to initc) an ohËeck oiSerslef (onti sk
pased a a paramekr
ASerrlet that Cannot tompleke t initaliza hog
prores throw oavailable Extephon

A.Serice C) : After the seryer load-nd initalizg the


servlet the 'serrlet is able f handle client requs t.
# proceLs: them io serviieU. Eacbieliend sequst to
serviceC) s rUD L SeparáheiiSerylet thread.
gervice 0is delud os ollow:
public vaid gervike (Servdetkeguest teguastetuletRspona
respense throat SenulekExcepha, TOEztephan

on eycekyiLeqest oth Lervlettit eve mehut

gererlupane
Serelcee')
1.JD
ODBCB- query
IExplaio
IDBC
Tara
applica
Javabon
Coito
BCDrirerJo
o4
the S
illeNOt
ca Q
Bridge tabase.dlara

bA.
data AP/
oith JDBC
plw prive JpBL
To
cObne
Drlres
oDBC APL
tanol
Utes
daiser atabak
dhe
exeete
bridgi behules
ther act
suQnddriver asLa
boacadatabaseieonnehvihy
lype-l
mechanism Ues stondos d ODB
b'daz
9he JDBC-A/ anes otabcu
drie to prou'de JoBc
catabes

Such C Sunjabe odhetgalb Odb Drer

Java Appl'cation>JD% GAP JPBL olaier

Daivet> Data boyi broy APL t Dakabu

Advanteg
Eass to conned ond aliectty conngekd to tu
dodabase

Dis advontage
esloer a'a rivers becáue oY ceach
Lda tebee acieA 8fakmont
tonvert fnto ODBeic alls ,bSGCals
ineet ho
vte-versa
Jawa Applicahon
JoBe Api

Bridge Dider ihx


DSNI
Drivey bDBC.
DI3
Date
Page
Lype 2. Java, Naive
ArL, paxtly jova davens
LAlahve APL pantly ava daiver
lcalls ico call onthe
cient coDeH
APL, Io9c methad
incor far oracl or otho eM usually deuelopd
Javo
hpplication >1ps AP ’JoBL Driver
Moncgey Nahe AP,Pauty Java Drier ’
Alose Ap > Databae
|Java fApplica hion
Na ie Ae Dier!

atve AP|

DB

lype 3: JoveNehork Protocal Driven


(. They ae ortten in pue java and use a
Vendez iodeperdett nehoozk protocol to communicat
with
. bilow Brtier Comnunic ho Approcch -Not
vendoy Specaße
Java stpplicah'o IDBApi ’ doßc Drier Managsu
Protocol Drier t Midalesane (Arplicaton
Server) t DiHerent Data bas Vendor s
Date

Page

Jeva PpplicaNon

Type 3 Drive r
net (ommon Protocol
Mddlewe (omponent. or Ser ve

ye 4/ Nohve (Vendox Spoaeifie


purave deiver. patabau) prooeol
k(ompleklsy
coriten in jave to achieve platervm
indep1ndenu
Jara Appliea hon ’ JDGC Api
Manage Y ’Nahe Pratocol Dzir JOBc Driver
4> Detabeue
2. This chiver
dheiver maks a oiret call b
Spete dababas Wsiag speib vender -
olatabe -pcat
Java Applicab o
JoBCPpi
Thin (Tue 44 Driver.
Noi ve
Date.
Page

roaram
Abide a trlet program to Uawda the
Wconau ndpsseovc

'DoTyDE htmt>
<htnl>
<head
Kmeta charset "UTf -3 "
widthdevie aiak
<meta hame s"viewpor

<head
<bodu>
Kform achion Validak Sevice
type" kxt nam ="xtuer
<ioput tye
<by
ass1sDYd <input hyne password". namne:"pass"

<input yne submit " value "Zogin "s


<torn>
<'hody >

Nalidae Servie, java


prakeked oid proces Regu ( Ht seuletRegusl gut
HttpenletResponse fesponse throusServlet 2eepa
(
Tespong i set (on knt Iype Heat/html; Cbarsed UTf-f)

try L?rinkLloiler'Dut resparieGetlalelkr0)


String Unam zrecuest qeParamekr l"ztes)
Date
Page

iPass. |QMala ("Se1yle "))


regupst. setAtribuk ("Ue bam unumm
Tepust. SetAtribuu "pasSworepeass

ele

QutpziHa ("Thtorret Password "),

You might also like