1 CS6320 – Deployment and Context L. Grewe 2 The Servlet Container Servlets run in a container sometimes called the Servlet engine. Servlets run in a.

Slides:



Advertisements
Similar presentations
WEB SERVICES. FIRST AND FOREMOST - LINKS Tomcat AXIS2 -
Advertisements

Servlets, JSP and JavaBeans Joshua Scotton.  Getting Started  Servlets  JSP  JavaBeans  MVC  Conclusion.
Apache Tomcat as a container for Servlets and JSP
Servlets Enterprise Systems Programming. Servlets  Servlets: server-side Java programs that enable dynamic processing of web-based requests  Web-based.
Introduction to Servlets Based on: Hall, Brown, Core Servlets and JavaServer Pages.
6/2/2015Page 1 SOA Development and Deployment B. Ramamurthy.
DT228/3 Web Development Introduction to Java Server Pages (JSP)
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Application Servers What is it? General A set of software frameworks, components, utilities, functionality that enables you to develop and deliver n-tiered.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse Web Tools Platform.
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
Portlet Deployment Albert Einstein Institute Deploying JSR portlet applications to GridSphere.
Apache Tomcat Representation and Management of Data on the Web.
DT211/3 Internet Application Development Web Servers.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Tomcat Configuration A Very, Very, Very Brief Overview.
Java Server and Servlet CS616 Team 9 Kim Doyle, Susan Kroha, Arunima Palchowdhury, Wei Xu.
Creating a.war file W(eb) AR(chive). Creating a.war file The following article may contain actual software programs in source code form. This source code.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Julien Thibault / Phil Brewster / Kristina Doing-Harris
Java Servlets and JSP.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Apache Tomcat Representation and Management of Data on the Web.
Java Servlets CS-422. Application Mapping Your servlet application will be mapped to a directory structure: –“myapp” maps to some directory C:/docs/apps/myapp.
Application Servers: Tomcat. What is an application server? Servlets are Java’s answer to server-side programming. Servlets are a special type of Java.
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
AN OVERVIEW OF SERVLET TECHNOLOGY SERVER SETUP AND CONFIGURATION WEB APPLICATION STRUCTURE BASIC SERVLET EXAMPLE Java Servlets - Compiled By Nitin Pai.
Deploying CFML on J2EE Servers Vince Bonfanti President New Atlanta Communications, LLC.
Java Servlets example using NetBeans 6. Pre-requirements: Install Java JDK 1.6 Install NetBeans IDE 6 (we will use version NetBeans IDE update 16)
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
Chapter 2 Web app architecture. High-level web app architecture  When a client request coming in and needs servlet to serve dynamic web content, what.
1 Servlets Modified slides from Dr.Sagiv. 2 Introduction.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
S ERVLETS Hits Counter 21-Nov-15. S ERVLETS - H ITS C OUNTER Many times you would be interested in knowing total number of hits on a particular page of.
3/6/00jsp00 1 Java Server Pages Nancy McCracken Northeast Parallel Architectures Center at Syracuse University.
@2008 Huynh Ngoc Tin Chapter #2 JAVA SERVLET PRGRAMMING.
Deploying a service. Talk titledate2 Talk titledate3 Section SOAP Deployment.
CS320 Web and Internet Programming Introduction to Java Servlets Chengyu Sun California State University, Los Angeles.
Fall CIS 764 Database Systems Engineering L15: Deployment Deploy … to place or arrange for deliberate (intended) purpose.
Core basic Java web server technologies. Tools Eclipse IDE for Java EE Developers (Netbeans also works) nloads/packages/eclipse-
Advanced Java Session 6 New York University School of Continuing and Professional Studies.
Configuration Web Server Tomcat - Install JDK Install Tom cat Configure Tom cat for running Servlet C:\Program Files\Apache Software Foundation\Tomcat.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
15 Copyright © 2004, Oracle. All rights reserved. Adding JAAS Security to the Client.
BlueDragon Editions and Advantages Lori Pacheco New Atlanta.
CS320 Web and Internet Programming Introduction to Java Servlets Chengyu Sun California State University, Los Angeles.
CS3220 Web and Internet Programming Introduction to Java Servlets
Java Servlets By: Tejashri Udavant..
Outline SOAP and Web Services in relation to Distributed Objects
Course Outcomes of Advanced Java Programming AJP (17625, C603)
Introduction to Java Servlets on Jakarta Tomcat
Outline SOAP and Web Services in relation to Distributed Objects
دانشکده کامپیوتر دانشگاه صنعتی شریف
Jagdish Gangolly State University of New York at Albany
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Java Servlets and JSP.
CS3220 Web and Internet Programming Introduction to Java Servlets
Servlets.
Introduction to Java Servlets
Presentation transcript:

1 CS6320 – Deployment and Context L. Grewe

2 The Servlet Container Servlets run in a container sometimes called the Servlet engine. Servlets run in a container sometimes called the Servlet engine. You must “deploy” a servlet for it to be able to run. You must “deploy” a servlet for it to be able to run. We deploy servlet(s) as part of a entity called a WebApp and this is what is actually deployed in our containers. We deploy servlet(s) as part of a entity called a WebApp and this is what is actually deployed in our containers. Many kinds of Servlet Containers available free and commercial Many kinds of Servlet Containers available free and commercial

3 Supporting Servlets To run Servlets, the Web server must support them To run Servlets, the Web server must support them Apache TomcatApache Tomcat Also functions as a module for other Apache servers Also functions as a module for other Apache servers Sun Java System Web Server and Java System Application Server (J2EE Server)Sun Java System Web Server and Java System Application Server (J2EE Server) IBM 's WebSphere Application ServerIBM 's WebSphere Application Server BEA ’s Weblogic Application ServerBEA ’s Weblogic Application Server Macromedia ’s Jrun – an engine that can be added to Microsoft’s IIS, Apache’s Web servers and more...Macromedia ’s Jrun – an engine that can be added to Microsoft’s IIS, Apache’s Web servers and more... Oracle Application ServerOracle Application Server …

4 For MORE DETAILS ON DEPLOYMENT and web.xml file see our class website!!!! THIS CAN CHANGE with your choice of servlet container!!! You will need a correct directory structure Compile your code Organize supporting files (html, etc) Create deployment descriptor files (e.g. container specific xml files like sun-web.xml for GlassFish and depending on version of J2EE optional web.xml file) Possibly zip up your code into a WebApp file called WAR (web archive). Finally, you need to deploy your Web Application (WebApp) using the containers administrative deployment tools. Deployment

5 … InitExample ServletInit login snoopy … Optional of the WebApp deployment descriptor file web.xml ---Servlet 3.* and on use container specfic xml + annotations in code –see webpage

6 Loading a Servlet on Startup A Servlet is usually loaded when it is first being called A Servlet is usually loaded when it is first being called You can set Tomcat to load a specific Servlet on startup in the Servlet declaration inside web.xml You can set Tomcat to load a specific Servlet on startup in the Servlet declaration inside web.xml InitExample ServletInit

7 The Servlet Context

8 The Servlet Context Object A Servlet context represents the Web application that Servlets live in A Servlet context represents the Web application that Servlets live in There is one Servlet context per application There is one Servlet context per application You can get the Servlet context using the method getServletContext() You can get the Servlet context using the method getServletContext() The Servlet context has many methods The Servlet context has many methods For example, you can store in it objects that are kept throughout the application's life For example, you can store in it objects that are kept throughout the application's life

9 An Example: Service Count public class CounterServlet extends HttpServlet { public void init() throws ServletException { Integer counter = (Integer)getServletContext().getAttribute("counter"); if(counter == null) { getServletContext().setAttribute("counter",new Integer(0)); }