50servlets-2up - 50 Servlets 28 Oct 2010 CSCC09F...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
50 Servlets 28 Oct 2010 CSCC09 Programming on the Web 1 50 Servlets CSCC09 Programming on the Web 1 Java Servlets J2EE: efficient, scalable server- side programming, using Tomcat CSCC09F Programming on the Web 50 Servlets CSCC09 Programming on the Web 2 Servlets b Server-side analogue of client-side Applets: Applets are Web browser plug-ins, Servlets are Web server plug-ins – Java objects that extend the functionality of the HTTP server b Servlets: c In an “N-tier” architecture, act as application server that lies between Web server and DB. c Can be instantiated multiple times as separate threads -- high performance. c Thread instances can coordinate their activities and share resources, such as open DB connections. c Can process data posted using https for secure handling of confidential info
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
50 Servlets 28 Oct 2010 CSCC09 Programming on the Web 2 50 Servlets CSCC09 Programming on the Web 3 N-tier Architecture b Nice clean model – put ‘dumb’, commodity parts up front (browser + Web server), put the intelligence in the server-side App tier b Good match with MVC architecture b What happens with RIA+Web2.0? c May have App-tier intelligence in the client 50 Servlets CSCC09 Programming on the Web 4 Why Servlets b generally much faster than CGI scripts because a different process model is used (lightweight Java thread vs heavyweight OS process). b can take advantage of multithreading (multiple concurrent instances of Servlet). b thread model allows resource sharing (e.g. database connection sharing) among instances. b Servlet continuity is provided by Servlet context environment that supports maintaining state such as cached computations.
Background image of page 2
50 Servlets 28 Oct 2010 CSCC09 Programming on the Web 3 50 Servlets CSCC09 Programming on the Web 5 Why Servlets b have all the advantages of the Java programming language including: c ease of development and platform independence. c access to the large selection of existing class definitions is available through the Java API. c extensible like other Java class, thus one Servlet can become a base class and others can extend it. b use a standard API supported by most Web servers. b are session aware – take care of the tedious details of tracking session-scoped objects. 50 Servlets CSCC09 Programming on the Web 6 Servlet vs CGI
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
50 Servlets 28 Oct 2010 CSCC09 Programming on the Web 4 50 Servlets CSCC09 Programming on the Web 7 Servlet Implementations b Apache Tomcat c Reference implementation of Servlets b public domain b runs on your PC under Linux, Windows, MacOS b used in C09 b IBM Websphere b BEA WebLogic Server b Macromedia JRun b Oracle 9i 50 Servlets CSCC09 Programming on the Web 8 Servlet Model Components : b Clients: Web browsers, e.g. Firefox, Safari, etc. b
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/09/2010 for the course CS CSCC09 taught by Professor Alan during the Spring '10 term at University of Toronto- Toronto.

Page1 / 30

50servlets-2up - 50 Servlets 28 Oct 2010 CSCC09F...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online