Enabling the Hover-Over-Help Feature Using JSP Custom Tags
The installation procedure is fairly straight forward. After adding the jar file – MYTagLib.jar -- into the /WEB-INF/lib directory in your web project, you can use the deployment descriptor editor in RAD/RSA to complete the installation:
- Develop your own message loader class and add a context parameter with the name “BubbleMsgLoaderClass” and the value as the fully qualified name of your class.
Figure 4 – adding your class name as a Server Context Parameter
- Create a listener. The class name is: com.myuan.tags.bubblemsg.serverside.CacheInitializer, and the class is shipped in the TagLib.jar file.
Figure 5 – creating the listener with the shipped class
- Add the servlet class in the framework into the deployment descriptor in your web project. The servlet class is also shipped in the MYTagLib.jar.
Figure 6 – creating a servlet with the shipped class
- Define the taglib element in the /WEB-INF/web.xml file.
Figure 7 – adding the tag lib references
- Define the tag extension in your JSP pages. The <taglib-uri> and the uri directive must match. The prefix identifies the tags in the tag library within the jsp page. For example:
<%@ taglib uri=”http://yourcompany.com/bubblemsg” prefix=”mt” %>
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)