Sunday, June 28, 2015

JSP, J2EE/JEE, Servlets and Tomcat

Tomcat is an application server from the Apache Software Foundation that executes Java servlets and renders Web pages that include Java Server Page coding. Tomcat can a standalone product with its own internal Web server or together with other Web servers, including Apache & Microsoft Internet Information Server (IIS). Tomcat requires a Java Runtime Enterprise Environment (JRE 1.1+)

Java 2 Platform Enterprise Edition (J2EE) is for developing, building and deploying Web-based enterprise applications online.consists of a set of services, APIs and protocols that provide the functionality for developing multi-tiered Web-based applications.

Java Server Page (JSP) is a technology for controlling the content or appearance of Web pages through the use of servlets,

A servlet is a small program that runs on a server. Servlets receive and respond to requests from Web clients. (modify the Web page before it is sent to the user who requested it)

Although servlets can respond to any types of requests, they most commonly implement applications hosted on Web servers. Such Web servlets are the Java counterpart to other dynamic Web content technologies such as PHP and ASP.NET.

Some programs, often those that access databases based on user input, need to be on the server. Typically, these have been implemented using a Common Gateway Interface (CGI) application.

However, with a Java running in the server, such programs can be implemented with the Java programming language. The advantage of a Java servlet on servers with lots of traffic is that they can execute more quickly than CGI applications.

Rather than causing a separate program process to be created, each user request is invoked as a thread in a single daemon process, meaning that the amount of system overhead for each request is slight.

Instead of a URL that designates the name of a CGI application (in a "cgi-bin" subdirectory), a request in a form on a Web HTML page that results in a Java servlet getting called would call a URL that looks like this:

http://www.foo.com:8080/servletx/gotoUrl?http://www.bar.com

The "8080" port number in the URL means the request is intended directly for the Web server itself. The "servletx" would indicate to the Web server that a servlet was being requested.

Java Container Servers

  • GlassFish
  • IBM WebSphere Application Server
  • Jetty (web server)
  • Apache Tomcat
  • Caucho Resin http://www.caucho.com/ - A commercial servlet container.
  • Caudium (web server)
  • Oracle iPlanet Web Server
  • WildFly
  • Undertow

Sources:
https://www.wikipedia.org/
http://www.apache.org/
http://tomcat.apache.org/
http://www.oracle.com/technetwork/java/index.html
http://www.tutorialspoint.com/jsp/jsp_architecture.htm
http://www.tutorialspoint.com/jsp/jsp_overview.htm

No comments:

Post a Comment