J2EE Learning Notes (1) Open

xiaoxiao2021-03-06  59

Welcome everyone and I discuss with me YcmloveYou@yahoo.com has a good suggestion or have any questions about my notes, please point out. Thank you

--Cookies VS SessionsCookie stores the dialog data to the client, send it to each request. Session stores the dialog data to the server side, only the sessionID is stored in cookie, this method has better security, the server requirements Higher. Based on this, Struts's default scope is Request instead of session. The programmer should use Request Scope to reduce server burden when transmitting data between the program.

- The most important software engineering practice applies the Struts's JSP absolutely no longer doping to process business logic (Scriptlet), and the Scriptlet applies only to the logic processing of Presentation, while business logic should be placed on Action / EJB / DAO. Layer handling. Write in JSP, where Business Logic, will make future maintenance high cost.

- Interpretaion Sequences In the JSP built with Struts contains HTML, JavaScript, JSP Scriptlet, and Struts tags, execution time is JSP scriptlet -> tag library -> HTML JS. So HTML and JS code can nescery, etc. Struts tag can also nested Scriptlet code, but it is wrong. It is often used in html to display bean property in the case, which is a typical example.

--Struts form, RequestStrutsd's form bean survival is very short, assuming that a JSP is entered by Actiona.do?method=Methodinita, Formshared is initialized by ActionServlet, after the MethodInita is over, and this action is as follows, and this action also you may Common to this code snippet ...

转载请注明原文地址:https://www.9cbs.com/read-112607.html

New Post(0)