reset password
Author Message
ashoush
Posts: 25
Posted 21:35 Oct 15, 2009 |

When we say:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

What does it exactly do? Does it download the JSTL libraries from java.sun server? If yes what if we want to run the project on an intranet with no Internet access?

Thanks.

 

 

Last edited by ashoush at 21:35 Oct 15, 2009.
cysun
Posts: 2935
Posted 21:44 Oct 15, 2009 |

The URI is just an unique identifier/name for the tag library. Although it's usually in the form of a URL (to ensure uniqueness), it doesn't have to be, and there's no download going on. Basically <%@ taglib ... %> is just like "import" in Java.

ashoush
Posts: 25
Posted 22:09 Oct 15, 2009 |

Thank you very much. And where do they define these URI's and their corresponding libraries?

Last edited by ashoush at 22:10 Oct 15, 2009.
cysun
Posts: 2935
Posted 22:16 Oct 15, 2009 |
ashoush wrote:

Thank you very much. And where do they define these URI's and their corresponding libraries?

A tag library is usually packaged in a jar file. Inside the jar file there is a Tag Library Descriptor (.tld) file that specifies the "API" of the tag library. The URI of the tag library is defined there. How to create a tag library is covered in CS320.