O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

servelt architecture.pptx

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Integrating Java with python
Integrating Java with python
Carregando em…3
×

Confira estes a seguir

1 de 16 Anúncio

Mais Conteúdo rRelacionado

Mais recentes (20)

Anúncio

servelt architecture.pptx

  1. 1. NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE SERVLET ARCHITECTURE B.ARCHANA I M.SC(COMPUTER SCIENCE)
  2. 2. SERVLET ARCHITECTURE
  3. 3. SERVLET ARCHITECTURE • Servlets are grouped under the Advanced Java tree that are used to create dynamic web applications. Servlets are robust in nature, well scalable and are primarily used in developing server-side applications. If we go a little back in time, we would be able to witness that before the introduction of servlets, CGI (Common Gateway Interface) were used
  4. 4. OTHERTASKS THAT A SERVLETCAN DO EFFECTIVELYARE: • Caneasily manage/controltheapplicationflow. • Suitabletoimplement business logic. • Caneffectively balancethe loadattheserver-side. • Easilygeneratedynamicweb conten
  5. 5. TALKING ABOUT THE TYPESOF SERVLETS,THEREARE PRIMARILY TWO TYPES • Generic Servlets • HTTPServlets
  6. 6. THERE ARE THREE POTENTIAL WAYS IN WHICH WE CAN EMPLOY TO CREATE A SERVLET • Implementing Servlet Interface • ExtendingGenericServlet • ExtendingHTTPServlet
  7. 7. COMPONENTS OF SERVLET ARCHITECTURE • Below is thehigh level architecturediagramofservlet. Let’sseein brief, howdoeseachcomponentaddtotheworkingof a servlet
  8. 8. CLIENT • The client shownin thearchitectureaboveis primarilyworkingasa medium whois sending outHTTPrequestsover tothe webserver andagainprocessing theresponseit getsbackfromtheserver. As wecansee in thediagram,ourclient hereisthe web browser.
  9. 9. . WEB SERVER • Staticweb server • Dynamicwebserver Primaryjob ofaweb server is toprocessthe requestsandresponsesthata usersendsover time andmaintainhowaweb user wouldbe able toaccessthefiles thathasbeen hostedover theserver
  10. 10. HOW DOES A SERVLET REQUEST FLOW • Everyservlet shouldoverridethe following3 methodsnamely: • init() • service() • destroy()
  11. 11. • Theclient sendsovera request. • Therequest is acceptedby theweb server andforwarded to theweb container. •Nowprotectedservice() methodis called bythe publicservice() method. •Theprotectedservice() methoddispatches therequest to thecorrect handlermethod based onthe typeof request
  12. 12. ADVANTAGES • Primefunctionalityofa servlet isthattheyareindependentofserver configurationandtheyareprettymuch compatiblewithanyofthe webservers • Servletsarealso protocol-independentsupportingFTP,HTTP,SMTP,etc.protocolsto thefullest.
  13. 13. DISADVANTAGES • Designing aservlet canbeprettylaborious. • Exceptionsneed tobe handledwhile designing aservlet since theyarenotthread-safe. • Developersmayneed additionalskills toprogramaservlet.
  14. 14. • alreadyknowServletsareportable(platform/serverindependent) in natureandhenceareabetteroptionif wetalkin terms ofotherscripting languages.They processthe requestsandresponsesdynamically.
  15. 15. THANK YOU

×