|
reply where is web.xml role Posted: 6 Jul 2004
The role of web.xml is very simple .
For example <%@ taglib uri="/WEB-INF/jsp/mytaglib.tld" prefix="first" %>
if u dont do an enrty in web.xml u need to mention the path (uri) of the tag in every jsp.This is a bad practice as to if at any point of time u need to change the location of ur tag library u need to change the path in every jsp where it has been used.
This is the entry in web.xml
<taglib> <taglib-uri>mytags</taglib-uri> <taglib-location> /WEB-INF/jsp/taglib.tld </taglib-location> </taglib>
after u make theentry in web.xml the above tag directive looks like this
<%@ taglib uri="mytags" prefix="first" %>
|