Intro to Servlets Lec 26. Web-Based Enterprise Applications in Java Figure shows a simplified view of one application and its layers.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Technology Overview JAVA Servlets CS-611 S. Witherspoon.
SPICE! An Ontology Based Web Application By Angela Maduko and Felicia Jones Final Presentation For CSCI8350: Enterprise Integration.
DT228/3 Web Development Introduction to Java Server Pages (JSP)
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
Apache Tomcat Web Server MOHD NORFAIZI MIHSANY (A91391)
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
Multiple Tiers in Action
DT211/3 Internet Application Development Web Servers.
Installing JDK Vijayan Sugumaran Department of DIS Oakland University.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Session-01. What is a Servlet? Servlet can be described in many ways, depending on the context: 1.Servlet is a technology i.e. used to create web application.
Chapter 4 Servlets Concept of Servlets (What, Why, and How) Servlet API Third-party tools to run servlets Examples of Using Servlets HTML tag with GET.
Julien Thibault / Phil Brewster / Kristina Doing-Harris
Java web development Servlet & Java server pages.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Java Servlets and JSP.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
SERVLETS.
Softsmith Infotech Installing and Configuring Tomcat.
Installing Tomcat on Windows  You may find the Tomcat install shield has some problems recognizing JSDK 1.4 beta installations.  You.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
Eclipse is an open source IDE (Integrated Development Environment) for developing applications in Java, C/C++, HTML, Cobol, Perl, etc. The official Eclipse.
Java Pet Store Application. Outline Introduction Introduction Information Layer Information Layer Application Layer Application Layer Infrastructure Layer.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Installing DSpace on Window Bharat M. Chaudhari School of Petroleum Management, PANDIT DEENDAYAL PETROLEUM UNIVERSIRY, GANDHINAGAR
Apache Tomcat Web Server SNU OOPSLA Lab. October 2005.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Applets & Servlets.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Modern Software Technologies Java™, J2EE™, JSP™, JDBC™ by Radoslav Tr. Ivanov
Apache Tomcat Lecture notes by Theodoros Anagnostopoulos.
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.
Performance testing with JMeter.  100% pure Java desktop application  Designed to load test client/server software (such as a web application )  JMeter.
第十四章 J2EE 入门 Introduction What is J2EE ?
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
An Introduction to JavaServer™ Pages Prepared by Nicole Swan.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
STRUCTURE OF JSP PRESENTED BY: SIDDHARTHA SINGH ( ) SOMYA SHRIVASTAV ( ) SONAM JINDAL ( )
CSI 3125, Preliminaries, page 1 JSP (Java Server Pages)
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
The process of establishing a connection between a client and a server is called as Client – Server communication.
Settings MySQL Database and JDBC configuration Instructor: Sergey Goldman.
JSP (Java Server Page) JSP is server side technology which is used to create dynamic web pages just like Servlet technology. This is mainly used for implementing.
Tomcat Celsina Bignoli
Course Outcomes of Advanced Java Programming AJP (17625, C603)
Introduction to Java Servlets on Jakarta Tomcat
By Dr. Kodge Bheemashankar G
PHP / MySQL Introduction
Content: What is JMeter? What can I do with JMeter?
MSIS 655 Advanced Business Applications Programming
Installing and Configuring Tomcat
Apache Tomcat Web Server
Devops Jenkins as CI/CD tool Created By: Amrit Choudhary
COP 4610L: Applications in the Enterprise Spring 2005
Java Servlets and JSP.
Installing Tomcat.
Presentation transcript:

Intro to Servlets Lec 26

Web-Based Enterprise Applications in Java Figure shows a simplified view of one application and its layers.

Java Servlets Client/ browser Server Request Response Servlet JVM Extends the functionality of the server by Generating HTML pages dynamically

What Do They Do? Anything that java can do (e.g. connect to database services) Handle data/requests sent by users (clients) Create and format results Send results back to user

Java Servlets Advantages over other SSP technologies:  Can use the Java APIs e.g. JDBC.  Persistent between invocations, avoiding process instantiations.  Portable across operating systems and servers.  Good security.  Is integrated closely with the J2EE environment.

Software Requirements

To use Java servlets, following softwares will be needed  J2SE  Additional J2EE based libraries for servlets such as servlet-api.jar, jsp-api.jar. You can download these APIs separately but they are also available with the web server you’ll be using.  A capable servlet web engine (web server)

Jakarta Servlet Engine (Tomcat) Jakarta is an Apache project  Tomcat is one of its subprojects Tomcat is the official reference implementation for the Java servlet and JavaServer pages technologies (according to Sun’s specifications) Tomcat is developed in an open and participatory environment and released under the Apache software license

Environment Setup

Steps 1. Download the Apache Tomcat Server 2. Install Tomcat 3. Set the JAVA_HOME variable 4. Set the CATALINA_HOME variable 5. Set the CLASSPATH variable 6. Test the Server

1.Download the Apache Tomcat Server From the  Download the zip file for the current release of Jakarta Tomcat  For windows, there is also a.exe installer

2.Install Tomcat Installing.zip file  Unzip the file into a location (e.g. C:\)  The zip file had embedded subdirectories (e.g., jakarta-tomcat ).  C:\ jakarta-tomcat generally referred as install_dir Installing.exe file  Check the handouts

3.Set the JAVA_HOME variable Set the JAVA_HOME environment variable to tell Tomcat where to find Java This variable should list the base JDK installation directory, not the bin subdirectory JAVA_HOME = c:\j2sdk1.5.0

4.Set the CATALINA_HOME variable Set the CATALINA_HOME environment variable to refer to the top-level directory of the Apache Tomcat installation, not the bin subdirectory CATALINA_HOME = c:\jakarta-tomcat-5.5.9

5.Set the CLASSPATH variable Since servlets and JSP are not part of the J2SE, javac doesn’t know about the servlet and jsp classes The standard Tomcat locations for these files are  install_dir/common/lib/servlet-api.jar  install_dir/common/lib/jsp-api.jar You need to include both files in your CLASSPATH

6.Test the Server Before making your own Servlets and JSP, verify that the server can start Run install_dir/bin/startup.bat Enter the URL in your browser and make sure you will get the Tomcat homepage

Lets do it LIVE

Tomcat Directory Structure my-app