File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to use tags from taglib in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to use tags from taglib in jsp " Watch "how to use tags from taglib in jsp " New topic
Author

how to use tags from taglib in jsp

shelly sharma
Ranch Hand

Joined: Sep 17, 2003
Posts: 32
i am using tomcat. I don't know where the taglibrary is stored i.e in which folder and how can i access that library and use it in the jsp pages.
vikasids sharma
Ranch Hand

Joined: Aug 01, 2003
Posts: 157
put your .tld files under web-inf directory and .jar files under lib(created under web-inf).
Originally posted by shelly sharma:
i am using tomcat. I don't know where the taglibrary is stored i.e in which folder and how can i access that library and use it in the jsp pages.


Thanks
Vikas Sharma
SCJP(1.4)
Nischal Tanna
Ranch Hand

Joined: Aug 19, 2003
Posts: 182
U should store the tld file in the /WEB-INF Folder(the same folder where u should keep ur web.xml) and the jars file in the /WEB-INF/lib Folder.
In the JSP File u can use the tag by using the taglib directive as follows:
<%@ taglib uri="/WEB-INF/mytld.tld" prefix="hello" %>
The prefix is the name in the tld file as declared below..
<taglib>
....
<shortname>hello</shortname> //this is the value of the prefix attribute in the jsp file
<tag>...</tag>
</taglib>


Thnx
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use tags from taglib in jsp
 
Similar Threads
How do I call method of jsp from servlets?
how to use getLastModified( HttpServletRequest ) in JSP ?
can i use jscript with JSP?
Cookies using Jsp
How to call an interface in JSP