Escolar Documentos
Profissional Documentos
Cultura Documentos
FRONT
I N S T R U C TO R : M R T.T G O TO R A
C O N TAC T: 0 7 1 8 0 0 2 4 9 7 / 0 7 7 9 2 0 6 7 2 0
EMAIL: tatenda.gotora/trust.gotora@yahoo.com
COURSE OUTLINE
Web Architecture
Developing with JSP
JAX-RS Web Services
HTML5 Applications with JavaScript and AJAX
Web Socket and the Java API for JSO Processing
WEB ARCHITECTURE
Client/Server Architecture
Client sends request to server
Server receives and process requests
Client process and renders the response
Server returns response and logging
JAVA EE ARCHITETURE
JAVA EE Container
Functionality
Web Container
EJB Container
Data Tier
PROCTOLS
HTTP/HTTPS
File Transfer Protocol (FTP)
Telnet
POP3
Simple Mail Transfer Protocol (SMTP)
MARK UP LANGUAGES
HTML
XHTML
XML
JAVA SERVLETS
Java object that processes the server side of HTTP interactions.
i.e. implementing the request/response interaction.
javax.servlet.http.HttpServlet API to be extended by all
javax.servlet.http.HttpServletRequest API used for request
javax.servlet.http.HttpServletResponse API used for response
JSP Runtime
Web container reads the JSP before processing request
Generates the Java code for Java servlet
Compiles the generated Java servlet
Invokes the request that the client intended for the JSP
static content is wrapped out.println() statement
Java code wrote in sequence in generated Java servlet
Example
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.Date" %>
<%@page import="java.text.SimpleDateFormat" %>
<!DOCTYPE html>
<html>
<head>
<title>JSP Clock</title>
</head>
<body><div align='center'><br/>Hello there!<br/><br/>
Example Cont
It's been <%=System.currentTimeMillis()%> milliseconds
since midnight, January 1st 1970.
<br/><br/>
In other words, its
<%
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("EEEEEEEE");
String today = sdf.format(now);
out.println(today.trim()); %></div></body></html>
JSP Directives
page general properties e.g. output and import statements
taglib use of special tags from a tag library
include borrow content of another file
REFERENCES
1) Java EE The Big Picture: Mastering Code, Applications and
Frameworks of Java Platform EE & by Dr. Danny Coward
2) www.infiniteskills.com accessed online[16 September 2016]