1. Dynamic web pages: web page interaction of users sorted, capable of processing the page requested by the user
2.B / S architecture: the browser; zero client maintenance; relationships with operating system platform to minimize; in response speed and security need to spend more design costs
C / S architecture: the need for specialized client application; client requires separate maintenance and upgrades; client operating system is generally limited; full play processing capability of the client, the client fast response
3.URL: Uniform Resource Locator Uniform Resource Locator
http://localhost:8080/xxxx
http: protocol
localhost: 8080 on behalf of IP: Port
xxxx: resource request address
4.TomcatWeb server
WebLogic
Ngnix
Resin
5.Tomcat: Web server, JSP / Servlet container
Contents Introduction:
It used to start and stop the Tomcat script file / bin storage under a variety of platforms
/ Conf Tomcat server storing various profiles
/ Lib Tomcat server storage required for a variety of JAR file
/ Logs stored Tomcat log file
/ Temp Tomcat runtime for temporary files
/ Webapps When you publish a Web application, by default, it will be Web application files stored in this directory
/ Work Tomcat the discharge generated by JSP Servlet thereto directory
Start:
/ Bin directory: startup.bat start script stop script shutdown.bat
If you encounter problems of flash back add the following code in the above two documents:
SET JAVA_HOME = D: \ Java \ jdk1.7 (java jdk directory)
SET TOMCAT_HOME = E: \ tomcat-7.0 (tomcat after extracting the file directory)
Configuration environment variable:
Add system variable CATALINA_HOME directory name for the installation, is Tomcat, add a% CATALINA_HOME% in Path system variable \ bin
6.Web project:
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 profiles, which welcome-file-list represents the first visit of the page collection, welcome-file represents the first visit of the page
Directory Structure:
/ Web application root directory, all files in the directory can be accessed by the client (JSP, HTML, etc.)
/ WEB-INF storage resources used by the application, the directory and its subdirectories are not accessible to the client
/ WEB-INF / classes to store all of the class file of the Web project
/ WEB-INF / lib store Web applications use JAR files
7.JSP page: Java Server Pages (you can embed Java code) JSP page will eventually all be automatically written into .Java WEB container files, compiled into .class files
Composition Content:
page directive:
<% @ Page Attribute 1 = "attribute value" Attribute 2 = "1 attribute value, the attribute value 2" ... n-attribute = "attribute value n"%>
Property Description Default Value
language specifies the JSP pages use scripting language java
import to reference the property through a scripting language used to file a class-free
contentType used to specify the encoding used by JSP pages text / html, ISO-8859-1
Small script: <% Java Code%>
Expression is: <% = Expression%>
Statement: <! Declaration% Method%>
Notes: <! - comment ->; <% - comment, the page can not see ->
Example 8: