You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Smith, David" <Da...@ArtesiaTech.com> on 2000/08/16 22:39:07 UTC

RE: Solution (was: Re: configuring a jsp-tag attribute dynamicall y with a Parameter)

Hi all,

I'm wondering if anyone can help with a problem I'm having...

In my ".tld" file that my JSP's are using, I have the following lines:

*****
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
	"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
*****

The problem I'm having is that if this JSP is loaded on a non-networked,
standalone computer, the URL (pointing to Sun's site) for the ".dtd" will
not work. If I remove the <!DOCTYPE> node altogether, eliminating any
validation, Tomcat throws a parse error. 

At first I wanted to put the actual ".dtd" file in the same directory as the
".tld" file and somehow point the URL to that location. (I've already
downloaded the ".dtd" from Sun and have my local copy ready to go.) Is it
possible to do this somehow? I don't want to hardcode a path in the URL -- I
want it to look in the same directory as the ".tld" file no matter where in
the filesystem the ".tld" file lives. Is that possible? I was desperate and
tried putting in a URL such as "file://./web-jsptaglibrary_1_1.dtd" to do
the trick, but I couldn't seem to get it to work.

Any suggestions?

Thanks much,
d.