freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計算機外文翻譯---jsp應用框架-jsp程序(編輯修改稿)

2025-06-25 17:29 本頁面
 

【文章內(nèi)容簡介】 verhead. Servlet developers can use the init() method to hold references to expensive resources, such as database connections or EJB Home Interfaces, so that they can be shared between requests. Acquiring resources like these can take several seconds— which is longer than many surfers are willing to wait. The other edge of the sword is that, since servlets are multithreaded, servlet developers must take special care to be sure their servlets are threadsafe. To learn more about servlet programming, we remend Java Servlets by Example, by Alan R. Williamson [Williamson]. The definitive source for Servlet information is the Java Servlet Specification [Sun, JST]. JavaServer Pages: 6 While Java servlets are a big step up from CGI programs, they are not a panacea. To generate the response, developers are still stuck with using println statements to render the HTML. Code that looks like: (POne line of HTML./P)。 (PAnother line of HTML./P)。 is all too mon in servlets that generate the HTTP response. There are libraries that can help you generate HTML, but as applications grow more plex, Java developers end up being cast into the role of HTML page designers. Meanwhile, given the choice, most project managers prefer to divide development teams into specialized groups. They like HTML designers to be working on the presentation while Java engineers sweat the business logic. Using servlets alone encourages mixing markup with business logic, making it difficult for team members to specialize. To solve this problem, Sun turned to the idea of using server pages to bine scripting and templating technologies into a single ponent. To build Java Server Pages, developers start by creating HTML pages in the same old way, using the same old HTML syntax. To bring dynamic content into the page, the developer can also place JSP scripting elements on the page. Scripting elements are tags that encapsulate logic that is recognized by the JSP. You can easily pick out scripting elements on JSP pages by looking for code that begins with % and ends with %. To be seen as a JSP page, the file just needs to be saved with an extension of .jsp. When a client requests the JSP page, the container translates the page into a source code file for a Java servlet and piles the source into a Java class file— just as you would do if you were writing a servlet from scratch. At runtime, the container can also check the last modified date of the JSP file against the class file. If the JSP file has changed since it was last piled, the container will retranslate and rebuild the page all over again. Project managers can now assign the presentation layer to HTML developers, who then pass on their work to Java developers to plete the businesslogic portion. The important thing to remember is that a JSP page is really just a servlet. Anything you can do with a servlet, you can do with a JSP. 7 JavaBeans: JavaBeans are Java classes which conform to a set of design patterns that make them easier to use with development tools and other ponents. DEFINITION A JavaBean is a reusable software ponent written in Java. To qualify as a JavaBean, the class must be concrete and public, and have a noargument constructor. JavaBeans expose internal fields as properties by providing public methods that follow a consistent design pattern. Knowing that the property names follow this pattern, other Java classes are able to use introspection to discover and manipulate JavaBean properties. The JavaBean design patterns provide access to the bean’s internal state through two flavors of methods: accessors are used to read a JavaBean’s state。 mutators are used to change a JavaBean’s state. Mutators are always prefixed with lowercase token set followed by the property name. The first character in the property name must be uppercase. The return value is always void— mutators only change property values。 they do not retrieve them. The mutator for a simple property takes only one parameter in its signature, which can be of any type. Mutators are often nicknamed setters after their prefix. The mutator method signature for a weight property of the type Double would be: public void setWeight(Double weight) A similar design pattern is used to create the accessor method signature. Accessor methods are always prefixed with the lowercase token get, followed by the property name. The first character in the property name must be uppercase. The return value will match the method parameter in the corresponding mutator. Accessors for simple properties cannot accept parameters in their method signature. Not surprisingly, accessors are often called getters. The accessor method signature for our weight property is: public Double getWeight() If the accessor returns a logical value, there is a variant pattern. Instead of using the lowercase token get, a logical property can use the prefix is, followed by the property name. The fir
點擊復制文檔內(nèi)容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1