The advance of Java -- Html, Servlet(Day07)
来源:互联网 发布:linux如何退出终端 编辑:程序博客网 时间:2024/05/29 02:14
1. CS/BS:
①CS: Client-Server = Client + APP Server + DB
②BS: Broswer-Server = Browser + Web Server + DB (HTTP)
2. HTML:
①Lable: text, checkbox, option, select
②Attrbute: id, name, style
③JS: alert();
④DOM: document.getElementById();
3. Servlet: using to handle data and return it to foreground
①Tomcat: including HTTP server and Web container
(1)Install:
1、Installing apache-tomcat-7.0.73.exe under D:\Tomcat 7.0
2、Creating CATALINA_HOME and add D:\Tomcat 7.0;
3、Adding %CATALINA_HOME%\lib\servlet-api.jar in CLASSPATH
4、Adding %CATALINA_HOME%\bin in Path
5、Entering D:\Tomcat 7.0\bin, and run tomcat7.exe.
6、Opening browser and input http://localhost:8080/ , if you can see the interface of Tomcat, it worked.
7、uninstall tomcat:uninstall it in control panel.
*Sometimes, the servlet-api.jar might not add in our project, so we need to add it manually.First of all, right click your project, and choose build path Secondly,add external jar; then find Tomcat 7.0/lib/servlet-api.jar.
(2)Setting in Eclipse:
1. click windown, preferences, server, runtime environment.
2. click add, choose Apache Tomcat7.0 and then click next, choose the right path of directory that you install Tomcat.
(3)The step of Servlet:
Browser(url)-->
web.xml-->
url-pattern-->
servlet-name-->
servlet-name-->
servlet-class-->
full-qualified name-->
reflect to Servlet-->
call method of service
*<welcome-first-list>: default path
(4)Error message:
404: cannot find path
500: execution error
(5)HTTP(HyperText Transfer Protocol):①stateless protocol
②request package is encapsulated in HttpServletRequest request and response package is encapsulated in HttpServletResponse response.
- The advance of Java -- Html, Servlet(Day07)
- The advance of Java -- Servlet, Jsp(Day08)
- The advance of JAVA -- Regex, Set(Day02)
- The advance of Java -- IO, Thread(Day05)
- The advance of Java -- JFC(Java foundation classes library)(Day01)
- The advance of Java -- Set, LinkedList, Map(Day03)
- The advance of Java -- Genericity, Exception, IO(Day04)
- The Knowledge of Linux-.-Day07
- Servlet advance
- day07 Servlet
- The advance of Jave -- Socket, Class Loading, Reflect, AOP(Day06)
- day07-Servletの代码总结
- Servlet , Servlet Mapping and Pattern the HTML
- java 学习day07
- JAVA-day07-集合
- java学习day07
- [Java视频笔记]day07
- Java-day07多线程
- 不爱学习的小W HNUST 1881(数组开小点的灵活运用)
- Java程序与RSR232串口通讯小练手
- 2.1 用引用操作对象
- 微机实验8255方式1
- 第5条:避免创建不必要的对象
- The advance of Java -- Html, Servlet(Day07)
- 【拜小白opencv】45-二维H-S直方图绘制----calcHist()函数、minMaxLoc()函数
- 11、Tensorflow:tf.truncated_normal的用法详解
- Python基础-常用内建模块 collections
- 正则表达式中中括号的三种用途 []
- a标签底部的留白无法清除
- 定时任务Quartz和spring task
- 在O(1)时间删除链表结点(13)
- 批量修改文件名 与 批量文件字符替换