I tried a) . It works but I cannot understand why . tagdir should take a directory but here a filename is specified.
You can point directly to the tld file according to the jsp2.0 spec:
JSP.126.96.36.199 Usage Considerations Finally, the fallback rule allows a taglib directive to refer directly to the TLD.
This arrangement is very convenient for quick development at the expense of less
flexibility and accountability. For example, in the case above, it enables:
<%@ taglib uri="/WEB-INF/tlds/PRlibrary_1_4.tld" prefix="x" %>
That <%@taglib tagdir="WEB_INF/tags/taglib.tld" prefix="h" %> works is for me a miracle. Tagdir is used to point to a directory containing tagfiles (ending on .tag) and not for .tld files. This is not defined in the JSP2.0 spec so just consider it container specific.
We are writing to the outputstream before redirecting.So should not b) be false ??
Yes, you are right (unless there is no buffer defined in the servlet-container)
SRV.5.1 Buffering A servlet container is allowed, but not required, to buffer output going to the client
for efficiency purposes. Typically servers that do buffering make it the default
c)User & role configuration is not part of servlet/jsp spec
The user to role configuration is not defined in the specs, so every container uses its own config-file for that (e.g. tomcat uses tomcat-users.xml)
a is TRUE
b is also TRUE.
But I think a and b both should be false.
A) it should be false, because nothing is written about it in the specs. The fact that tomcat allows it is questionable.
B) it should be false, and this you can actually find back in the specs:
SRV.5.3 Convenience Methods The following convenience methods exist in the HttpServletResponse interface:
If data has been written to the response buffer, but not returned to the client
(i.e. the response is not committed), the data in the response buffer must be
cleared and replaced with the data set by these methods