Monday, September 27, 2010

Servlet 2.5 version of the termination response



First Department, has profound optimization of a small but as an example of the specification also pretty interesting. Servlet 2.4 specification to respond in these types of cases should be effective, including: in response setContentLength method content has been clearly stated, and the content has been written into the response. This is only your code like this can make to respond to re-orientation:

鈼?response.setHeader ("Host", "localhost");

鈼?response.setHeader ("Pragma", "no-cache");

鈼?response.setHeader ("Content-Length", "0");

鈼?response.setHeader ("Location", http://www.apache.org ");

Servlet technology ignore the title of the first specific area, because the content to meet the 0 byte length of the response will be effective immediately. But before it, had to respond to failure of the! Servlet containers are usually refused to implement such behavior, and Servlet 2.5 version added "length must be greater than 0" principle.

Code examples:

Servlet 2.4 specification to be called request.getReader () method called before request.setCharacterEncoding () method. But if you ignore this principle in its wake to the call request.setCharacterEncoding () method, then what would be the consequences, this specification does not say where. The sake of simplicity, to eliminate this situation now!

Cross-context sessions (between sessions in different contexts directory):

Recently, a session on Cross-context rules have been clearly addressed. When Servlets assigned from one context to another context of the request, this rule played a role?? Call in the objective process, including what the session. This version makes the emergence of a context where the portlets directory's home page can be several commands within the context of the other directories in the portlets work.

Servlet 2.5 version it clear that the resources of a context directory can access other contexts directory session (session), regardless of where the request started. This means that portlets can scope out the home page to run in their own areas, and this standard will be applied to incompatible Serlvet container. Look:

Since Servlet 2.5 version to keep some of the old nature, the concept had several major postponed to the next stage. They include:

鈼?new input / output (NIO) support: to make access more conducive to Servlets for NIO client communications.

鈼?filter wrap-under, or wrap-over semantics: sometimes filters packing requests, and / or response object to modify the act or method of opening of the new method. When to this package and the server requests and responses on the package when combined together, how they should be packaged together?

鈼?Servlets for popular documents: the index should serve as welcome as a function of the file? Prior to this, the answer is yes. But the specification did not specify how to use this function, especially in the absence of the index case.

鈼?for popular file distribution rules: how to distribute welcome file, it does not fully explain the details, but left some open gaps to deal with incompatibilities.

鈼?Select the default page after login: If users access their bookmarks Servlet landing page, then after a successful landing page should be turned to where? This problem has not been made clear.

鈼?user's theme log: the right to register through the website after the landing not through traditional means there is no way to trust the user to Servlet.







相关链接:



Optic bound former president of EA games live on their own exclusive rights TO operate



VOB to SWF



Knowledge Of Equality Before The



Simple Password Managers



FLV to Zune



Routing Protocol RIP Routing Basics Introduction to note (2)



3GP to MPEG



Deep antivirus Guide (1)



Whirlpool eventually favored by the United States and Thailand was designated as the optimum board b



Hot Shell TOOLS



Easy To Use Server Applications



digital marketing manager of shandong travel



Unicom frankly difficult to govern without legal constraint SP is critical violations



Easily create pop-up window



Photoshop font effects - waffle words



No comments:

Post a Comment