Basic JSP - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Basic JSP

Description:

???? JSP ??????????????????????????????? HTML, XML ?????????????????????? ????? ... JavaServer Pages / JSP. ????????? JavaServer Pages (JSP) ????????? Servlet ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 10
Provided by: tkl7
Category:
Tags: jsp | basic | jsp

less

Transcript and Presenter's Notes

Title: Basic JSP


1
Basic JSP
2
JSP
JSP (Java Server Page) ???? JSP
??????????????????????????????? HTML, XML
?????????????????????? ??????????????? Tomcat
Apache ??? Java Compiler ???????? James Duncan
Davidson ?.?.2000 ????????????????? Servlet
?????????????? Byte Code ?????????????????????????
?? ??? JSP Source Code
????????? http//java.sun.com/products/jsp/faq.htm
l ????????? http//www.apl.jhu.edu/hall/java/Serv
let-Tutorial/
3
?????????
  • Servlet
  • Servlet ????????????? Java ??????????????????????
    ???? Dynamic web ????????????????????? Web Server
    ?????????????????????????????????? Web browser
    (HTTP client) ??? database ???? Application ??
    HTTP Server

4
????????? (???)
  • JavaServer Pages / JSP
  • ????????? JavaServer Pages (JSP) ?????????
    Servlet ???????????? static HTML
    ????????????????????????? Servlet
  • JSP????????????? Servlet ????????????????????????
    ??????
  • Jakarta Tomcat
  • ???????????????????????????????????????
    ???????????? Servlet Engine ??? JSP Engine
    ????????????????? Servlet ??? JSP???

5
How JSP works?
6
JSP page translation and processing phases
Hello.jsp
helloServlet.java
helloServlet.class
7
A Simple JSP Page
JSP tag
lt_at_ page importjava.text., java.util.gt
lthtmlgt
ltheadgtlttitlegtltDate Examplelt/titlegtlt/headgt
HTML
ltbodygt
Scriptlet
Today is ltemgtlttodaygtlt/emgt lt/bodygt lt/htmlgt
Example.jsp
  • Static HTML/XML elements
  • Dynamic scriptlets
  • Special JSP elements

8
JSP Processing- Translation Phase
request
response
JSP Page (.jsp)
JSP Translator
Text Buffer
Java Compiler
Servlet Source (.java)
Servlet Class (.class)
JVM
Servlet Container
Translation Phase
Request Processing Phase
9
JSP Processing- Request Processing Phase
request
response
JSP Page (.jsp)
JSP Translator
Text Buffer
Java Compiler
Servlet Source (.java)
Servlet Class (.class)
JVM
Servlet Container
Translation Phase
Request Processing Phase
Write a Comment
User Comments (0)
About PowerShow.com