Server-Side Web Development Web Servers Request Processing ...
Recommend Documents
In this paper we study how to make web servers (e.g., Apache) more crawler
friendly. .... that the web server maintains a file that contains a list of URLs and
their ...
The Software Engineering Institute is a federally funded research and
development .... 2. configuring Web server software and the underlying Web
server host ...
locality is limited. The best performance is obtained with redirection in the network. _ ..... tools can provide information to a load monitoring agent in lhe server.
Facility location, Quality of Service, Web performance, heuristics. 1. Introduction .... It is used to check if a server configuration can meet the QoS needs of the ...
In this paper we study how to make web servers (e.g., Apache) more crawler
friendly. .... that the web server maintains a file that contains a list of URLs and
their ...
PHP & MySQL (practical) web development – fundamentals. 10 ... how does a
PHP interpreter work ... Uvod u izradu aplikacija za tablet i smartphone uređaje.
May 21, 2013 - I request that a copy of the following documents be provided to me. If your office cannot fulfill any (or
state of the program, the data etc) back on the application ... interaction, and
overall network load is reduced. ... AJAX is not a new programming language,.
web scalability, proxy caching, is ineffective for database web servers because ...
proxy (an experimental enhanced web proxy server [4]) and a database web.
hostile environments—such as at web servers with risk of in- sider attack—this
work ..... 4.2.1 Speed. For the speed test, we used http load,4 a free and easy-to-.
James Turner, Acting Director. Guidelines on Securing Public Web. Servers ......
designing, implementing, and operating publicly accessible Web servers, ...
nections and secure mail servers. ... information, such as email and medical records. ..... exchangeâincluding bulk ciphers and message digest functionsâbecause it ..... If the server accepts the session, then it will send its server random.
Cache Pollution in Web Proxy Servers ... traffic and delay in many World Wide Web (WWW) ..... SLRU gives the best improvement at cache size of 1%.
Clara Lema1, Kim Dionne1, Leo Ayuk2, Charles Awasom2, Melissa Sander2, Carole McArthur3,4, .... [1] Steingart, K.R., Henry, M., Ng, V., et al. (2006) Fluores-.
Compact 4U, dual-processor tower server. ⢠Up to two 20-core ..... Active Pen included to easily edit, draw, and creat
Active uery Caching for Database Web Servers. @iong Luo JeSSrey F. caughton.
Rapasekar Krishnamurthy. Pei Cao Бunrui Li. Computer Sciences Department.
differences regarding dependability properties of the web-servers. 1 Introduction ..... The best option for FIT in the WEB-DB context is the operating system itself ...
Web objects are cached at client sites, at proxy servers shared by multiple .... bandwidth reservation, while non-CM objects are served on a best-effort basis.
This paper looks at web servers, as HTTP is a com- mon service ... low-demand hosted web servers, ...). .... This web server hosts the websites of around 400 student clubs ..... D. Bernstein, âIBM's PowerEN developer cloud: Fertile ground.
A load balancing issue for heterogeneous web servers is de- scribed in this article. ... some of them require special knowledge to predict the best scheduling [2].
We evaluate the policies using Salsa, a web server simulator that has been .... ments apply for managed hosting (where the data ... This is done on a best-effort.
Apr 10, 1999 - In traditional Web servers, the question of the order in which concurrent connections are serviced has been ..... Processing 10] can isolate each connection's path through the network stack. .... Although Web files typically show heavy
(February 2002, San Diego, California). ... Department of Computer Science, Rice University, 6100 Main St., MS 132, Houston, TX ...... San. Malo, France. FREIER, A. O., KARLTON, P., AND KOCHER, P. C. 1996. ... New Orleans, Louisiana.
it serves as a proxy server and cache, and that we combine the thousands of ...... array routing protocol and Microsoft server 2.0, White paper, Microsoft Cor-.
Server-Side Web Development Web Servers Request Processing ...
Usually a dedicated machine running web server software. • Can contain
modules that processes requests. Server-Side. Web. Development. JSP. Today.
Server-Side Web Development
Server-Side Web Development
JSP
JSP
Today
1 Web Servers
Request Processing
Today
Web Servers
Web Servers
Request Processing
Server-Side Web Development
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
2 JavaServer Pages (JSP)
Static HTML Directives
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JSP
Apache
Lecture #4 2007
Next Time
Request Processing
JavaServer Pages (JSP)
Scripting Elements Actions
Apache
Comments
Next Time
Tag Libraries Implicit Objects 3 Apache
Server-Side Web Development
Web Servers
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
JavaServer Pages (JSP)
• Serves resources via HTTP • Can be anything that serves data via HTTP • Usually a dedicated machine running web server software • Can contain modules that processes requests
Next Time
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
Server-Side Web Development
JSP Processing
JSP
Server-Side Web Development JSP
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
Request Processing
JSP
1
A JSP page is requested
2
Server checks if a Java Servlet for the page exists
3
If no Servlet is found (or newer JSP is detected), the JSP is translated to Java (a Servlet class is created)
4
The Java Servlet is compiled
5
The Java Servlet is invoked and processes the request
Next Time
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
1
A Connection is established
2
A HTTP request is received
3
The (logical) path in the request is translated
4
The requested resource is identified (via the path)
5
A server module handling that resource is invoked
6
The module processes the request and generates a reply
7
A mime-type is provided and a HTTP response is created
8
The HTTP response is sent (possibly in increments)
JavaServer Pages (JSP)
• HTML with extra XML-tags • (Scripted server-side) Java for the web • A way to provide dynamic content in web pages • XML-tags act as front-ends for Java classes • May include other pages dynamically • JSPs are compiled into Java Servlets
Next Time
• JSP code is never visible to clients • Generates response (HTML) dynamically • Model-View-Controller pattern recommended
Server-Side Web Development
JSP Syntax
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
JSP Script Tags
JSP
• Directives
Request Processing
JSP may contain
JavaServer Pages (JSP)
• Static HTML
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Directives • Scripting Elements • Actions
• Declarations
• Scriptlets
Apache
• Comments
Next Time
• Expressions
• Tag Libraries
• Implicit Objects
• Comments
Server-Side Web Development JSP
Static HTML
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Directives
JSP
JavaServer Pages (JSP)
• All HTML is treated by JSP as static text • HTML may be mixed with JSP in any way • All non-JSP tags are treated as HTML
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
Apache
Next Time
Next Time
Types of JSP directives • Page • Include • Tag Libraries (aka Custom Tags)
Server-Side Web Development JSP
Page Directives
Server-Side Web Development JSP
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JavaServer Pages (JSP)
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
• Instructs the JSP engine how to process the JSP
Apache
Next Time
• Attributes determine directive content
Next Time
Page Directive Attributes • language - selects scripting language (Java) • extends - base class for generated Servlet • import - Java class / package import • session - enable session tracking (default: true) • buffer - set output buffer size • autoFlush - enable auto flushing of output buffer • isThreadSafe - thread safe marker • info - page information (author, version, copyright etc) • errorPage - set default error page • isErrorPage - enable exception tracking on page • contentType - set response mime type
Server-Side Web Development
Include Directive
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JavaServer Pages (JSP)
• Includes another page at translation time
Apache Next Time
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
• Included page becomes part of Servlet
Next Time
• Generates error if page not found
Server-Side Web Development
Today
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Loads a tag library • Tags are usable via the specified tag prefix
Server-Side Web Development
Scripting Elements
JSP Today
...
Apache Next Time
• The JSP version of language extension
Directive Examples
JSP
Web Servers
Tag Libraries
JSP
Web Servers Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Declarations
• Scriptlets
Apache
Next Time
• Expressions
...
Server-Side Web Development
Declarations
JSP
Server-Side Web Development JSP
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JavaServer Pages (JSP)
• Content placed in Servlet body (members) • Used to declare members and methods • Does not produce HTML output
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
• Declared content is later used by Scriptlets or expressions
Apache
Next Time
• Lines must be terminated with a semicolon
Next Time
Declaration examples
public int getSum (int x, int y) { return x + y; }
Server-Side Web Development
Scriplets
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JavaServer Pages (JSP)
• Content placed in Servlet jspService() method
(local variables and in-line code) • Used to embed Java code directly in the page
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
• May produce HTML output (via out.println())
Apache
Next Time
• Lines must be terminated with a semicolon
Next Time
Server-Side Web Development
Expressions
JSP
Today Web Servers
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Content output directly to HTML • Used as an alias for out.println() • Code must evaluate to an expression • Lines must not be terminated with a semicolon
Next Time
Actions
JSP Today
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
1 + 2 =
1 + 2 = 1 + 2
Server-Side Web Development
Include Action
JSP Today
Web Servers
JavaServer Pages (JSP)
Apache Next Time
Server-Side Web Development
Request Processing
Expression examples
Request Processing
JavaServer Pages (JSP)
Apache
int x = 1; int y = 2; int sum = x + y;
JSP
Web Servers
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Server-Side Web Development
Today
Request Processing
Scriptlet examples
JSP
Web Servers
• include - include another page • forward - forward request to another resource • param - specify parameters when calling or forwarding • plug-in - generates browser-specific code for applets • fallback - content if browser does not support applets
Next Time
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Includes another page at request time
Apache
• Generates a request to included page Servlet
Next Time
• Ignored if page not found
• getProperty - get a property from a JavaBean
• Usually used to call declared methods
• setProperty - set a property on a JavaBean
• Control is returned
• useBean - use a JavaBean
Server-Side Web Development
Forward Action
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
JavaServer Pages (JSP)
• Forwards request to another resource
Apache
Server-Side Web Development
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP)
JavaServer Pages (JSP)
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
• Evaluated by server (as HTML)
Apache
Server-Side Web Development
Tag Libraries
JSP
Next Time
Web Servers Request Processing
JavaServer Pages (JSP)
JavaServer Pages (JSP)
• Java classes • Implements the JSP Tag Extension API interfaces • Usable as JSP tags in JSPs • Java class coupled to a tag using a XML-descriptor • Tags can control JSP processing
Implicit Objects
JSP Today
Request Processing
• Not part of the server response / web page
Server-Side Web Development
Web Servers
Next Time
• Not evaluated by server • Not visible in page source from web browser
Today
Apache
Apache
• Part of the server response / web page • Visible in page source from web browser
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
JSP Comments
JSP
Today
Next Time
• Used to specify parameters when including / forwarding
HTML Comments
JSP
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Next Time
• Control is not returned
Server-Side Web Development
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Param Action
JSP
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
• request - HTTP request • response - HTTP response • out - response stream • session - web application session • pageContext - page context data • application - Servlet context data • config - Servlet configuration data • page - Servlet object • exception - exception data
Server-Side Web Development
Apache
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
Next Time
Next Time
• A (patchy) web server • Arrived early and helped shape the web • Runs 58% of the worlds web sites (March 2007) • Serves HTTP and HTTPS requests • Runs CGI-scripts for dynamic content • Can host modules for PHP, JSP, ASP etc
Server-Side Web Development
Apache Tomcat
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
JavaServer Pages (JSP)
• Servlet & JSP container with built-in web server • Can run standalone or as a module in Apache • Serves HTTP and HTTPS requests • Requests may have been forwarded from HTTPD Server • Contains configuration and management tools
Server-Side Web Development
Apache Ant
JSP
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
interfaces • Includes a Web Service hosting environment
Apache Derby
JSP
Web Servers Request Processing
JavaServer Pages (JSP)
Next Time
• Contains tools for generating language bindings and
Server-Side Web Development
Today
Apache
• Refactorization of Axis
• Can run as a module / web application in Tomcat
Web Servers Request Processing
• Web Service framework
Next Time
Today
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Axis2
JSP
JavaServer Pages (JSP)
• A build tool for software development • ”Make for Java” • Used to automate build, deployment and clean-up
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache Next Time
• A Pure-Java relational database management system • Can be embedded into Java programs • No configuration required • No management clients provided • Databases accessible through JDBC
Server-Side Web Development
Other Related Apache Project
JSP
Server-Side Web Development
Today
Today
Web Servers
Web Servers
Request Processing
Request Processing
JavaServer Pages (JSP) Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Next Time
JSP
JavaServer Pages (JSP)
• Struts - web application framework • Jakarta - server-side Java projects • Xalan - XSLT processor
Static HTML Directives Scripting Elements Actions Comments Tag Libraries Implicit Objects
Apache
• Xerces - A validating XML parser
Apache
Next Time
• ...
Next Time
• Using JSP/Servlets • Data storage, validation & access