Welcome page welcome. jsp
After you enter the correct password, switch. jsp controls the JSP page and directs it to the welcome page of welcome. jsp. In this section, we will develop this welcome. jsp page. Because welcome. jsp needs to use a third-party tag library, you need to introduce some configuration in JBuilder before developing welcome. jsp.
Configure third-party tag library in JBuilder
The Apache open-source organization provides many useful tag libraries. welcome to the welcome page. jsp needs to use a datetime tag library from Apache. You can use this tag library to display time in JSP. The download address is: Release.
The tag library generally contains two files, one is the JAR file of the class package, and the other is the tag description file with the. tld extension. After extracting from the downloaded compressed document, we put the taglibs-datetime.jar and taglibs-datetime.tld files under the <Project Directory>/datetimeTag directory.
To use a third-party tag library in a project, you must configure the tag library in JBuilder and reference it in the project. The configuration label Library is similar to the configuration class library, and is also completed through the Configure Libraries dialog box. The JBuilder class library and tag library are listed in the tree on the left of the Configure Libraries dialog box. The class library is displayed as an icon, and the tag library is displayed as an icon. Next we will configure the datetime tag library to JBuilder.
1. Tools-> Configure-> Libraries-> Configure Libraries dialog box.
Click Add... in the lower left corner of the Configure Libraries dialog box to bring up the New Library Wizard dialog box, as shown in the following figure:
Figure 17 new database wizard dialog box
In Name, give the database a Name: datetimeTag. Press OK to return to the Configure Libraries dialog box.
2. Specify the tag library file.
After the Configure Libraries dialog box is returned, the datetimeTag node appears in the tree on the left. Because the class library file has not been specified for it, it is displayed as a highlighted red color as opposed to other nodes, click datetimeTag and switch the Library Settings page to the Framework tab, as shown in the following figure:
Figure 18 switch to the Framework
In the Framework drop-down box, select the User-Defined JSP Tag Library option and click Add... in the lower right corner of the tab to bring up the Define New Tag Library dialog box, as shown in the following figure:
Figure 19 description file of the tag library
In the Define New Tag Library dialog box, click... Button, navigate to the <Project Directory>/datetimeTag/taglibs-datetime.tld file, after confirmation, JBuilder automatically fills in the remaining settings, generally do not need to change JBuilder these auto-Supplemental settings. The Prefix specifies a reference Prefix for the tag library. Click OK to return to the Configure Libraries dialog box. The datetimeTag node is displayed in a normal color, as shown in the following figure:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.