Hi,

I am using J2EE for testing a system which uses JSP 1.1 and implements the
Model-2 architecture (command design pattern). As the last step in
streamlining my JSP's I am developing some custom tags (condition, iterator
etc.) to finally eliminate all Java coding from the JSP coding.

According to the JSP 1.1 specification (PR2 October 14, 1999), the following
syntax should be allowed:

<%@ taglib uri="mytags.jar" prefix="mt" %>

The JSP 1.1 spec example says "The use of a relative URI specification
enables very short names in the taglib directive".

This is obviously a very good idea so that a web archive can be deployed
under different web contexts. If an absolute URI was used for the taglib
then it would not be possible to redeploy the web archive without changing
all the taglib directives embedded in all the JSP source files. Unless you
decided to have a shared custom tag library in an absolute location which
would be used by all applications.

However, using a relative URI and with mytaglib.jar deployed within the web
archive under the same context as my JSP page, I get the following error:

Error: 500
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to open taglibrary mytags.jar : no
protocol: mytags.jar

I guessed that this meant that I did not specify the "http" protocol, so I
tried uri="http://./mytags.jar", but this did not work either.

However, I found that an absolute
uri="http://myhost:8000/MyContext/mytags.jar" does work.

Is this a J2EE/JSP (tomcat) bug or is it just my coding?

Any ideas would be greatly appreciated.

Geoff


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to