没有合适的资源?快使用搜索试试~ 我知道了~
jsp技术网站设计外文翻译.doc
0 下载量 38 浏览量
2023-07-30
03:03:17
上传
评论
收藏 108KB DOC 举报
温馨提示
试读
18页
jsp技术网站设计外文翻译.doc
资源推荐
资源详情
资源评论
Combining JSP and Servlets
The technology of JSP and Servlet is the most important technology which use Java
technology to exploit request of server, and it is also the standard which exploit business
application .Java developers prefer to use it for a variety of reasons, one of which is
already familiar with the Java language for the development of this technology are easy to
learn Java to the other is "a preparation, run everywhere" to bring the concept of Web
applications, To achieve a "one-prepared everywhere realized." And more importantly, if
followed some of the principles of good design, it can be said of separating and content to
create high-quality, reusable, easy to maintain and modify the application. For example, if
the document in HTML embedded Java code too much (script), will lead the developed
application is extremely complex, difficult to read, it is not easy reuse, but also for future
maintenance and modification will also cause difficulties. In fact, CSDN the JSP / Servlet
forum, can often see some questions, the code is very long, can logic is not very clear, a
large number of HTML and Java code mixed together. This is the random development of
the defects.
Early dynamic pages mainly CGI (Common Gateway Interface, public Gateway
Interface) technology, you can use different languages of the CGI programs, such as VB, C
/ C + + or Delphi, and so on. Though the technology of CGI is developed and powerful,
because of difficulties in programming, and low efficiency, modify complex shortcomings,
it is gradually being replaced by the trend. Of all the new technology, JSP / Servlet with
more efficient and easy to program, more powerful, more secure and has a good portability,
they have been many people believe that the future is the most dynamic site of the future
development of technology.
Similar to CGI, Servlet support request / response model. When a customer submit a
request to the server, the server presented the request Servlet, Servlet responsible for
handling requests and generate a response, and then gave the server, and then from the
server sent to the customer. And the CGI is different, Servlet not generate a new process,
but with HTTP Server at the same process. It threads through the use of technology, reduce
the server costs. Servlet handling of the request process is this: When received from the
client's request, calling service methods, the method of Servlet arrival of the first
judgement is what type of request (GET / POST / HEAD…), then calls the appropriate
treatment (DoGet / doPost / doHead…) and generate a response.
Although such a complex, in fact, simply said to Servlet is a Java class. And the
general category of the difference is that this type operating in a Servlet container, which
can provide session management and targeted life-cycle management. So that when you
use the Servlet, you can get all the benefits of the Java platform, including the safety of the
management, use JDBC access the database and cross-platform capability. Moreover,
Servlet using thread, and can develop more efficient Web applications.
JSP technology is a key J2EE technology, it at a higher level of abstraction of a
Servlet. It allows conventional static and dynamic HTML content generated by combining
an HTML page looks like, but as a Servlet to run. There are many commercial application
server support JSP technology, such as BEA WebLogic, IBM WebSphere, JRun, and so on.
JSP and Servlet use more than simple. If you have a JSP support for Web servers, and a
JSP document, you can put it Fangdao any static HTML files can be placed, do not have to
compile, do not have to pack, do not have to ClassPath settings, you can visit as ordinary
Web It did visit, the server will automatically help you to do other work.
JSP document looks like an ordinary static HTML document, but inside contains a
number of Java code. It uses. Jsp the suffix, used to tell the server this document in need of
special treatment. When we visit a JSP page, the document will first be translated into a
JSP engine Java source files, is actually a Servlet, and compiler, and then, like other
Servlet, from Servlet engine to handle. Servlet engine of this type loading, handling
requests from customers, and the results returned to the customer, as shown below:
Figure 1: Calling the process of JSP pages
After another visit this page to the customer, as long as the paper there have been no
changes, JSP engine has been loaded directly call the Servlet. If you have already been
modified, it will be once again the implementation of the above process, translate, compile
and load. In fact, this is the so-called "first person to punishment." Because when the first
visit to the implementation of a series of the above process, so will spend some time after
such a visit would not.
Java servlets offer a powerful API that provides access to all the information about the
request, the session, and the application. combining JSP with servlets lets you clearly
separate the application logic from the presentation of the application; in other words, it
lets you use the most appropriate component type for the roles of Model, View and
Controller.
Servlets, Filters, and Listeners
A servlet is a Java class that extends a server with functionality for processing a
request and producing a response. It's implemented using the classes and interfaces defined
by the Servlet API. The API consists of two packages: the javax.servlet package contains
classes and interfaces that are protocol-independent, while the javax.servlet.http package
provides HTTP-specific extensions and utility classes.
What makes a servlet a servlet is that the class implements an interface named
javax.servlet.Servlet, either directly or by extending one of the support classes. This
interface defines the methods used by the web container to manage and interact with the
剩余17页未读,继续阅读
资源评论
智慧安全方案
- 粉丝: 3648
- 资源: 59万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 水稻病害基于Yolov8算法优化目标检测识别与AI辅助决策python源码+模型+使用说明.zip
- 海尔618算价表_七海5.20_16.00xlsx(1)(2).xlsx
- WebCrawler.scr
- 【计算机专业毕业设计】大学生就业信息管理系统设计源码.zip
- YOLO 数据集:8种路面缺陷病害检测【包含划分好的数据集、类别class文件、数据可视化脚本】
- JAVA实现Modbus RTU或Modbus TCPIP案例.zip
- 基于YOLOv8的FPS TPS AI自动锁定源码+使用步骤说明.zip
- JAVA实现Modbus RTU或Modbus TCPIP案例.zip
- 基于yolov8+streamlit的火灾检测部署源码+模型.zip
- 测试aaaaaaabbbbb
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功