Title: Jbuilder Servelts and web servers
1INE4481 DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
- Jbuilder Servelts and web servers
- Rufin Soh
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
2Content
- Jbuilder Servelts and web servers
- Install and configure jdk 1
- Your first servlet
- Install and configure tomcat web server
- Run tomcat web server
- Execute your servlet
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
3Install and configure jdk 1
- Make sure that the jdk you are using in Jbuilkder
contains the servlets librairies jsdk - If not download it from sun web site
- Add this librairie to your libraries in Jbuilder
environment 1,2,3,
1. Select project properties
2. Add servlet to libraries
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
4Install and configure jdk 1
- Add this librairie to your libraries in Jbuilder
environment 1,2,3,
3. Select servlet libraries and click OK
4. Add servlet to libraries
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
5Your first servlet
1. Create a new class
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
6Your first servlet
- Supports heterogeneous systems.
2. Specify your class servlet type
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
7Your first servlet
4. servlet name
3. Package name
5. Specify your servlet methods
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
8Your first servlet
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
9Install and configure tomcat web server
Download and unzip tomcat on your C\ drive
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
10Install and configure tomcat web server
Create a new folder with your project name in
webApps
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
11Install and configure tomcat web server
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
12Install and configure tomcat web server
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
13Install and configure tomcat web server
4. Copy your servlet.class (respecting the path)
and paste it in the classes folder
5. Open the web.xml file and configure parameter
3. Cut the WebInf folder in tomcat\ WebApps and
paste it in your folder
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
14Install and configure tomcat web server
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
15Install and configure tomcat web server
lt?xml version"1.0" encoding"ISO-8859-1"?gt lt!DOC
TYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.2//EN"
"http//java.sun.com/j2ee/dtds/web-app_2_2.dtd"gt
ltweb-appgt
ltservletgt ltservlet-namegt MyApplication
lt/servlet-namegt ltservlet-classgt
ca.tav.project1.INE4481Servlet
lt/servlet-classgt lt/servletgt
6. The complete name of your servlet
5. The name of your html file e.g
INE4481project1.html
7. Save the web.xml file
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
16Run tomcat web server
9. Double click on startup.bat file to run the
server.
8. Go to the tomcat\bin directory
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES
17Execute your servlet
9. Enter your address in the form
http//142.132.70.56/ INE4481project1.html 10
Fill your form and submit
Your machine IP
Wilfried Probst Rufin Soh INE4481
DISTRIBUTED DATABASES CLIENT-SERVER
ARCHITECTURES