Download as pdf
Download as pdf
You are on page 1of 37
ve FOE Rage OLS AOS 02]07) 2022, ‘Total No. of Questions : 8] SEAT No. :[1\9941G336 P2310 [Total No, of Pages [5870]-1134 T.E. (Computer Engg.) WEB TECHNOLOGY ranse (2019 Pattern) (Semester - HI) (310252) aS JS SO. Time : 2! Hours} ~ [Max. Marks :70 Instructions to the candidates: - 1) Solve QI or 02 03 or O4, OS or 26, 07 oF OB. 3 2) Neat diagrams must be drawn wherever necessary» > 3) Figures.f0 the right side indicate full marks. 7 Ba —- ‘oni thy QI) a) se difference between server side scripting language and client side Scripting language. AY At 15] b)S Describe servlet architecture in detail. 5° ll t c) Explain DTD in XML with schepes elements & atributes. 191 Jt BR ey — ation 02) 9 What is session? How céokits & URL rewriting forsession management : oa we in servlet. x Ss 19] & 4b) Write short note on'—/ ¥ i) AJAX > ii) XMLtransformation eo aS vy a a , AY ok QA) Explain life eyelé of JSP. Write advantages of JSP over. servlet. 19] &+ (BD) Write a short notes on S vat 3] + i) SOAP &X i) WSDL SS > OR S 04) a) Explain streets framework with its comporientssAlso explain interceptors. > 91 b) Explain JSP support for MVC i.e. modelyview controller for developing web application. % 8 wo 18] ov LS PTO. se we a Ce Scanned with CamScanner BE a demas one e Ra sortoynton Mee NaN ed ji Oc M Comectiy iNet AB Wie der ene MF Sores NEY wwe wt . - OR > ste yp os : Abin ¢ WM PUP wth came, — ample SeSSion pp, MgeMen, Scanned with CamScanner WT Unit -3 a simple serviel te print “Helo, NpOK java. lo." ) pork java, sevied *; ‘Amoart avo x, Bite: Sevviet. Fe hulp. 5 public cleus Hello extends Hapsenviel £ public void dotet CHtt pSeruted Reque 4 request, 4 response } ghigws Serviel Exception, JoCaception Good day" S i HtpServiet Response Banker Fe5PO Nesponse . Set Content Ty pe (text | ht ml"); Printyiter out = response, geslunterd), gut. printin (AIA Hello, Goad day Enter Password: , fu cil \inpork Jove 1007 : most java. Sevslel Fj x, \mport java, sewiel MEE i rapgerui! { oe public Clase servlet extends Http , [, HeepseruletResP public void daar HUIpsere REN et Excel an ye sponse ) yhrows poRxcepher : Pp tray Wy: rer pense: Serontent Type Cent ‘nel i) « out = vesponse qetwnter } "), ko Secviet j Print write out pantin, ("cha Welcome 23 + ge. Explain session § cookies IN Seles. _ + Section Tracking Cranagement) - len _Secrion Lacking sa ay TP mainkain stare of aN ANS ~ Tk is also Known as Session management 19 servlet. = ule need te maintain the clue of dn user te recegnice a partway user. 4 . - Germ most oF Lhe me, He don't only want ty mu n lain the stat of user, We have to Store Some data nto sessON SO Lat Wwe Can Use in future requerts Te Wil require mer lot OF efforis if we try te implement this — thats why we need Session Management wer and J2EE sesvlal beth nology ~- Serulet APS provides Session Managemenr Ehrough Http Session Tater (ace. = tkpSession alloux us te set objects as attnbuks that cn be yetrieved in Future requests. + Cookies - - A cookie is G Small piece OF information that is persisted bern musiple Client yequest, 2 mostly Used keshnolagy for session tracking. - Cookies are - Codkle is & key-value par of \nfermahen save by the seve Fo brewer. Sewer CaN idersty the client by using Cookie : Types of Cookies = . = cookie - Valid for Single session 1) Non. perelstent a) Pergiskent (eokie - Valid for multiple session Scanned with CamScanner e stale NS an Launiny (h “(0 Ks ag ied gechnolo94 man J mai nielned y chien of eee yal ee from the JyrouosPl- 51 ceil DOL work If cookie Or, oa Ma Skies jet: c ‘ san can He ‘ ee 9) ONY Hvar See i= sve de a a yn sey \ 5 i - i _senlin yen giee Seo vue ipling acepls wed Cookiet prcaedvantoge ! i pin is le soe er- side SCY sino. nich 14 subm $ Tr client side data ui be acest prwwsed ares Tne 1pet fore Ye use. cient side seme ie Bronier wncrependens japle to 4 prowier de erent. | — - ie wis bid ‘ Vble to | Source code is Met [ sJ Source code 16 visible Gun e Code cause pul wae ic an HEME Page jof sevuer fide 1 us 4P¢ all about the Ake racHon wlth Servers. PHP, Python, Tava, Ruby are used ———— Tess security for dake More secunity for data gg, Whte a short Note On Servier Concurrency. => = Comuurrency means handling mutiole Computations ar same time, - On server side, multiple requests the same sewiet May be exeuutd ar same Lime. . eb server IS mutti-threaded. = So, Concurrency container or |xe(tehon PVOCEss. vasaipt ofarme, 65 4 Ta are used - Each thread. is Ge Single ~ Th ig a basic UUNiL oF CPU Ubleaghon, Consish seam , ishing of olan Pragrany ~ A program 1s multithreaded whe i Single insane of preces ptogiom meses prsacs enetitles : chiens request = Biseniel mutt be capable of Serving More than one i eA at issues mmudtiple requests cur the same = Sewice cl, etek) an See oe eae Sot clients , doPost () Can Handle maby concurye nt - Tk usec \ \ 6 Nock mechanicny to synthronize the threads. Lime, Scanned with CamScanner g vimitaions © ic, % wage 3 % 4 markup Lang enables Uw wes fae be anguiage oennng fil 1095 a te warty WIND ie independem x cut sttu 5 gor tware ch o5- ple une fn for Manon: sana vedere arm 09 ane and 99 i ae can bE changea oH any 2 rit for transl J yato0 Z ae et eho cr ffeC Ng the da ‘9 tome Yeadlable s understondan\e vifies data shang. » ae sas vatidahon UNING pTo Scherna. + Limitations of XML - aan. aria syntax’ OF XUN yerbaie ¢ redem “ “ ¢ ransporvetien cost * g the Sfdudancy jn ere Causes high storage i dable. = gx dorumend is 165° rea > othe file size of XML jy usually very large. ays . 9 xrrL cloes not support ot 1 \ mt and AML: 2 ano. Differentiate berseen X tt 1 TrAmMe stands for Hypertext marku a{Tags ore ot Predefined. amt is dynamic IN Nature, Te is used be desmbe data 4 fecuces on Whad data ir propertly Nested, Stylesheet for at cated XSL ‘Ompudlsor é 7 the ony 6 formatting | __—___—_—_________| ap XL Te neither prog/amming ner presentation Language pe vise ee [tags are [Togs Are | it is |S controls Hav data 76 displayed Some HIML elements. Can be TEU Not mandatoy markup language redefined L is SfaHC IN Nature, used fo display the dala Improperly Neste \ oth ited d Win ylecheet for Him | Compulsory. Loic not tage y to doce HIML 1s presentation \a guage Scanned with CamScanner -& ee ot Ee, ~ oS awe “ S a Bessey et as 5 g : Te fa are components Of XML Document - Explain any tuo. £ Amt document is Composed of a Number of Compenent« {he informahon IN Co can be used for repeccenting ML Components Ore: ML Declaration 2a Tags 3) Clements u) ALEDUIES 3) Cornme nt NXMIL_De chavation :— = AR XML derumert Usually S tion Stakement declarer Lhe version of el | vee peclaratien docume nt encoding that i¢ used fe store tarts with 0 xiie document dedara- ocument that is used % ‘define tre XM ad- ke may alo indwedec chavacter 7 trancer the decument oO yl - Bis antken as— “<7 xm) version=" 1.0" encoding «" uTF-8! 2> - 2) Jags = —Toas ore means of identifying data. (<>) ~ Tage consists of opening $ cloging angular brackets Tags occur in PATS Je. Opening tags J dlocing tags. ~ There Ore thice types OF bags: i) Gpening tag- Ex. < beak - Name> ieee taq- Ey. " cnelegy with an e€ > - XSL standy for Ey enciable Style heot rample. xsi 6 @ styling language For >t guage. =XSL is GN Inttrtrediary bet the xine elements § the browser MEL tell the brouxer how te dispty the xML Clements uch as . . — XSL documert provider tke browser WIT) Infermahon ads OF) how ¢ f display an XML document -xst wa family dF Vecopmenderons For defining XIML document transtrmaher,5 ercyendatren: Seer. deinds Sr XSL Transition sot iy a transfermaion Language for XML Scanned with CamScanner - hom ti Wandexptyn wera Clore AY vow. an existing x. Tig Wemneptage aie yee of clorument i lacy . > ; ry Spe a Ganform Ut AR author te link a Very Pe at Allows an e a" He allores ia laced! loves an #™OL dowment to be a ig (hal cle xl Lians foray The yool clement Stylecheet 1a <*5t Cxample > stylecheel bype m This fine Meticalec tnal thie “Browser or Http Request [calbacko] chylesheed > OY © cClagc.xl" OD weet /XSU) Heel pe trans ryment S$ houde th the _hde of cxample web Seivey Businece logic impleme nteahon + | CPF, Serulel ,etc) | @ Ajax wor ke vi Http Request pitt ea F @__ XML Data Data exchange Javascript tint Cay ss Data Darq Storage Precentaton User send a requect from the UL ana iavascriot call goes to ae ee ee Object. 4 4 oe - Wp yequesrk sends to web Beet q ee ow by xMLHLipRequest = Then Setver interacts Wi e database FUfing | , Sewlel, ete. Se Eating Jee. PNP - Tala jc retyeved = Sewer Sende AML date Or JSON datz to the xml Http Requect CAM Pack C), Some eh Appli@tions that make Ute of aiax - ‘) Google Maps J . 2) Goagle Suggest 3) Yahoo Maes 4) Gmail. Scanned with CamScanner - Mw pip defines the of XM document pean (eck Une Validity XPIL docarment F are DIDS Explat D is a Document Type chrue xen DIp Can be eithey ik cam be Kept im Scperate document: Folowing three vulec: aes How a5 bee eye clemens Ca of structuve an cpeci fied inside Khe wot K? finbuter d vocabulary of document OF tired to (CGE seal documey, - Ord Nas y Specifies Lhe Lagi ¢ aly nbudes 2) How i tag’ combine § recise. ca chovaclers. a) Species the entries HICH reprtrents spe! — syntax of pro vy as @lleos 5 7 _ When tw Use a DTD? eave frorn with DID, you cap erly. the data you rece! the ouside world We Valid . a) You can also use & DID, bt venty your own dara. 1s, Differeniare bet XINL g ASU. — . = xr XSLT NFL Stands for extensine | xS\% stands for X6L Transformahan - markup lanquage XML ws Used for stenng data an skwuctured Format KSLT 1s U8ed For EransFemir eae And alse for Formatting! v 4 XML does NOL perform transformation of dota. ASL petforme Lvan «forma Mon of oh] XIN document INty other document Katy VC 4 specialized Langua ge Used to addrere Portion DE xml document - YML is Neither programm) nor presentation language, 2 eee eee XML looks Vike text Content. ASLT utes KPatn for Kwanthorming ¢ formedting XML document. xT ig a (og fa : pom 9 mm dag eg fox procescitg| IXS\T loskr Vike Template Scanned with CamScanner : “O-S\ YU, @ ic. wha ave xrat Schemas? How are 7 bo aee hema Deon, Ps > L Sehyetac a ac XIN SC Ae > + xmL Sc on the structere g Contents &y ‘ i ~ XML Schema 16 commen} da ~ Sa ic aed te cernbe 4 of XML document - XML schemac define elements, ares ~ XML schema element supperte Namespaths: ; ~ XML schemg 1s XML peed Crore power ful) alternative oF Drp + Strengths = Dy supports Data typer Dk is easier t descnbe Qltowable document Content DT ic easier to define restrictions on dasa " Th is easier te define dala formate, S Th \c easier to validate the Correctness of data. : oe Schema ave better than DID. + ~ Support for pimiive data types which facili Vi xm ith othe ped dake’ + Oh tia SUS — The abilit deh : aren ane, Ne CAStom data types, Using @capswlation — Compatibility With ot ; , tel! cewied, ore her xm tech nolegies Vike XSLT, Query | “praides es fess contre On AML ctruchyre F MOE Contyol on Xone chructure, Whereas onl adtnbuter 6 data types. Scanned with CamScanner \ — WIT Untt-u Vb TSP) Write Advantages of TP over servlets — Java Sewer Pager (469) technotocy enables you ty miy NEQUE, SLAC ELTON into Aynarn ie Content - Je Ante quae VAVIOUS Javer appliecuion terhmalegies such a¢ Tava sewlel, Tova Beans, Crterprce jaw beane S$ TDC , Ravantoge s OF TW over corvlet ') Auto Complcuien ». when sop Changer, 6 Cowverponding serulels art duhm aired, NWIENEVaked and asp Container Ausomahedly teleads them 2 Pletk form independent - — ISP kechnetegy Can Vun on on — ALAS Suppevtrd by wide Variety OF toole from prustiple venders 3) Easy and WApid coeb evelopment ~ JSP Pages Simplify § Speed Up Web development procesr ~ ISP provider yeusable components Gavageans, enterprise. Java- Beans, 78° cuctom tage) to speed ue web Gevelepment procers 14) Eary mantainance ~ Ss ISP server pager are easy to maintain wecauce of 1 seperaken of application \agic ¢ page clecign, 13) Power of tava sever (ide Tava- | - With TSP ik 1¢ posible to Use ant Featuies OF java ‘\nto | web pager |— Tova platform provides extensibility OQExglan Vite cycle of gop [> Phases of J5P Hike cyde — ‘ Translanen | a) Compilation .. 3) Wading and Instanhating Y spine SS) ~\spService oO ‘) 3p Destroy C) ') Translation :- ~ The jsp page Lranslanen proce iy cebermined by the Semahacs ‘In jsp page - ~ The Semantics ‘includes divechvec, actions § Custom achone in JSP page. ~ The page is read, parsed ¢ validated ‘in this phase, Scanned with CamScanner y Web server. ints the enterprise, ee NE A WAL 2% nahen. translation pha Aa. % jovo Sle (read ante the ri NS 4 the clare He alidared und syntar eves 9 | ="! - Bl the java cede syntay IS vali = are reported in thy phae D Leodeg & Jestan hahing the memory 4 Acodieg £ Ses into the y “he sul tnd Woe OI fr eantainer create! afte, GuerectAu Leadteg the serie indance cf scwle lacs u) spl ) spines / al - js UY Method ‘re called only Once IA the 36? Nike cyele ae ate itn ie ce perv im Inibializahons yeepuireet Yr ~ an this method We the servile 9 ~y9peawye The request & Tespence ches are parted Wh ENic method Ashen each client vequest ic received te che ISP page. ~ JSP seriptlets | exprcsions re processed § Included in this prace 5) Asphesttoy O - : \ yspDerticy () method ‘i¢ called ab the end of Wee cycle - Thin mefhed iy Caled When the Seyviek instance 1s Taken . cur cf the servile ~ Any cleanup cpciation can be petformed in this merhed - 03 Lisk G AMaborate any S jsp Implicit objects With example Implicit Objects Implicit object Ave Predefined variabler used to acess ey vequert 5 applicahon data. o Lip ebjecte of TSP Are: / oud 2) yequest 3) ‘¥eCponge & , g) excephen q Ponte 4) session <) page 1) Our - — Bype— Ispuriter - Fer wnting any dala (ht the buffer, jrp provides out objeC4 Ex. <% oud print ("Helle Goed Bay mS 2) request : ~ type - Http Servlet Request — qF is used FF each jsp requert by Loch container. Ex. Ze name = request. 42 Parameter name) ; . “ of ) pw print ("Welome' + name); >> ’ Scanned with CamScanner fon (= c. WipSental Responre ny used t add ov manipulade rESPENSE Ey eoverpence tRedivert Cwuw goegl® rom"); 4 Ly SecGen 4 Type - HtkpSesrier - Teo led te sed ger or delete altnbule Ex cession. Ser Atinbate user", Pame), s) PAGE ~ - tupe — Chjert asc ier clact _ytis aisigned te the reference of aude generates servic , Ex Cbyect page = thc ; 6) extephor - kupe - vow able . = Te Wy led Fe PANE the © xception Ex. Qu Components of TP ; : =s Componente: Comment 2) Declarahon 3) DireChve Y) Scviptlef s) Expresnen S Commant — - Used +2 add comments - syntax - Lilo —— Comment —— %o> a) Directive ora Centre) the precesting oF ennre page. = syntax - Cte divecnve > 2) Declararice :- ~ Used Fe Betlage variable oF meted in jc PAGE Syntayx- & Sciptlet the java cede ir wntttn inside the sMetlet tag = cyMtay - <%e SCnpilet “> s) Exprescon : _ peed te epresem Er PIeKON IN jC Page ~ SYAtar - <%= RYPTHISION “> + IP Picgiam - <2 @ page language ~ “java!” content Type » “toc ptm!" %> tere, 2 Rave added fee 5 page direchve 9d) Cx Pression <1 Kt iS § execu the expression 4 Scanned with CamScanner “ae! Serves i cat pal aerate 16 & Client Server Application ov Application _ See pened fey Commun\(ahion. . ipa cmerhod of Communt cation ber two devices, -qr is 4 collec on oF aes ot protocols for exchanging : : rm two devices. . nT AHO PE er the internet or onvaie Cintranel) Nefioor ke Bere Clandardites XML MESSAGING Syclem Model ty tho veew Ure l $ Ane date ¢ Oe Scanned with CamScanner I chavacterigtics - = layer, x bo erent the cata § cara SlONdard zee XML Mesraging 5. lem 2) ‘Sesely coupled Gg Sty ~ Wa c he web cervice Manges, i chews Vent cally the Web serice enn Asya chrenoy Functhoravity ~ Son ASN oS Funchonality *- y es Wding OF Urer fo the execution of + Roynchtongue Ope takons \ 1 Whours a USEF to Invoke q Web ¢ Y§ then EXCCUR Other Functons ‘in pavatles, a Y Supports Document exchange + 7 OMe OF the Key benefit of XML TC Itr generic way of XEPrE senting Not o | Ny data bur also Complex documents s) Coarse grained ~ © An Wis, a Gu objects hola of @ yelaid dea, . acd | ~ B provider broader Funchonality QC Compared ty Fine. graine: | Serie . 1 OF. Explain Components of Web serie, —> Components of web service — . Web Service Discovery § Publication Cupp) QWeb Sevice Descri phon Gauspv) D¥XmMe based Messaging (so Ap) ") Dara level Description Came \) pps + a / “pvt stands for Uriversay DESCripHon , Discovery S Lnieg sagion, -UDDL is an XMUbaree standara for Aeccriping, publishing inding web services. ; Gop ty ctashons ‘\ndependet, OPEN Lource {ramework, es ~ VOBT uses *WSDL fo describe inter farey of web serves. Scanned with CamScanner SS EEN, 2) WSDL © : ation language. Na a — usp, stands for Web senuice De ee is used f derennn = ugspe ic an yme based language : , Webs serine ¢ Hew ™ acest | ae of § 18M = Te vge jointly aeveroped by rircyose fy series: 2¢) - Tis q standard (aymmah for descnibing w = WSDL is G language wed by pool 3) ONE = tol. - 3 fh 4 Accese PIO safermation bel 4 ~ sonp stands For gamle aby eC c q - Pe is an XML bared protec) Foy exehangihg compuk tf . . - Sone is & communication proftol. Fy is a formnor fer sending messager - = Tris svmole 4 exktnsible “) SEL = Language — xm standr fot Extensvole markup lang ge —*INL Used fo tO tne data. 4 = XML ig Used td desonbe the dco Fe ay is ce kext based parkue Language J 9.9. Difference beth sone aod REST :7 SOAP REST Jeane stands for Simple REST Stands fer vepresentaticna obyeck Access Protocol. State Tansey ay Soap 1S 4 protocol. REST i an aychechura style a SOAP vequites Mort pand- | RET Teques lege Dandu ith Width 4 ecouccec nan § wsources Than SOAP. REST. - uy conp arfiner standard s REIT doer Het define foo that are followed stncty TRANG Standard, Wee SOAP. same ws is the java APL | JAK AC is the java APL 7 fot sone Web services. Sot RESTFUL web services c\VSonP Uses Server INterface | REST USEC UY . . : Ri to expos fo explo busine sr logic. pusiners logic POSE. Og. Draw $ explain near diagtarn . whe struts aiditecure. cohich depicts riv( ho Scanned with CamScanner Genurolter | View ee Esse] f\hey Free Marker Velocity value stack / QGNL The MVC architecture in struts 2 have Five components Xy Struts 2 Interceptors a) AcHons 3) Nalue Stack /OGNL G) Results 5s) View | y Stwuts 2 Interceptors = an te evel 1 Ghote a Interceptors Can be cangigured according y * ackon. Co. ; - they Can execuke 4 code before 4 atk the action is called | -ngerceptors Kelps_ IN ienplementing type Conversidns, object { population, Vatidations, File upload, ec. | 9) Aco OS = . - Ackon is & basic core, UNE Of Struts 2 Framework. ~ Eau action provides the processing legic for specific URL With Bhich iE 1s Hoked. i . 9 19 - Actions are macHy ascociated ith Here requests by Wer: 9) Value Stack / oant- SOGNL 1s aN open-source frameuoris Used tm get properties From Tava Beans. . : — pane provider A way to acess objecte Uithin value stack. = Aalue clack ic @ Stack of objects. 4) Nieuw) = - Finally, the result ic prepared the view and returns the vesulks te the Oe 7 Scanned with CamScanner ye Fa “erent COMEVGULA Yt INNA 0 Whal Art ane . Pepin cath (on guration Nag 2 E . 2 € ‘ Se any strut oer wequire fo develop male > Contiguranen ; ) web xml 2) strutcxml 3) strute- Config: xm! U)struty. properkes ~~ once O10 E configuraien ile Hhat deler— NY web xml ~The web xml file i6 a TRE are processed by Mince hao elements In Lhe Hip Requect Lhe cewlel (ontainey 2) Struts ¥mi- ~The struts xm! Fle lea Configuration file that config the infermarion GNI you will be Modifying Gt achane Gre devdeped SARE Mle Can be creced under the folder WEB-INE/ Classes 9) struts. conbig.xm| - The Struts. Cnfiq-xm| Confiqurahon fle ica Jink etn view S model OF the Geb client, Bub you Would not Nave ts huck thewe se|ting: of Your projed. 4) Struts - properties + - The con guration File Provides @ Mechanic~n to change the default Séteagt—ef behaviour of the framework, OU. Explain vatioug ep Directives. > There are tree es OF IP Directyey. Y page divechye “Np rechves 2) include directive %) tog library divectve ) Page directive — Page direchue Gwer high-level \n i | Setvlek thay will erat From _ooe about the Page directive include Vanour altnboutes; \mpore ay =xConter tly’) language 4) Sess}0 L 1 S) but So) INF 9) extends 4) Evvofage 4 ) bu ae Example. “*® page import" java.io, & "KS ‘A@ page language "java" SebContent,-" text/ Akon" Jo ‘Type Scanned with CamScanner ——__ SMYS Ure 9 a ectwe . Adiade awechve is Used te copy the content of one _ “SSP page ft anothey, - one hap pan \E You have commen cource for more than \e. ~ Examole 3) Taglib directive - an - Alles users to Create custom tags In )sP- = taglib are easy fo maintain $ muse. Example - . i Fixe Tmy leg ee ssp us slouer than sevvlel al In MWC, qrpacts as view. Scanned with CamScanner ‘ - yameem“ _ oi. classi data type of Php 4 desenne “in each type: ed OF Ss Dara typec In PHP AWE classi ) Scalar types VY) Integer > ii) Float sid SING w) Boolean 2) (ompound types p> 1) Airaus ° e Ls Wi) Object 3) Speciar types i) Resources 1) Null ) doteger - : . . sts _ Integer ie stored ar A signect Integer Cait ee and value - The erp var-dumpl) funchon tetarns the oF vanable Ex. Send ty the web set ise out oud af TeEPONSE the Drowsey. ¢ 7 We wel Sever sends pur code -- hello.php ntm)> PHP tect <2 ohe echo ("

Hello, World

"), 2? Khedy>

Hello, World

9.3. Explain a typer of arrays in php. > There or ee! pe OF Crrays. Nindevea Airy - Arigay. anh Numeric Index a AWoCatve Arvay-Aiiayr with NGMed keys 2) Muthelimendona’ Arroy- AIFAYS CONIGINING ON OF Mere ay trays Scanned with CamScanner Ny okey FARE Indexed Arrays © Objects TN array ONYGYl . C There are twe Ways fe creakt indexed aVays - i) Index car be assigned ausemnakically _ Slang = avray C“ Audi", “Bmul, "Volve); VW) Lnder can be OStigned Manually i seaye Le) = “Rudi * i Search ~ “BMw"; $ care [9] = * Yoo"; Example - -
47 phe . 7 aye .) dears = array ( Bmw", “Audi”, “Vadvo"; - eco “care ate". & Cars (o]. BSers oy having ‘\nreger jnaex Oye called indeyed > 215 "Pratma’ => 2); ist trethod 2. gage Ushweta) = 24) Sage UPratima) = 22; Example - 7 1 22); J. “years old": weta" => 21, gage L'shweta’ years old or ao VT, Scanned with CamScanner _ \ 5 Aime Ni Ayrays = 2) Multidimencionas ee move arrays are called YOUtty - _ thee, four of mo ~ Mrays contauning | Alen sionad AWAY hat 0 tne arrays © be quce sed = PRE Landetstands abn Vevels dee . ays © ~The Naluer 30 mmutidione NFONA aay Ging mustiple inde - . =mekhed Gyr Crearng multidimensionel atvgy ° Bays = array array (“Audi", 29, 18), ~ array Camu", 16, te); Cxamole + Cengider the following table Stock | So) Audi OF b | is cht Shim ? . C2 OES ay Sic =105 S144) q ($i S15 gir Sin diy * squate of".4i “Cube of" BY. eco echo 4] 2» 21 keen) Scanned with CamScanner 5. Besa “contal . mA 5 Titan. (explain Session Managemert in PH. ah - When Yo Work Lith Some pplication, YM open tt vee Some changes & then you clace jt This sy much KE sesr/on jon ¢ WHA - K ou ctayt The application The Compurty Kos Loken YOu star indeined Khe Wels Server you end. Bub, there TR one Problemy , On doer know whe yeu are § hat you do, because the HHp address desert cloecn't malntcuo the slate . - 30, tNs problem 16 golued sonny the “cer infor medtion fe be used in multiple pages In oNe Gpphication. By defaxll SCSrion variables last yntil He cer Clover the browiet, ~ Sesion variables hold the jofermation about c Cingle user , Mel Ore qvailable bo multiple pages 1a one application. = Session Ve gtawied ify Sesion starkO)) Ainction + Selon vatiables art Ser WitHGlobal variable: $_SEssTon Example: <1 phe Sesion start > ce vtowt the session ” cham? ' O6. Explain cookies in PHP. > - [Lockie are Ga cmeul bit OF textual Infermakon Sewer cends to the broaer aren that the - A cookie ic often used te idenhfy a ucey - A cookie iva creat Ale the the cetuer . ucere compurer. Each me the came compiler tee oO He Page with the browler, EM Send ct Cookie eau chy A = WK PHP YorCan both Create oy retmieut the Cookies uqlues Aavantages of Cookies: ) Remembering Usernames J PASswolds a For sing ave RSING 3) Custom tig sites We JaennGying wurer dunn E-Commerce Session Example

You might also like