JSP__ Chapter 1 dynamic web development foundation

1. Dynamic web pages: web page sorted users to interact, the user can process the page request

2.B / S architecture: the browser; client zero maintenance; Relationship between operating system platforms minimized; the response speed and safety need to spend more design costs
C / S architecture: the need for special client applications; client requires a separate maintenance and upgrades; the client operating systems are generally limited; can give full play to the client processing capabilities, fast response clients

3.URL : uniform resource locator uniform resource locator
HTTP: // localhost: 8080 / xxxx
HTTP: protocol
localhost: 8080 on behalf of IP: port
xxxx: address resource request
4.Tomcat (Web server)
WebLogic
Nginx
Resin
5.Tomcat: Web server, JSP / Servlet container of
Contents introduction:
/ bin store to start and stop the Tomcat script files in a variety of platforms
/ conf Tomcat server to store various configuration files
/ lib Tomcat server storage required for a variety of JAR files
/ logs stored in Tomcat log files
/ temp Tomcat runtime for temporary files
/ webapps when publishing a Web application, the default Web will file the application in the case stored here Directory
/ work Tomcat the discharge generated by JSP Servlet thereto directory
start mode:
/ bin directory: startup.bat shutdown.bat start script stop script
If you have problems flash back then add the following code in the above two documents:
the SET JAVA_HOME = D: \ the Java \ jdk1.7 (the Java the JDK directory)
the SET TOMCAT_HOME = E: \ tomcat-7.0 ( after extracting file directory tomcat)
configure the environment variables:
addition system variable CATALINA_HOME name, value Tomcat installation directory, add a% CATALINA_HOME% in Path system variable \ bin

6. Web Engineering:
the Eclipse environment to create a new Dynamic web project ---> Target Runntime representatives to start a web server -----> Dynamic Web model version behalf of the project version (3.0) ---> click Next until
----> Generate web.xml xxxxx check on this before there under wEB-INFO file folder web.xml

web.xml file is a web project configuration file, the page where the welcome-file-list represents the first visit to the set, welcome-file representatives page first visit to the


directory structure:
/ Web application root directory, all files in the directory can be accessed by the client (JSP, HTML, etc.)
/ the WEB-INF storage resources used by the application, the directory and its subdirectories on Clients are not accessible
/ WEB-INF / classes stored Web project all the class files
/ WEB-INF / lib store Web applications use JAR files
7.JSP Page: Java Server Pages (may be embedded Java code) all final JSP pages are automatically written into .Java WEB container file compiled into .class files
consisting content:
Page directive: <% @ page Attribute 1 = "Attribute value "attribute 2 =" attribute value 1, the attribute value 2 "... properties n-=" attribute value n "%>
attribute description default
language specifies a JSP page scripting language Java
Import to reference the script language used through this property no class file
contentType to specify the encoding used by JSP pages text / html, ISO-8859-1
small script: <% the Java code%>
expression: <% = expression%>
statement: <% declare methods%! >
comment: <! - comment ->; <% - comment, the page can not see ->

Guess you like

Origin www.cnblogs.com/Chencheno/p/11114812.html