Outline of WWWClient Web browser Display reading page URL address Internet Web server HTML file, program file, multimedia file : image file, sound file, movie file, etc.. Collaboration b
Trang 1Chapter 7 Outline of Web application and Eclipse
ITSS Java Programming
NGUYEN Hong Quang, HUT
Trang 2Outline of WWW
Client
Web browser
Display reading page
URL address
Internet
Web server HTML file, program file, multimedia file : image file, sound file, movie file, etc Request
Response Link in a
Web page
Trang 4“form” data exemple
Trang 5HTTP method : GET and POST
GET
Add transmission information to URL
There is a limitation in the length of the
transmission character string
Example: http://localhost:8080/examples/hello?NAME=Billy
POST
There is not a limitation in the length of the
transmission character string
It is possible to transmit only by <form> tag
Trang 6Web application
Client
Web browser
Display reading page
URL address
Internet
Application server Request
Response
Link in a Web page
Run application
Trang 7Features of Web application
an execution environment to execute the server
applications (CGI) : Servlet and JSP, ASP, PHP, etc
example is ‘Tomcat’, etc.
Trang 8Directory structure of Web application
Trang 9Collaboration between Servlet, JSP and JDBC
DBMS JDBC
Servlet : Java program that runs on Server side
(Web container)
JSP : Embedding the Java program into the HTML files
Trang 10Using directly JDK
Edit program : Editor (NotePad)
Execution program : Dos Prompt :
Trang 11The role and composition of IDE
editor and compiler are integrated
All processes from editing to execution can be done with one set of software
Eclipse
Visual Studio (Microsoft)
Sun ONE Studio (Sun)
Trang 12Characteristics of Eclipse
application
http://www eclipse org
Trang 13Install plug-ins Eclipse
Trang 14Main screen of Eclipse
Trang 15Code assistance : Supplementation
with method name
Eclipse
Trang 16Code assistance : Supplementation
with class name
CTRL + Space
Eclipse
Trang 17Java programming with Eclipse
Start of Eclipse Making of project Making of class Build and Execution
End of Eclipse
Eclipse
Trang 18Start of Eclipse : step 1 Eclipse
Trang 19Start of Eclipse : step 2 Eclipse
Trang 20Start of Eclipse : step 3
Workbench
Eclipse
Trang 21Making project 1 Eclipse
Trang 22Making project 2 Eclipse
Trang 23Making project 3 Eclipse
Trang 24Making class 1 Eclipse
Trang 25Making class 2 Eclipse
Trang 26Making class 3 Eclipse
Trang 27Run application in Eclipse Eclipse
Trang 28Default directory of Eclipse projectEclipse
Trang 29Change directory 1 Eclipse
Trang 30Change directory 1 Eclipse
Trang 31Execution of class that uses
command line argument 1
Eclipse
Trang 32Execution of class that uses
command line argument 2
Eclipse
Trang 33Execution of class that uses
command line argument 3
Eclipse
Trang 34Setting of class passing 1 (JDBC driver)
Eclipse
Trang 35Setting of class passing 2 (JDBC driver)
Eclipse
Trang 36Setting of class passing 3 (JDBC driver)
Eclipse
Trang 37Close project Eclipse
Trang 38Open project (1)
Trang 42End of Eclipse
Trang 44Hands-on exercises 2
server
InputName.htm
build and execution) :
HelloWorld
HelloWorld with input parameter