The Example JSP Pages custom tags

This topic describes the tasks involved in defining simple tags. It illustrates the tasks using excerpts from the JSP version of the Duke's Bookstore application discussed in The Example JSP Pages, rewritten here to take advantage of several custom tags:

● A catalog tag for rendering the book catalog
● A shipDate tag for rendering the ship date of an order
● A template library for ensuring a common look and feel among all screens and composing screens out of content chunks

The template is a JSP page that has placeholders for the parts that need to change with each screen. Each of these placeholders is referred to as a parameter of the template. The template is created using a set of nested tags (definition, screen, and parameter) that are used to build a table of screen definitions for Duke's Bookstore. An insert tag to insert parameters from the table into the screen. Example JSP custome tags

To deploy and run the application using NetBeans IDE, follow these steps:

1• Perform all the operations described in Accessing Databases from Web Applications.
2• In NetBeans IDE, select File->Open Project.
3• In the Open Project dialog, navigate to:


4• Select the bookstore3 folder.
5• Select the Open as Main Project check box and the Open Required Projects check box.
6• Click Open Project.
7• In the Projects tab, right-click the bookstore3 project, and select Undeploy and Deploy.
8• To run the application, open the bookstore URL http://localhost:8080/bookstore3/bookstore.

To deploy and run the application using Ant, follow these steps:

1• In a terminal window, go to tut-install/javaeetutorial5/examples/web/bookstore3/.
2• Type ant. This command will spawn any necessary compilations, copy files to the tut-install/javaeetutorial5/examples/web/bookstore3/build/ directory, and create a WAR file and copy it to the tut-install/javaeetutorial5/examples/web/bookstore3/dist/ directory.
3• Start the Application Server.
4• Perform all the operations described in Creating a Data Source in the Application Server.
5• To deploy the example, type ant deploy. The deploy target outputs a URL for running the application. Ignore this URL, and instead use the one shown in the next step.
6• To run the application, open the bookstore URL http://localhost:8080/bookstore3/bookstore.

To learn how to configure the example, refer to the web.xml file, which includes the following configurations:

● A display-name element that specifies the name that tools use to identify the application.
● A context-param element that specifies the JSTL resource bundle base name.
● A listener element that identifies the ContextListener class used to create and remove the database access.
● A servlet element that identifies the Dispatcher instance.
● A set of servlet-mapping elements that map Dispatcher to URL patterns for each of the JSP pages in the application.
● Nested inside a jsp-config element is a jsp-property-group element, which sets the properties for the group of pages included in this version of Duke’s Bookstore. See Setting Properties for Groups of JSP Pages for more information.To learn how to configure the example, refer to the web.xml file, which includes the following configurations:

To run the example, open the bookstore URL http://localhost:8080/bookstore3/bookstore.

References : oracle « Privious Post » « Next Post » share on :        :  

Love to hear your Views / Guidance / Recommendations on this Post…

Explore the Technology World

Computer Programming Terminologies Computer Programming Terminology is a general word for the group of specialized words or meanings relating to Computer Programming, and also the study of such t ...Read MoreNew features in JDK 12 with IntelliJ IDEADeveloped by JetBrains (formerly known as IntelliJ) ,IntelliJ IDEA is a Java integrated development environment (IDE) for developing computer software. It is av ...Read MoreGoogle Pay API Implementation Demo for AndroidIn this youtube Channel by Android Developers ,Learn how to implement the Google Pay API for Android with just a few lines of code and how it works with your ex ...Read MoreUnit Testing in .NET Core and Azure Devops pipelineUnit testing is a software testing method by which individual units of source code, usage procedures,sets of one or more computer program modules together with ...Read MoreThe mind behind Linux & GIT : Linus TorvaldsLinus Torvalds transformed technology twice — first with the Linux kernel, which helps power the Internet, and again with Git, the source code management ...Read MoreTensorflow and deep learningWith Tensorflow ,deep machine learning transitions from an area of research into mainstream software engineering. ...Read MoreJava program to return all possible permutations from collection of distinct numbersexample of Java program to return all possible permutations from collection of distinct numbers ...Read MoreReal Time Analytics with Spring Application Development FrameworkSpring is the most popular application development framework for enterprise Java.Millions of developers use Spring to build simple, truly portable, fast and fle ...Read MorePath Setting in Java When an application is launched from command prompt Windows OS searches for the executable program in the current working directory. The prompt throws an error ...Read MoreFacebook | whatsapp|Github | Twitter | LinkedIn | Youtube| reddit About | Cookies-Policy | Disclaimer | Site Map | Contact

Call / Visit for New Batch


Why Join Us

  • ➯ Free Demo Classes
  • ➯ No Registration Fee
  • ➯ Interview Questions
  • ➯ Study Materials
  • ➯ Softwares
  • ➯ Aptitude & Reasoning
  • ➯ Placement Assitance


  • MyJava Training Institute ,
  • Plot No.243 , shop No 14 ,
  • Secnd Floor , Zone-II ,
  • M.P.Nagar , Bhopal,
  • Madhya Pradesh ( 462011 )
  • ☎  08871209400 , 7987028543
  • 🌐
FacebookGoogle +TwitterYouTube

MyJava - java Training Institute