Java Servlet and JSP Programming. Structure and Deployment China Jiliang University

Similar documents
In this chapter, we lay the foundation for all our further discussions. We start

Server Setup and Configuration

2. Follow the installation directions and install the server on ccc

Java and Web. WebWork

An introduction to web programming with Java

Volume 1: Core Technologies Marty Hall Larry Brown. An Overview of Servlet & JSP Technology

HttpUnit Laboratorio di Sistemi Software - A.A. 2003/2004

Supplement IV.E: Tutorial for Tomcat. For Introduction to Java Programming By Y. Daniel Liang

An Overview of Servlet & JSP Technology

BAPI. Business Application Programming Interface. Compiled by Y R Nagesh 1

SSC - Web applications and development Introduction and Java Servlet (II)

Web Container Components Servlet JSP Tag Libraries

Web Applications. Originals of Slides and Source Code for Examples:

NGASI AppServer Manager SaaS/ASP Hosting Automation for Cloud Computing Administrator and User Guide

CS506 Web Design and Development Solved Online Quiz No. 01

Web Development on the SOEN 6011 Server

ACM Crossroads Student Magazine The ACM's First Electronic Publication

Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

Development of a Real-time Customer Service System. Abstract

Java Web Programming with Eclipse

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

Agenda. Summary of Previous Session. Application Servers G Session 3 - Main Theme Page-Based Application Servers (Part II)

Crawl Proxy Installation and Configuration Guide

PowerTier Web Development Tools 4

Web Application Architecture (based J2EE 1.4 Tutorial)

INTRODUCTION TO WEB TECHNOLOGY

PDQ-Wizard Prototype 1.0 Installation Guide

2.8. Session management

On-campus Tomcat Deployment Client

AklaBox. The Ultimate Document Platform for your Cloud Infrastructure. Installation Guideline

Web Applications and Struts 2

ZeroTurnaround License Server User Manual 1.4.0

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.

An Overview of Java. overview-1

5- Web application deployment

How to use JavaMail to send

The MoCA CIS LIS WSDL Network SOAP/WS

Web Application Programmer's Guide

SERVLETS - SENDING

Web Application Developer s Guide

JBoss SOAP Web Services User Guide. Version: M5

Web Application Development

Introduction to Web Applications using JSP, Servlets, Jstl and JQuery Workshop for ICOM5016

MIGS Payment Client Installation Guide. EGate User Manual

SERVER SETUP AND CONFIGURATION

Java Web Services Developer Pack. Copyright 2003 David A. Wilson. All rights reserved.

Implementing SQI via SOAP Web-Services

CSE 510 Web Data Engineering

Design Approaches of Web Application with Efficient Performance in JAVA

Apache Tomcat 4.0 Sample Modified 06/09/04

Apache Jakarta Tomcat

Lösungsvorschläge zum Übungsblatt 13: Fortgeschrittene Aspekte objektorientierter Programmierung (WS 2005/06)

& JSP Technology Originals of Slides and Source Code for Examples:

Building Web Applications, Servlets, JSP and JDBC

24x7 Scheduler Multi-platform Edition 5.2

CatDV Pro Workgroup Serve r

Course Name: Course in JSP Course Code: P5

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

DeskNow. Ventia Pty. Ltd. Advanced setup. Version : 3.2 Date : 4 January 2007

The Enterprise Java Internet Provider

Using the DataDirect Connect for JDBC Drivers with the Sun Java System Application Server

Virtual Open-Source Labs for Web Security Education

NetBeans IDE Field Guide

Servlets. Based on Notes by Dave Hollinger & Ethan Cerami Also, the Online Java Tutorial by Sun

For all the people which doesn't have enough money to buy good books. For all the rippers.

Creating Web Services in NetBeans

Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan

Supplement I.C. Creating, Compiling and Running Java Programs from the Command Window

MonALISA Repository User Guide

Apache OFBiz Advanced Framework Training Video Transcription

Introduction to Web Technologies

MULTICULTURAL CONTENT MANAGEMENT SYSTEM

WebSphere v5 Administration, Network Deployment Edition

Pure server-side Web Applications with Java, JSP. Application Servers: the Essential Tool of Server-Side Programming. Install and Check Tomcat

Web Applications. For live Java training, please see training courses at

ServletExec TM 5.0 User Guide

Clustering with Tomcat. Introduction. O'Reilly Network: Clustering with Tomcat. by Shyam Kumar Doddavula 07/17/2002

UFTP AUTHENTICATION SERVICE

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

How To Link Tomcat 5 with IIS 6 on Windows 2003 Server using the JK2 ajp13 connector

Glassfish, JAVA EE, Servlets, JSP, EJB

Configuring Cisco CallManager IP Phones to Work With IP Phone Agent

IST Amigo Project. Accounting & Billing Software Developer s Guide. Public

Security Testing of Java web applications Using Static Bytecode Analysis of Deployed Applications

Mobile Application Development

Java 2 Web Developer Certification Study Guide Natalie Levi

Building Java Servlets with Oracle JDeveloper

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

KINETIC SR (Survey and Request)

QuickDNS 4.6 Installation Instructions

CS108, Stanford Handout #33 Young. HW5 Web

Basic Internet programming Formalities. Hands-on tools for internet programming

Oracle WebLogic Server

Usability. Usability

HP Education Services

Getting started with OWASP WebGoat 4.0 and SOAPUI.

How to Integrate IIS with JBoss / Tomcat Under Windows XP and Linux

CONTROLLING WEB APPLICATION BEHAVIOR WITH

NGASI Shared-Runtime Manager Administration and User Guide WebAppShowcase DBA NGASI

Transcription:

Java Web Programming in Java Java Servlet and JSP Programming Structure and Deployment China Jiliang University

Servlet/JSP Exercise - Rules On the following pages you will find the rules and conventions for naming and deployment of your servlet and jsp files. Very important: Go directly to your directories (number "nn") and work only in these directories! Do not enter other directories! This is strictly forbidden

Servlet Exercise Compiling Servlets: package jiliang.student_nn; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; import java.util.*; Directory Structure (example) jiliang student_nn jiliang.student_nn // Example for student_nn public class Servletstudent_nn extends HttpServlet { Servlet API: servlet-api-5.0.18.jar or servlet-api-2.4.jar javac -target 1.5 Servletstudent_nn.java Compile for Java (Tomcat) 5.5

Servlet JAR Java Servlet Archive File: A copy of the file "servlet-api-2.4.jar" can be found in the directory "servlet_jar"

Servlet Exercise Servlet Home directories URL of the Jakarta-Tomcat Server: 10.132.10.91:8180 Directory for Servlets: $TOMCAT_WEBAPPS/student-servlet/WEB-INF/classes/jiliang/student_nn URLs (Servlets): http://10.132.10.91:8180/student-servlet/servlet/servlet_name http://10.132.10.91:8180/ student-servlet/servlet/jiliang.student_nn.servletstudent_nn jiliang.student_nn.servletstudent_nn Access via FTP: Server-IP: 10.132.10.91, Port: 21 User: newhelm, Passwd: 123 Info: http://10.132.10.91:8180/student-servlet/

Servlet Exercise - Naming Summary - Your Servlet: Getting to your directory: student-servlet WEB-INF classes jiliang student_nn Naming your Servlet: nn: Important: Servletstudent_nn.java this is your number Use only this name!

Servlet Exercise - Example Source Code - Example: http://10.132.10.91:8180/student-servlet/servletstudent_00.html

JSP Exercise JSP Home directories URL of the Jakarta-Tomcat Server: 10.132.10.91:8180 Directory for JSP: $TOMCAT_WEBAPPS/student-jsp/jsp/jiliang/student_nn URLs (JSPs): http://10.132.10.91:8180/ student-jsp/jsp/jiliang/student_nn/index.jsp Access via FTP: Server-IP: 10.132.10.91, Port: 21 User: newhelm, Passwd: 123

JSP Exercise - Naming Summary - Your JSP: Getting to your directory: student-jsp jsp jiliang student_nn Naming your JSP: nn: Important: *.jsp, *.html this is your number No restrictions on names.

Servlet Exercise Compiling the servlet using the Jakarta Servlet-API: a) Download the Servlet-API file "servlet.jar". b) Install the file in the following directory: "C:\Programs\jdk_dir\jre\lib\ext\" (with jdk_dir = JDK-directory, e.g. "jdk1.3.0_02"). c) Set the classpath (e.g. using a batch file): set CLASSPATH= C:\Programs\jdk_dir\jre\lib\ext\servlet.jar d) Compile the servlet as usual: javac filename.java

Servlet Exercise User handling during an e-commerce session Write a Java Servlet that fulfils the following functions: New customer: Welcome this visitor with the message "Welcome to our shop" (or similar). Offer a form (HTML) to register this new customer asking for the necessary information. Minimum input should be: first name, last name and address; preferred product line (using the shop); allow at least four different categories. The client sends an HTTP POST request with the complete set of data from this HTML form.

Servlet Exercise Echo the accepted data back to the client in the form of an HTML table. The user (client) should receive a non-editable version of the updated information. Known (old) customer: Welcome this visitor with the message "Welcome 'first name' 'last name' " followed by basic information about former visits to the shop, like: last visit, number of visits (since), session ID, Focused advertising: Send to the known visitor customer-oriented advertisements (banner, e.g. appropriate images that are opened in a separate small window).