tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffry Guttadauro <>
Subject Re: Concatenation problem in taglibs tag in JSPs
Date Fri, 29 Dec 2000 20:35:58 GMT
And if you want, you can also set up the web.xml file to specify the tld's
location for you, so your taglib directives don't have to.  Do this by just
adding this to your web.xml file (I think the placement of the tag might
matter, so check the dtd to see what order to use)...


{can use multiple taglib tags to define your other ones too}

Then, you would just use the plain struts uri in the taglib directive.

<%@ taglib uri="struts" prefix="struts" %>

Doesn't make anything work better, but it's less to deal with in the jsp
pages, and if you ever want to move your tld's around, you just have to worry
about updating the web.xml instead of ?? jsp pages. on 12/29/2000 02:06:29 PM
Please respond to
Subject: Re: Concatenation problem in taglibs tag in JSPs

Tomcat 3.2 is automatically registering homedir as a Web application,
so from from the JSP's viewpoint, /homedir/ is the root.

Usually, the TLDs for a Struts application would read

<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>

regardless of which application they are in.

*********** REPLY SEPARATOR ***********

On 12/29/2000 at 11:37 AM Robert Zazueta wrote:
Hey there! We're currently in the process of upgrading to Tomcat 3.2.1
from 3.1.1 and have run into an interesting problem. We're using the
Struts tag library in our JSP files. These are the lines we're using to
call the .tld files from the jsp:
<%@ taglib uri="/homedir/WEB-INF/struts.tld" prefix="struts" %>
<%@ taglib uri="/homedir/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/homedir/WEB-INF/struts-bean.tld" prefix="bean" %>
When we try to load these pages, however, we receive this error in the
Error: 500
Location: /store/categories/business/marketing/index.jsp
Internal Servlet Error:
ss/marketing/index.jsp(4,0) Unable to open taglibrary
/homedir/WEB-INF/struts.tld :
tld (No such file or directory)
If you look at the location where it's trying to get the struts.tld
file, you'll see that it's actually trying to get into homedir twice
.tld) though that's not the structure of the directory. The directory
structure and this code worked just fine in 3.1.1.
It's clear to me that this part of the path --
/homedir/WEB-INF/struts.tld -- is being called from the taglib tag in
the JSP file. What about that first part of the path? Where does that
get set? Is it just the docpath variable? How do I fix this duplication
Rob Z.


View raw message