However, some groups have developed alternative Java-based technologies to try to address these deficiencies. This, in our judgment, is a mistake. Using a third-party tool like Apache Struts that augments JSP and servlet technology is a good idea when that tool adds sufficient benefit to compensate for the additional complexity. But using a nonstandard tool that tries to replace JSP is a bad idea. When choosing a technology, you need to weigh many factors: standardization, portability, integration, industry support, and technical features. The arguments for JSP alternatives have focused almost exclusively on the technical features part. But portability, standardization, and integration are also very important. For example, the servlet and JSP specifications define a standard directory structure for Web applications and provide standard files (.war files) for deploying Web applications. All JSP-compatible servers must support these standards. Filters can be set up to apply to any number of servlets or JSP pages, but not to nonstandard resources. The same goes for Web application security settings.

JSP six built-in objects: 

request, response, out, session, application, config, pagecontext, page, exception. 

ONE. Request for: 

     The object of the package of information submitted by users, by calling the object corresponding way to access the information package, namely the use of the target users can access the information. 

TWO. Response object: 

    The customer's request dynamic response to the client sent the data. 

THREE. session object 

1. What is the session: session object is a built-in objects JSP, it in the first JSP pages loaded automatically create, complete the conversation of management. 

From a customer to open a browser and connect to the server, to close the browser, leaving the end of this server, known as a conversation. When a customer visits a server, the server may be a few pages link between repeatedly, repeatedly refresh a page, the server should be through some kind of way to know this is the same client, which requires session object. 

2. session object ID: When a customer's first visit to a server on the JSP pages, JSP engines produce a session object, and assigned a String type of ID number, JSP engine at the same time, the ID number sent to the client, stored in Cookie, this session objects, and customers on the establishment of a one-to-one relationship. When a customer to connect to the server of the other pages, customers no longer allocated to the new session object, until, close your browser, the client-server object to cancel the session, and the conversation, and customer relationship disappeared. When a customer re-open the browser to connect to the server, the server for the customer to create a new session object. 

FORE. aplication target 

1. What is the application: 

Servers have launched after the application object, when a customer to visit the site between the various pages here, this application objects are the same, until the server is down. But with the session difference is that all customers of the application objects are the same, that is, all customers share this built-in application objects. 

2. application objects commonly used methods: 

(1) public void setAttribute (String key, Object obj): Object specified parameters will be the object obj added to the application object, and to add the subject of the designation of a keyword index. 

(2) public Object getAttribute (String key): access to application objects containing keywords for. 

FIVE. out targets 

out as a target output flow, used to client output data. out targets for the output data. 

SIX. Cookie 

1. What is Cookie: 

Cookie is stored in Web server on the user's hard drive section of the text. Cookie allow a Web site on the user's computer to store information on and then get back to it. 

上一篇:酒店预订英文文献和中文翻译
下一篇:金属板料冲压模具计算机辅助测量集成系统英文文献和中文翻译

AngularJS技术介绍英文文献和中文翻译

开关电源水冷却系统英文文献和中文翻译

减数分裂和基因重组英文文献和中文翻译

太阳能最大功率点追踪和...

移动码头的泊位分配问题英文文献和中文翻译

虚拟船舶装配集成建模方...

中学生科学探究中对等论...

STC89C52单片机NRF24L01的无线病房呼叫系统设计

浅谈高校行政管理人员的...

从政策角度谈黑龙江對俄...

上海居民的社会参与研究

浅论职工思想政治工作茬...

提高教育质量,构建大學生...

AES算法GPU协处理下分组加...

压疮高危人群的标准化中...

酵母菌发酵生产天然香料...

基于Joomla平台的计算机学院网站设计与开发