Thanks for your help Kris. With some reading, and some input from others, I
think I have it working now.

Had to make sure "uri" taglib declarations in jsp pages matched those in
web.xml. I also learned that the "uri" is really just a unique name, as the
acronym suggests. It doesn't have to "point" anywhere.

One thing I couldn't explain though was a JSP parse error if the uri were
something like uri="jstl-fmt". The parse error said "JSP Parsing Error:File
"/WEB-INF/jsp/jstl-fmt" not found. If I changed it back to
uri="/WEB-INF/lib/fmt.tld" then everything worked fine. I am wondering if
JSP 2.0 expects the tld to be specified in the JSP page and not in web.xml
anymore. (I'll probably play around with this a bit more.)

For any who read this thread hereafter, here are some snippets as examples:

JSP page
<%@ taglib prefix="fmt"         uri="/WEB-INF/lib/fmt.tld" %>
<%@ taglib prefix="c"           uri="/WEB-INF/lib/c.tld" %>
<%@ taglib prefix="html"        uri="/WEB-INF/lib/struts-html-el.tld" %>

web.xml snippet
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
        version="2.4">
...
<taglib>
  <taglib-uri>/WEB-INF/lib/fmt.tld</taglib-uri>
  <taglib-location>/WEB-INF/lib/fmt.tld</taglib-location>
</taglib>

<taglib>
  <taglib-uri>/WEB-INF/lib/c.tld</taglib-uri>
  <taglib-location>/WEB-INF/lib/c.tld</taglib-location>
</taglib>

<taglib>
  <taglib-uri>/WEB-INF/lib/struts-html-el.tld</taglib-uri>
  <taglib-location>/WEB-INF/lib/struts-html-el.tld</taglib-location>
</taglib>
</web-app>

-----Original Message-----
From: Kris Schneider [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 28, 2004 8:39 AM
To: Tag Libraries Users List
Subject: RE: *regular* jsp vs. *xml document* jsp question

No problem, it just means you can't take advantage of some of the Servlet
2.4/JSP 2.0 features. Actually, this looks like a problem with page
validation
as opposed to "normal" JSP vs. JSP document. Can you post the part of the
page
that's generating the error (including any taglib directives it uses)?

Quoting "Barnett, Brian W." <[EMAIL PROTECTED]>:

> Hmm. Don't have <jsp-property-group> element in web.xml. Don't have .jspx
> extension. Don't have <jsp:root> in jsp page.  Using Servlet 2.3 web.xml.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> <web-app>
> 
> ...
> </web-app>
> 
> Looks like my web.xml is defined differently than you suggest. Is there a
> problem with this?
> 
> -----Original Message-----
> From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 27, 2004 1:56 PM
> To: Tag Libraries Users List
> Subject: RE: *regular* jsp vs. *xml document* jsp question
> 
> For JSP 2.0, a JSP document is identified in one of the following ways:
> 
> The existence in web.xml of a <jsp-property-group> element with an
<is-xml>
> subelement set to "true".
> 
> The file has a .jspx extension.
> 
> The top element of the file is <jsp:root>.
> 
> Are you using a Servlet 2.4 web.xml:
> 
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>          version="2.4">
>   ...
> </web-app>
> 
> Quoting "Barnett, Brian W." <[EMAIL PROTECTED]>:
> 
> > As far as I know, we can go with Servlet 2.4/JSP 2.0.
> > 
> > -----Original Message-----
> > From: Kris Schneider [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, May 27, 2004 6:17 AM
> > To: Tag Libraries Users List
> > Subject: Re: *regular* jsp vs. *xml document* jsp question
> > 
> > Do you need to remain compliant with Servlet 2.3/JSP 1.2 or can you go
> with
> > Servlet 2.4/JSP 2.0?
> > 
> > Quoting "Barnett, Brian W." <[EMAIL PROTECTED]>:
> > 
> > > Just installed Tomcat 5.0.19 and it is complaining about some stuff in
> my
> > > jsp files. After some reading, I determined it had something to do
with
> > > "regular" jsp's vs. "xml document" jsp's.  Does anyone know how to
> > configure
> > > Tomcat 5 to see my jsp's as "regular" jsp's?  Or is there something I
> need
> > > to add to my jsp's?
> > > 
> > > The error I get is "The function XXX must be used with a prefix when a
> > > default namespace is not specified".
> > > 
> > > Thanks,
> > > Brian Barnett
> > 
> > -- 
> > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > D.O.Tech       <http://www.dotech.com/>
> 
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to