Professional Documents
Culture Documents
of Generic
the use
demonstrate
actical No. 21: Write a program to
servlet
Servlet as a paramneterized
state Board of
Technical Education 116
Maharashtra
Advanced Java Programming
(22517)
***'****
*********'****** *****
*************.
***** ****
*****'* ****
****'****
ses..af...SVst.
...A)...S.S.e.d..a...reate..
**
eh..ppli.catian.
..aMid.e...my.ntsxEac.e. .l.acc.es...n.cl.udi.
.c.wm.eMtrdion..
****
************* *°°°**°°**.
*****************
rle procide...8.etter..pex.k.or.mauRAtHad.cnL
.. eI..0...Xoceng.ing.. m.e..0M..1mOTyUrili.z.atrion
*****
.b.e.c.au.....le...uses.enesi.t...a....lti.hrrsdi r .
***************
***°**°°**°*°*
****"
***
***°*°**
**°******.
..S...ormpan£ud. .LDeb..bratt-tt..Sexe
***
.h..ntevact...ith..awa..S.enCvle:
****"***
**********.****.
**************
*************
**J*********** ***
**°°*************°*****
***** ***
**'°°*****
*******°***°***°.
*******
**********************''**** ****.***.
*********°******
****°******
*******************
*****
*********
* * * * * * * * * *
***********
**********
*****"
****
* ***** ******
***
******'*****
****
**** ****
. ***************************** **
**************
NII. Exercise
imeat. MA..o.y.c.ep.tion.
mp.. AX..rvle..M.l.et.ej.cep.t.O.
.ap.s.xA.
.m.pa. AIC)...A te eepian.,S.rx.l.et.r.eaue
...po. M.K..exvlet.Http9ex.vxl.et.&.esR.on.ce
ul.i.c..as..Rel!.aM9.8T.E.. ca1d..HIPe.8eTver
****** ..
..Xat.eLt£d...M6id.daa.e.H.Ipcexu.e.enuec.
**********
...MTIRs.cxule....Respom.c.e....h.ratw!a..
**********2******* .O.SXc.e..i.co...
* * * * * * * .
QYS..eM...A.uà....xcixnt.l.n.....e..a..MS.8T.E.
*********
R..Dte.cted....ai.o..do.oat.(.H.TA.p.a.AL.Mle.t...equcH
...TI.RS.exu.let.R.e.C.p.0.me.e....hxaLa....
***** ***.
...AACep.t.ia.
**** *******.
********
**** **
***
121
Maharashtra state
ra state Board of
Technical
Educaion
Java Programming (22517)
Practical Significance:
There is a possibil of
smtpservlet
developing 'n' types ofservlet
etc. for all these protocol specific servlets. like GenerrcServier
classes hrtpservier. pser.
s e
common super r class containing common properties and logu S0. G e n e n c > e r v t T s
not a separate type of servlet.
As of now Servlet API 1s giving only one subclass to GenericServier t.e
Hp>eT
lass because all web serverS are designed based on the
protocol http
Il.
Relevant Program Outcomes (POs)
.Basic knowledge: Apply knowledge of basic mathematics. sciences nt s e
engineering to solve the computer group related problems
Discipline knowledge: Apply Computer Programming knowiedge to solve me
computer group related problems
Experiments and practice: Plan to pertorm experiments and practces tw use the
results to solve the computer group related problems.
tools: Apply relevant Computer programming tecihmoiogies n c
Engineering
tools with an understanding of the limitations.
Individual and Team work: Function effectively as a leader and reum memcer a
diverse/multidisciplinary teams.
Communication: Communicate ettectively in oral and wrimen to
import javax.servlet.http.HtpServletResponse:
nublic class AthonticationServlet extends HttpServlet
out.println("Login Successfull"):
else
out.println("Login Unsuccessfull"):
ava.io *
mport
Public cdass Cliet
arqeca)
orgeta)
main (String
Gahic yoid
puhlic
Ty "tocal
hostT
hast
2rinq
i m p o t : 2.1000;
adreez
Inet addrettqetby name (hag+)
Tnetaddvet
(add, part+
6olut
het
Selut 0S 6eckt get OutgBream!
Shream
Oudput 6uf fer writer (ag).
BufFer
=
hriter bu De
Strin number "2"
numb e r +
Qendrmettaqt
S+Yina
25
iduuation
slate oard uf l echiival
Advanced Java Programming (22517
...A.nn.eri.C..xxle.:
..HIO...er.Mel.et...
.do.ln.et.L. &ad..PCNALTeer.are.pend..o.RL
***
....al.ana...uui...beade.r..infarmatio.n
*********
Sep.e.r.autE .n.af...adu
. * * * * * * * * * * * * ***** ******* *********-***********--
***" *****
Sexrlet.0utput.a}r.eam).. L px.oxid.e...9tr.cam.. .*
**
.hinamy..ata. . .
jnto..I.EAADAice.....CaM...bat.x.aet...get.Outputs9.txEOTOT
****** .
***
*****
... . ** .
******
****
***
***
XIII. Exercise
I. Develop servlet program to retrieve data from List and Radio Button using HTML
Forms.
2. Devclop a program to reccive student subject marks through HTML. form
or Failed in Examination...
TextField and send the response as passed
(Space for Answer)
*********
**********
prinaite.p..xe.3..t.o.riM... *******
******'***.
Se Vlet.Conte...can.cut..q.e serle.t.Co.nkeC);
String d.r.ivex.nam.e..Ont.J.A..t.n.d.p.ox.AMn.etr
*'**''********** ************** *************'*******'****'***********
.dname");
Pwnit.le..dniMeN.NGm.C.... dtive.name
p..lose.C... f'********** ******** * ****'*****
****
.*******.
****'*****'***°' ***'***''**°*'***'.
**********************************************************************
LA.Lh.App.
**
.Stle amE)...Ge.Lekn.ekw.ark.en.ule..name)
****
.SeM..lek.class.Doma.Sex..ek.x.S.em.v.le..al.a.eo...
**********'***** jPaMaMy. *************************
..paKa.m. me.cnome..p.oca.Ym.a.me)...
******
pNaXD.Uodue..um..jdla.c..ad.bc.jd.lC.odbc.dr.LX.ED
MN)....alLL.e. ********
********************
eyle..map.Rl.na..
*************°.
******************************** **********
Sexx.e. m.e).Stivlet.net.u6xK.6.exx.let..ame
*************** fx...o.. .dtexn...
****'****'****'***
.x.!.e...PP.i...g.). ******************************
**********
********* . *
*** *
****************** ' * ***
******************** *
,. **
**************'************'****'***"**** ********''************ **** .
.. * * * *" * * .
*************'***"*'**'**'**************
. * ************'***********
*******'********'****'****'****' '*'********* * ******
*******'*****'***********'****'************** .
* .........
****************** **************** ******* * *
*****************'****' **
*******'***'
*****************************
* .
***
************** **
**********'************** ************** **
* * ********