JBuilder2005 jsp2.0 Custom Label __js

Source: Internet
Author: User
Tags tld
To implement the jsp2.0 under jb2005 First you need to configure the Tomcat5.0 version above, and then jsp2.0 the jar file, please refer to the previous article JBuilder2005 under the jsp2.0 first experience, This article is mainly about the development of custom tags under jb2005. In order to be able to quickly develop, I used the open source JSP tag Wizards v3.0 plug-in, it can help us to quickly develop jsp1.1, to jsp2.0 the various tags. The download address is: http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=21573. Unzip the downloaded compression pack into the Jbuilder/lib/ext. To create a new MYTAG2 project, add the jsp2.0 and JSTL1.1 packages we mentioned in the previous section. Create a new Web module to create a JSP tag file, double-click JPS Tag as we use here is simpletagsupport so check simple tag, click OK can see JSP tag Wizards v3.0 has automatically generated for US Hel Lo.java files. Here I change the Dotag () method to public void Dotag () throws IOException, jspexception {        JSPWR ITER out = Getjspcontext (). Getout ();        /** @todo Specify any output value of this tag/    &NB sp;   out.print ("Hello JSp2.0 tag");    }   Then build the TLD file. As shown in the figure Select Taglib Descriptor Next we can select where to generate the TLD file, and the name, where I have not changed its default value. Click Next > Until we can select the tag body content for empty.   Finish. You can see the JSP Tag Wizards v3.0 generates MYTAG2.TLD files for us, as well as related configurations. Next we need to move it to Web-inf/tld, right click on Web-inf> New>directory Click OK. Move the Mytag2.tld file that you just generated to.   Create a new JSP file.

  All right, let's take a look at the implementation results. &NBSP

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.