JSP and Javabean

zhaozj2021-02-12  142

JSP and Javabean

JSP development of entry-tris (Author: IDEAL 2000 at 18:15 on August 10)

Although you can put a large block of program code in a small instruction file, most Java program code is a component that can be reused, called JavaBean. Javabean is the same as the ActiveX control: they provide known functions and designed for purposes of repeated use. The value of JavaBean is that it can be used via a set of features, and these features provide access to JavaBean. People who come to people, this person is Javabean, and the name, social welfare security number, and address can be characteristic. For JSP websites, basically you are connecting 'JavaBean' dynamic connecting to your website. Suppose Javabean is built before building a website. The first thing you have to do is to tell the JSP web page it needs to use JavaBean. This work can be done with volume: . Volume Script requires you to identify beans in id attribute. Here, you provide a name to let JSP web pages identify beans, except Outside the ID attribute, you must also tell the webpage to find this bean, or its Java category name. Category Properties provide how to find it in a variety of methods, the last needed component is a scope property. With the help of the range properties, you can tell the beans, you want it to be a single web page (preset) [Scope = "Page"] For a request page [scope = "request"]; for the call period [scope = "session"]; or for the entire application [Scope = "Application"] to maintain its own information. For the speech period, You can easily maintain items in the JSP page, such as shopping carts. Once you declare javabean, you can access its characteristics to set it. To get a value of a feature, use the volume. With the volume, you can specify the beans name (from the usebean ID field), and the feature you want to get.

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

New Post(0)