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 Adam Hardy <ah...@cyberspaceroad.com> on 2003/10/02 19:14:07 UTC
fmt taglib validation fails with web-app_2_4.xsd
I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
descriptor I replaced the old web-app_2_3.dtd reference with
web-app_2_4.xsd . Now I'm having problems.
What was working fine:
<fmt:message key="${var4SomeKey}"/>
is now causing the JasperException:
According to TLD or attribute directive in tag file, attribute property
does not accept any expressions.
I don't know why it should state that since the taglib was handling the
EL expressions before perfectly.
In my web.xml I do not have any taglib tld location mappings and I'm
wondering if I need them now to solve my problem.
I can't find any reference to this issue in the archives or google or
bugzilla, but I'm sure it must be a well known issue.
Does anybody know what's up with my set-up?
Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I included my jsp below.
All I have to do though to trigger the exceptions (about 10) is to
include the standard-1.1.0-B1.jar in my webapp. I think it must be
related to something in my web.xml. I'm using the following now since I
upgraded to web-app_2_4:
<jsp-config>
<jsp-property-group>
<description>
Trial run
</description>
<display-name>Geronimo!</display-name>
<url-pattern>/WEB-INF/general/*</url-pattern>
<el-ignored>false</el-ignored>
<scripting-invalid>false</scripting-invalid>
</jsp-property-group>
</jsp-config>
This is my JSP
<%@ page language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tiles"
uri="http://jakarta.apache.org/struts/tags-tiles" %>
<fmt:message key="general.browserTitle"/>
<tiles:useAttribute name="browserSubtitle" />
<fmt:message key="${browserSubtitle}"/>
On 10/02/2003 09:06 PM Kris Schneider wrote:
> I really haven't played around with TC 5 or JSTL 1.1, but a quick smoke test
> passed just fine. I used the following JSP:
>
> <%@ page contentType="text/plain" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
> <c:set var="key" value="msg"/>
> <fmt:bundle basename="messages">
> Message: <fmt:message key="${key}"/>
> </fmt:bundle>
>
> With the following resource bundle:
>
> msg=Hello, world!
>
> And got the expected output. Can you post relevent snippets from your web.xml
> and JSP file?
>
> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>
>
>>I had wanted to do that but had stupidly not found the tarball. I got it
>>now but after deploying them and changing the taglib declares to what
>>you gave, tomcat chokes on the TLD validation. Do you recognise the
>>problem?
>>
>>preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
>>starting with element 'jsp-version'. The content must match
>>
>
> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
>>
>>
>>On 10/02/2003 07:32 PM Kris Schneider wrote:
>>
>>>You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
>>>container. Note that the URI will be different:
>>>
>>>JSTL 1.0:
>>>http://java.sun.com/jstl/fmt
>>>
>>>JSTL 1.1:
>>>http://java.sun.com/jsp/jstl/fmt
>>>
>>>Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>>>
>>>
>>>
>>>>I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
>>>>descriptor I replaced the old web-app_2_3.dtd reference with
>>>>web-app_2_4.xsd . Now I'm having problems.
>>>>
>>>>What was working fine:
>>>>
>>>><fmt:message key="${var4SomeKey}"/>
>>>>
>>>>is now causing the JasperException:
>>>>
>>>>According to TLD or attribute directive in tag file, attribute property
>>>>does not accept any expressions.
>>>>
>>>>I don't know why it should state that since the taglib was handling the
>>>>EL expressions before perfectly.
>>>>
>>>>In my web.xml I do not have any taglib tld location mappings and I'm
>>>>wondering if I need them now to solve my problem.
>>>>
>>>>I can't find any reference to this issue in the archives or google or
>>>>bugzilla, but I'm sure it must be a well known issue.
>>>>
>>>>Does anybody know what's up with my set-up?
>>>>
>>>>Adam
>>>>
>>>>--
>>>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>>>Linux 2.4.20 RH9
>>>
>>>
>>--
>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>Linux 2.4.20 RH9
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>
>
>
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Kris Schneider <kr...@dotech.com>.
Quoting Hans Bergsten <ha...@gefionsoftware.com>:
> Adam Hardy wrote:
> > I do have a reason for upgrading - I'm not just a masochist ;) - I need
> > the character encoding features of the servlet 2.4 spec. Thanks for the
> > explanation of that error on the struts taglibs. Makes sense. It was the
> > same error as I was getting from the old jstl 1.0.4 taglibs, which also
> > makes sense.
> >
> > So essentially the Struts taglibs need new TLDs for JSP 2.0. It sounds
> > like the code doesn't have to change, is that so?
>
> Someone who knows more about Struts than I do may correct me on this,
> but I believe you can simply switch to the regular, non-EL version of
> the Struts libraries.
>
> The main point is that an EL version of a tag library declares all
> attributes as String attributes that don't take "request-time attribute
> values" (rtexprvalues), and evaluates all EL strings itself. In JSP 2.0,
> both EL and Java expressions can be used as rtexprvalues, and the
> container takes care of the evaluation of both types. The tag library
> must therefore declare the attributes as rtexprvalues, and whatever the
> native type of the attribute is instead of String. This typically means
> that a version of the library that's ignorant of EL expressions works
> fine with JSP 2.0.
Right. In fact, here's a (stupid) example using one of the standard (non-EL)
Struts 1.1 tags:
<%@ page contentType="text/plain" %>
<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-bean" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="mapName" value="map"/>
<jsp:useBean id="map" class="java.util.HashMap"/>
<c:set target="${map}" property='<%= "foo" %>' value="bar"/>
<bean:size id="mapSize" name="${mapName}"/>
Map: ${map}
Map size: ${mapSize}
Which outputs:
Map: {foo=bar}
Map size: 1
So, with JSP 2.0, you get to use *either* a scriptlet expression or an EL
expression for your tag attribute values. This is true even for JSP 1.1 taglibs,
like Struts.
> > I've got the JSTL 1.1
> > spec, I'll check it out.
> >
> > Re: the tomcat start-up exceptions
> >
> > preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
> > org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
> > starting with element 'jsp-version'. The content must match
> >
> >
>
'((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
> >
> >
> > This is some sort of xml parsing problem, I've narrowed it down to the
> > following declaration in tomcat's server.xml:
> >
> > <Host name="localhost"
> > debug="0"
> > appBase="webapps"
> > unpackWARs="true"
> > autoDeploy="true"
> > xmlValidation="true"
> > xmlNamespaceAware="true">
> >
> > When I remove the xmlValidation & xmlNamespaceAware attributes, the
> > startup exceptions disappear. I put these attributes in as true so that
> > tomcat would catch any errors I make in the server.xml. Obviously I can
> > live without it or even live with the errors, but it's not happy.
> >
> > And the exceptions only occur on startup if I delete the tld caches.
> >
> > It seems this is an issue with jakarta-taglibs and tomcat, rather than
> > with my configuration. Is that so?
>
> I've seen some messages on the Tomcat Developers list about problems
> with XML Schema validation due to bugs in the bundled version of Xerces.
> If you absolutely need the validation, you may want to try to replace it
> with a different JAXP compliant XML parser that handles XML Schema
> validation.
>
> Hans
>
> > On 10/02/2003 11:59 PM Hans Bergsten wrote:
> >
> >> To make a long story short, if you primarily want to upgrade to TC 5 and
> >> have no interest in using the new JSP 2.0 features, continue to use the
> >> Servlet 2.3 deployment descriptor (DD) instead of changing it to a 2.4
> >> DD. A JSP 2.0 container (like TC 5) treats an app with a 2.3 DD just as
> >> a JSP 1.2 container, so the app should just work as-is if you do this.
> >>
> >> If you change to a 2.4 DD, you're telling the JSP container to handle
> >> all EL expressions (instead of letting the JSTL (Or custom library, like
> >> Struts) tag handlers handle them). For this to work, you need to change
> >> all tag libraries to JSP 2.0 versions (where the attributes are marked
> >> as accepting "request-time attribute values"). JSTL 1.1 defines new
> >> versions of all libraries for this purpose (with new URIs). I'm not sure
> >> if there are JSP 2.0 versions of the Struts EL libraries, though.
> >>
> >> For more on this, see the JSTL 1.1 spec.
> >>
> >> Hans
>
>
> --
> Hans Bergsten <ha...@gefionsoftware.com>
> Gefion Software <http://www.gefionsoftware.com/>
> Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
> Details at <http://TheJSPBook.com/>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
So basically the problem at the moment is that xerces-2.1.0 will throw
exceptions trying to parse the taglibs, and xerces-2.5.0 will throw
exceptions trying to parse the server.xml.
As far as I can tell this issue should be cleared up by the next release
of JAXP, if the people on the tomcat-dev list are correct.
Please correct me if I'm wrong.
Regards
Adam
On 10/03/2003 01:39 PM Kris Schneider wrote:
>>re xml parsing issue, in the server.xml somebody left the useful comment:
>>
>><!-- Note: XML Schema validationn will works with Xerces 2.0.1 or
>> Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
>> their use with Tomcat-->
>>
>>On 10/03/2003 09:30 AM Hans Bergsten wrote:
>>
>>>>Re: the tomcat start-up exceptions
>>>>
>>>>preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>>>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
>>>>starting with element 'jsp-version'. The content must match
> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
> The following recent mail on tomcat-dev explains the issue.
>
> http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg47251.html
>
> I'll see whether I can find the old version of xerces and install that, which should make the issue disappear. Or crimson.
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Rick Ross <rr...@stupendousman.com>.
TLDs should be in the jar as well.
Adam Hardy wrote:
> Hi Kris,
> thanks for the info.
>
> How are you getting that info (name, comment, impl...) from the jar?
> When I open the jar with a GUI archiving tool it shows just a contents
> list. There is a META-INF/MANIFEST.MF file, but it contains only 2
> lines stating the ant version and the manifest version. I checked for
> the org.apache.xerces.impl.Version file, but it is a binary class
> file. The java -cp command works fine on it, but otherwise it leaves
> no clues.
>
> Thanks
> Adam
>
>
>
> On 10/03/2003 01:39 PM Kris Schneider wrote:
>
>> Look for the following entry near the top of the xercesImpl.jar
>> manifest:
>>
>> Name: org/apache/xerces/impl/Version
>> Comment: @impl.name@ for http://xml.apache.org/xerces2-j
>> Implementation-Title: org.apache.xerces.impl.Version
>> Implementation-Version: 2.5.0
>> Implementation-Vendor: Apache Software Foundation
>> Implementation-URL: http://xml.apache.org/xerces2-j/
>>
>> The above is from Xerces 2.5.0. You can also run the following:
>>
>> java -cp xercesImpl.jar org.apache.xerces.impl.Version
>>
>> which will output something like:
>>
>> Xerces-J 2.5.0
>>
>> The version bundled with TC 5.0.12 appears to be 2.1.0.
>>
>> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>>
>>
>>> Thanks Hans, Yann,
>>>
>>> re xml parsing issue, in the server.xml somebody left the useful
>>> comment:
>>>
>>> <!-- Note: XML Schema validationn will works with Xerces 2.0.1 or
>>> Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
>>> their use with Tomcat-->
>>>
>>> Because of that I assumed that the bundled xerces would be 2.1 - but
>>> I didn't check - unfortunately the tomcat docs only say "Tomcat 5.0
>>> also makes Xerces 2 and the Commons Logging API (release 1.0.3)
>>> available to web applications."
>>>
>>> I'm a bit ashamed to ask, but is there any way of telling what
>>> version the jar file is, from the jar itself?
>>>
>>> The following recent mail on tomcat-dev explains the issue.
>>>
>>> http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg47251.html
>>>
>>> I'll see whether I can find the old version of xerces and install
>>> that, which should make the issue disappear. Or crimson.
>>>
>>>
>>> Adam
>>>
>>> On 10/03/2003 09:30 AM Hans Bergsten wrote:
>>>
>>>>> Re: the tomcat start-up exceptions
>>>>>
>>>>> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>>>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
>>>>> content starting with element 'jsp-version'. The content must match
>>>>>
>>>>>
>>>
>> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>>
>>
>>>>>
>>>>> This is some sort of xml parsing problem, I've narrowed it down to
>>>>> the following declaration in tomcat's server.xml:
>>>>>
>>>>> <Host name="localhost"
>>>>> debug="0"
>>>>> appBase="webapps"
>>>>> unpackWARs="true"
>>>>> autoDeploy="true"
>>>>> xmlValidation="true"
>>>>> xmlNamespaceAware="true">
>>>>>
>>>>> When I remove the xmlValidation & xmlNamespaceAware attributes,
>>>>> the startup exceptions disappear. I put these attributes in as
>>>>> true so that tomcat would catch any errors I make in the
>>>>> server.xml. Obviously I can live without it or even live with the
>>>>> errors, but it's not happy.
>>>>>
>>>>> And the exceptions only occur on startup if I delete the tld caches.
>>>>>
>>>>> It seems this is an issue with jakarta-taglibs and tomcat, rather
>>>>> than with my configuration. Is that so?
>>>>
>>>>
>>>>
>>>> I've seen some messages on the Tomcat Developers list about problems
>>>> with XML Schema validation due to bugs in the bundled version of
>>>> Xerces.
>>>> If you absolutely need the validation, you may want to try to
>>>> replace it
>>>> with a different JAXP compliant XML parser that handles XML Schema
>>>> validation.
>>>>
>>>> Hans
>>>
>>>
>>> --
>>> struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>> Linux 2.4.20 RH9
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Hi Kris,
thanks for the info.
How are you getting that info (name, comment, impl...) from the jar?
When I open the jar with a GUI archiving tool it shows just a contents
list. There is a META-INF/MANIFEST.MF file, but it contains only 2 lines
stating the ant version and the manifest version. I checked for the
org.apache.xerces.impl.Version file, but it is a binary class file. The
java -cp command works fine on it, but otherwise it leaves no clues.
Thanks
Adam
On 10/03/2003 01:39 PM Kris Schneider wrote:
> Look for the following entry near the top of the xercesImpl.jar manifest:
>
> Name: org/apache/xerces/impl/Version
> Comment: @impl.name@ for http://xml.apache.org/xerces2-j
> Implementation-Title: org.apache.xerces.impl.Version
> Implementation-Version: 2.5.0
> Implementation-Vendor: Apache Software Foundation
> Implementation-URL: http://xml.apache.org/xerces2-j/
>
> The above is from Xerces 2.5.0. You can also run the following:
>
> java -cp xercesImpl.jar org.apache.xerces.impl.Version
>
> which will output something like:
>
> Xerces-J 2.5.0
>
> The version bundled with TC 5.0.12 appears to be 2.1.0.
>
> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>
>
>>Thanks Hans, Yann,
>>
>>re xml parsing issue, in the server.xml somebody left the useful comment:
>>
>><!-- Note: XML Schema validationn will works with Xerces 2.0.1 or
>> Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
>> their use with Tomcat-->
>>
>>Because of that I assumed that the bundled xerces would be 2.1 - but I
>>didn't check - unfortunately the tomcat docs only say "Tomcat 5.0 also
>>makes Xerces 2 and the Commons Logging API (release 1.0.3)
>>available to web applications."
>>
>>I'm a bit ashamed to ask, but is there any way of telling what version
>>the jar file is, from the jar itself?
>>
>>The following recent mail on tomcat-dev explains the issue.
>>
>>http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg47251.html
>>
>>I'll see whether I can find the old version of xerces and install that,
>>which should make the issue disappear. Or crimson.
>>
>>
>>Adam
>>
>>On 10/03/2003 09:30 AM Hans Bergsten wrote:
>>
>>>>Re: the tomcat start-up exceptions
>>>>
>>>>preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>>>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
>>>>starting with element 'jsp-version'. The content must match
>>>>
>>>>
>>
> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
>>>>
>>>>This is some sort of xml parsing problem, I've narrowed it down to the
>>>>following declaration in tomcat's server.xml:
>>>>
>>>> <Host name="localhost"
>>>> debug="0"
>>>> appBase="webapps"
>>>> unpackWARs="true"
>>>> autoDeploy="true"
>>>> xmlValidation="true"
>>>> xmlNamespaceAware="true">
>>>>
>>>>When I remove the xmlValidation & xmlNamespaceAware attributes, the
>>>>startup exceptions disappear. I put these attributes in as true so
>>>>that tomcat would catch any errors I make in the server.xml. Obviously
>>>>I can live without it or even live with the errors, but it's not happy.
>>>>
>>>>And the exceptions only occur on startup if I delete the tld caches.
>>>>
>>>>It seems this is an issue with jakarta-taglibs and tomcat, rather than
>>>>with my configuration. Is that so?
>>>
>>>
>>>I've seen some messages on the Tomcat Developers list about problems
>>>with XML Schema validation due to bugs in the bundled version of Xerces.
>>>If you absolutely need the validation, you may want to try to replace it
>>>with a different JAXP compliant XML parser that handles XML Schema
>>>validation.
>>>
>>>Hans
>>
>>--
>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>Linux 2.4.20 RH9
>
>
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Kris Schneider <kr...@dotech.com>.
Look for the following entry near the top of the xercesImpl.jar manifest:
Name: org/apache/xerces/impl/Version
Comment: @impl.name@ for http://xml.apache.org/xerces2-j
Implementation-Title: org.apache.xerces.impl.Version
Implementation-Version: 2.5.0
Implementation-Vendor: Apache Software Foundation
Implementation-URL: http://xml.apache.org/xerces2-j/
The above is from Xerces 2.5.0. You can also run the following:
java -cp xercesImpl.jar org.apache.xerces.impl.Version
which will output something like:
Xerces-J 2.5.0
The version bundled with TC 5.0.12 appears to be 2.1.0.
Quoting Adam Hardy <ah...@cyberspaceroad.com>:
> Thanks Hans, Yann,
>
> re xml parsing issue, in the server.xml somebody left the useful comment:
>
> <!-- Note: XML Schema validationn will works with Xerces 2.0.1 or
> Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
> their use with Tomcat-->
>
> Because of that I assumed that the bundled xerces would be 2.1 - but I
> didn't check - unfortunately the tomcat docs only say "Tomcat 5.0 also
> makes Xerces 2 and the Commons Logging API (release 1.0.3)
> available to web applications."
>
> I'm a bit ashamed to ask, but is there any way of telling what version
> the jar file is, from the jar itself?
>
> The following recent mail on tomcat-dev explains the issue.
>
> http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg47251.html
>
> I'll see whether I can find the old version of xerces and install that,
> which should make the issue disappear. Or crimson.
>
>
> Adam
>
> On 10/03/2003 09:30 AM Hans Bergsten wrote:
> >> Re: the tomcat start-up exceptions
> >>
> >> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
> >> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
> >> starting with element 'jsp-version'. The content must match
> >>
> >>
>
'((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
> >>
> >>
> >> This is some sort of xml parsing problem, I've narrowed it down to the
> >> following declaration in tomcat's server.xml:
> >>
> >> <Host name="localhost"
> >> debug="0"
> >> appBase="webapps"
> >> unpackWARs="true"
> >> autoDeploy="true"
> >> xmlValidation="true"
> >> xmlNamespaceAware="true">
> >>
> >> When I remove the xmlValidation & xmlNamespaceAware attributes, the
> >> startup exceptions disappear. I put these attributes in as true so
> >> that tomcat would catch any errors I make in the server.xml. Obviously
> >> I can live without it or even live with the errors, but it's not happy.
> >>
> >> And the exceptions only occur on startup if I delete the tld caches.
> >>
> >> It seems this is an issue with jakarta-taglibs and tomcat, rather than
> >> with my configuration. Is that so?
> >
> >
> > I've seen some messages on the Tomcat Developers list about problems
> > with XML Schema validation due to bugs in the bundled version of Xerces.
> > If you absolutely need the validation, you may want to try to replace it
> > with a different JAXP compliant XML parser that handles XML Schema
> > validation.
> >
> > Hans
>
> --
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Thanks Hans, Yann,
re xml parsing issue, in the server.xml somebody left the useful comment:
<!-- Note: XML Schema validationn will works with Xerces 2.0.1 or
Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
their use with Tomcat-->
Because of that I assumed that the bundled xerces would be 2.1 - but I
didn't check - unfortunately the tomcat docs only say "Tomcat 5.0 also
makes Xerces 2 and the Commons Logging API (release 1.0.3)
available to web applications."
I'm a bit ashamed to ask, but is there any way of telling what version
the jar file is, from the jar itself?
The following recent mail on tomcat-dev explains the issue.
http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg47251.html
I'll see whether I can find the old version of xerces and install that,
which should make the issue disappear. Or crimson.
Adam
On 10/03/2003 09:30 AM Hans Bergsten wrote:
>> Re: the tomcat start-up exceptions
>>
>> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
>> starting with element 'jsp-version'. The content must match
>>
>> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>>
>>
>> This is some sort of xml parsing problem, I've narrowed it down to the
>> following declaration in tomcat's server.xml:
>>
>> <Host name="localhost"
>> debug="0"
>> appBase="webapps"
>> unpackWARs="true"
>> autoDeploy="true"
>> xmlValidation="true"
>> xmlNamespaceAware="true">
>>
>> When I remove the xmlValidation & xmlNamespaceAware attributes, the
>> startup exceptions disappear. I put these attributes in as true so
>> that tomcat would catch any errors I make in the server.xml. Obviously
>> I can live without it or even live with the errors, but it's not happy.
>>
>> And the exceptions only occur on startup if I delete the tld caches.
>>
>> It seems this is an issue with jakarta-taglibs and tomcat, rather than
>> with my configuration. Is that so?
>
>
> I've seen some messages on the Tomcat Developers list about problems
> with XML Schema validation due to bugs in the bundled version of Xerces.
> If you absolutely need the validation, you may want to try to replace it
> with a different JAXP compliant XML parser that handles XML Schema
> validation.
>
> Hans
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Adam Hardy wrote:
> I do have a reason for upgrading - I'm not just a masochist ;) - I need
> the character encoding features of the servlet 2.4 spec. Thanks for the
> explanation of that error on the struts taglibs. Makes sense. It was the
> same error as I was getting from the old jstl 1.0.4 taglibs, which also
> makes sense.
>
> So essentially the Struts taglibs need new TLDs for JSP 2.0. It sounds
> like the code doesn't have to change, is that so?
Someone who knows more about Struts than I do may correct me on this,
but I believe you can simply switch to the regular, non-EL version of
the Struts libraries.
The main point is that an EL version of a tag library declares all
attributes as String attributes that don't take "request-time attribute
values" (rtexprvalues), and evaluates all EL strings itself. In JSP 2.0,
both EL and Java expressions can be used as rtexprvalues, and the
container takes care of the evaluation of both types. The tag library
must therefore declare the attributes as rtexprvalues, and whatever the
native type of the attribute is instead of String. This typically means
that a version of the library that's ignorant of EL expressions works
fine with JSP 2.0.
> I've got the JSTL 1.1
> spec, I'll check it out.
>
> Re: the tomcat start-up exceptions
>
> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
> starting with element 'jsp-version'. The content must match
>
> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
>
> This is some sort of xml parsing problem, I've narrowed it down to the
> following declaration in tomcat's server.xml:
>
> <Host name="localhost"
> debug="0"
> appBase="webapps"
> unpackWARs="true"
> autoDeploy="true"
> xmlValidation="true"
> xmlNamespaceAware="true">
>
> When I remove the xmlValidation & xmlNamespaceAware attributes, the
> startup exceptions disappear. I put these attributes in as true so that
> tomcat would catch any errors I make in the server.xml. Obviously I can
> live without it or even live with the errors, but it's not happy.
>
> And the exceptions only occur on startup if I delete the tld caches.
>
> It seems this is an issue with jakarta-taglibs and tomcat, rather than
> with my configuration. Is that so?
I've seen some messages on the Tomcat Developers list about problems
with XML Schema validation due to bugs in the bundled version of Xerces.
If you absolutely need the validation, you may want to try to replace it
with a different JAXP compliant XML parser that handles XML Schema
validation.
Hans
> On 10/02/2003 11:59 PM Hans Bergsten wrote:
>
>> To make a long story short, if you primarily want to upgrade to TC 5 and
>> have no interest in using the new JSP 2.0 features, continue to use the
>> Servlet 2.3 deployment descriptor (DD) instead of changing it to a 2.4
>> DD. A JSP 2.0 container (like TC 5) treats an app with a 2.3 DD just as
>> a JSP 1.2 container, so the app should just work as-is if you do this.
>>
>> If you change to a 2.4 DD, you're telling the JSP container to handle
>> all EL expressions (instead of letting the JSTL (Or custom library, like
>> Struts) tag handlers handle them). For this to work, you need to change
>> all tag libraries to JSP 2.0 versions (where the attributes are marked
>> as accepting "request-time attribute values"). JSTL 1.1 defines new
>> versions of all libraries for this purpose (with new URIs). I'm not sure
>> if there are JSP 2.0 versions of the Struts EL libraries, though.
>>
>> For more on this, see the JSTL 1.1 spec.
>>
>> Hans
--
Hans Bergsten <ha...@gefionsoftware.com>
Gefion Software <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at <http://TheJSPBook.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Yann C�bron <ya...@yahoo.de>.
<snip/>
> This is some sort of xml parsing problem, I've narrowed it down to the
> following declaration in tomcat's server.xml:
>
> <Host name="localhost"
> debug="0"
> appBase="webapps"
> unpackWARs="true"
> autoDeploy="true"
> xmlValidation="true"
> xmlNamespaceAware="true">
>
> When I remove the xmlValidation & xmlNamespaceAware attributes, the
> startup exceptions disappear. I put these attributes in as true so that
> tomcat would catch any errors I make in the server.xml. Obviously I can
> live without it or even live with the errors, but it's not happy.
>
> And the exceptions only occur on startup if I delete the tld caches.
>
> It seems this is an issue with jakarta-taglibs and tomcat, rather than
> with my configuration. Is that so?
If I remember right, current TC5 versions have some problems w/ parsing XML
defined with schemas (no probs with dtd's) due to bugs in Xerces, do a
search on the Tomcat mailing lists. So you should disable validation
completely, as long as you know your deployment descriptors are correct.
All taglibs including Struts' work fine for me w/ TC5.
HTH,
Yann
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I do have a reason for upgrading - I'm not just a masochist ;) - I need
the character encoding features of the servlet 2.4 spec. Thanks for the
explanation of that error on the struts taglibs. Makes sense. It was the
same error as I was getting from the old jstl 1.0.4 taglibs, which also
makes sense.
So essentially the Struts taglibs need new TLDs for JSP 2.0. It sounds
like the code doesn't have to change, is that so? I've got the JSTL 1.1
spec, I'll check it out.
Re: the tomcat start-up exceptions
preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
starting with element 'jsp-version'. The content must match
'((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
This is some sort of xml parsing problem, I've narrowed it down to the
following declaration in tomcat's server.xml:
<Host name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="true"
xmlNamespaceAware="true">
When I remove the xmlValidation & xmlNamespaceAware attributes, the
startup exceptions disappear. I put these attributes in as true so that
tomcat would catch any errors I make in the server.xml. Obviously I can
live without it or even live with the errors, but it's not happy.
And the exceptions only occur on startup if I delete the tld caches.
It seems this is an issue with jakarta-taglibs and tomcat, rather than
with my configuration. Is that so?
Thanks
Adam
On 10/02/2003 11:59 PM Hans Bergsten wrote:
> To make a long story short, if you primarily want to upgrade to TC 5 and
> have no interest in using the new JSP 2.0 features, continue to use the
> Servlet 2.3 deployment descriptor (DD) instead of changing it to a 2.4
> DD. A JSP 2.0 container (like TC 5) treats an app with a 2.3 DD just as
> a JSP 1.2 container, so the app should just work as-is if you do this.
>
> If you change to a 2.4 DD, you're telling the JSP container to handle
> all EL expressions (instead of letting the JSTL (Or custom library, like
> Struts) tag handlers handle them). For this to work, you need to change
> all tag libraries to JSP 2.0 versions (where the attributes are marked
> as accepting "request-time attribute values"). JSTL 1.1 defines new
> versions of all libraries for this purpose (with new URIs). I'm not sure
> if there are JSP 2.0 versions of the Struts EL libraries, though.
>
> For more on this, see the JSTL 1.1 spec.
>
> Hans
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Adam Hardy wrote:
> Sorry, I'm struggling with this a bit. There's alot going on in tomcat5
> that I'm not sure about yet.
>
> It's caching the tld files which I didn't realise, so I had to add a bit
> to my deploy script.
>
> It seems like I'm getting a different error with every change I make.
>
> Basically I get the error below when I start tomcat and it pulls out all
> the TLDs.
>
> I am also getting:
> JasperException: /WEB-INF/general/pageheader.jsp(9,2) According to TLD
> or attribute directive in tag file, attribute property does not accept
> any expressions
>
> whenever I call the page with the struts html taglib that was
> specifically modified to process EL.
>
> Oh well. I shall struggle on and see what else comes of it. Any idea /
> help would be v.v.welcome.
To make a long story short, if you primarily want to upgrade to TC 5 and
have no interest in using the new JSP 2.0 features, continue to use the
Servlet 2.3 deployment descriptor (DD) instead of changing it to a 2.4
DD. A JSP 2.0 container (like TC 5) treats an app with a 2.3 DD just as
a JSP 1.2 container, so the app should just work as-is if you do this.
If you change to a 2.4 DD, you're telling the JSP container to handle
all EL expressions (instead of letting the JSTL (Or custom library, like
Struts) tag handlers handle them). For this to work, you need to change
all tag libraries to JSP 2.0 versions (where the attributes are marked
as accepting "request-time attribute values"). JSTL 1.1 defines new
versions of all libraries for this purpose (with new URIs). I'm not sure
if there are JSP 2.0 versions of the Struts EL libraries, though.
For more on this, see the JSTL 1.1 spec.
Hans
> On 10/02/2003 09:06 PM Kris Schneider wrote:
>
>> I really haven't played around with TC 5 or JSTL 1.1, but a quick
>> smoke test
>> passed just fine. I used the following JSP:
>>
>> <%@ page contentType="text/plain" %>
>> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
>> <c:set var="key" value="msg"/>
>> <fmt:bundle basename="messages">
>> Message: <fmt:message key="${key}"/>
>> </fmt:bundle>
>>
>> With the following resource bundle:
>>
>> msg=Hello, world!
>>
>> And got the expected output. Can you post relevent snippets from your
>> web.xml
>> and JSP file?
>>
>> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>>
>>
>>> I had wanted to do that but had stupidly not found the tarball. I got
>>> it now but after deploying them and changing the taglib declares to
>>> what you gave, tomcat chokes on the TLD validation. Do you recognise
>>> the problem?
>>>
>>> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
>>> content starting with element 'jsp-version'. The content must match
>>
>>
>> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>>
>>
>>>
>>>
>>> On 10/02/2003 07:32 PM Kris Schneider wrote:
>>>
>>>> You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
>>>> container. Note that the URI will be different:
>>>>
>>>> JSTL 1.0:
>>>> http://java.sun.com/jstl/fmt
>>>>
>>>> JSTL 1.1:
>>>> http://java.sun.com/jsp/jstl/fmt
>>>>
>>>> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>>>>
>>>>
>>>>
>>>>> I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
>>>>> descriptor I replaced the old web-app_2_3.dtd reference with
>>>>> web-app_2_4.xsd . Now I'm having problems.
>>>>>
>>>>> What was working fine:
>>>>>
>>>>> <fmt:message key="${var4SomeKey}"/>
>>>>>
>>>>> is now causing the JasperException:
>>>>>
>>>>> According to TLD or attribute directive in tag file, attribute
>>>>> property does not accept any expressions.
>>>>>
>>>>> I don't know why it should state that since the taglib was handling
>>>>> the EL expressions before perfectly.
>>>>>
>>>>> In my web.xml I do not have any taglib tld location mappings and
>>>>> I'm wondering if I need them now to solve my problem.
>>>>>
>>>>> I can't find any reference to this issue in the archives or google
>>>>> or bugzilla, but I'm sure it must be a well known issue.
>>>>>
>>>>> Does anybody know what's up with my set-up?
>>>>>
>>>>> Adam
>>>>>
>>>>> --
>>>>> struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>>>> Linux 2.4.20 RH9
>>>>
>>>>
>>>>
>>> --
>>> struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>> Linux 2.4.20 RH9
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>>
>>
>>
>>
>
--
Hans Bergsten <ha...@gefionsoftware.com>
Gefion Software <http://www.gefionsoftware.com/>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at <http://TheJSPBook.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Sorry, I'm struggling with this a bit. There's alot going on in tomcat5
that I'm not sure about yet.
It's caching the tld files which I didn't realise, so I had to add a bit
to my deploy script.
It seems like I'm getting a different error with every change I make.
Basically I get the error below when I start tomcat and it pulls out all
the TLDs.
I am also getting:
JasperException: /WEB-INF/general/pageheader.jsp(9,2) According to TLD
or attribute directive in tag file, attribute property does not accept
any expressions
whenever I call the page with the struts html taglib that was
specifically modified to process EL.
Oh well. I shall struggle on and see what else comes of it. Any idea /
help would be v.v.welcome.
Adam
On 10/02/2003 09:06 PM Kris Schneider wrote:
> I really haven't played around with TC 5 or JSTL 1.1, but a quick smoke test
> passed just fine. I used the following JSP:
>
> <%@ page contentType="text/plain" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
> <c:set var="key" value="msg"/>
> <fmt:bundle basename="messages">
> Message: <fmt:message key="${key}"/>
> </fmt:bundle>
>
> With the following resource bundle:
>
> msg=Hello, world!
>
> And got the expected output. Can you post relevent snippets from your web.xml
> and JSP file?
>
> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>
>
>>I had wanted to do that but had stupidly not found the tarball. I got it
>>now but after deploying them and changing the taglib declares to what
>>you gave, tomcat chokes on the TLD validation. Do you recognise the
>>problem?
>>
>>preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
>>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
>>starting with element 'jsp-version'. The content must match
>>
>
> '((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
>>
>>
>>On 10/02/2003 07:32 PM Kris Schneider wrote:
>>
>>>You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
>>>container. Note that the URI will be different:
>>>
>>>JSTL 1.0:
>>>http://java.sun.com/jstl/fmt
>>>
>>>JSTL 1.1:
>>>http://java.sun.com/jsp/jstl/fmt
>>>
>>>Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>>>
>>>
>>>
>>>>I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
>>>>descriptor I replaced the old web-app_2_3.dtd reference with
>>>>web-app_2_4.xsd . Now I'm having problems.
>>>>
>>>>What was working fine:
>>>>
>>>><fmt:message key="${var4SomeKey}"/>
>>>>
>>>>is now causing the JasperException:
>>>>
>>>>According to TLD or attribute directive in tag file, attribute property
>>>>does not accept any expressions.
>>>>
>>>>I don't know why it should state that since the taglib was handling the
>>>>EL expressions before perfectly.
>>>>
>>>>In my web.xml I do not have any taglib tld location mappings and I'm
>>>>wondering if I need them now to solve my problem.
>>>>
>>>>I can't find any reference to this issue in the archives or google or
>>>>bugzilla, but I'm sure it must be a well known issue.
>>>>
>>>>Does anybody know what's up with my set-up?
>>>>
>>>>Adam
>>>>
>>>>--
>>>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>>>Linux 2.4.20 RH9
>>>
>>>
>>--
>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>Linux 2.4.20 RH9
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>>
>
>
>
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Kris Schneider <kr...@dotech.com>.
I really haven't played around with TC 5 or JSTL 1.1, but a quick smoke test
passed just fine. I used the following JSP:
<%@ page contentType="text/plain" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="key" value="msg"/>
<fmt:bundle basename="messages">
Message: <fmt:message key="${key}"/>
</fmt:bundle>
With the following resource bundle:
msg=Hello, world!
And got the expected output. Can you post relevent snippets from your web.xml
and JSP file?
Quoting Adam Hardy <ah...@cyberspaceroad.com>:
> I had wanted to do that but had stupidly not found the tarball. I got it
> now but after deploying them and changing the taglib declares to what
> you gave, tomcat chokes on the TLD validation. Do you recognise the
> problem?
>
> preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
> org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
> starting with element 'jsp-version'. The content must match
>
'((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
>
>
>
> On 10/02/2003 07:32 PM Kris Schneider wrote:
> > You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
> > container. Note that the URI will be different:
> >
> > JSTL 1.0:
> > http://java.sun.com/jstl/fmt
> >
> > JSTL 1.1:
> > http://java.sun.com/jsp/jstl/fmt
> >
> > Quoting Adam Hardy <ah...@cyberspaceroad.com>:
> >
> >
> >>I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
> >>descriptor I replaced the old web-app_2_3.dtd reference with
> >>web-app_2_4.xsd . Now I'm having problems.
> >>
> >>What was working fine:
> >>
> >><fmt:message key="${var4SomeKey}"/>
> >>
> >>is now causing the JasperException:
> >>
> >>According to TLD or attribute directive in tag file, attribute property
> >>does not accept any expressions.
> >>
> >>I don't know why it should state that since the taglib was handling the
> >>EL expressions before perfectly.
> >>
> >>In my web.xml I do not have any taglib tld location mappings and I'm
> >>wondering if I need them now to solve my problem.
> >>
> >>I can't find any reference to this issue in the archives or google or
> >>bugzilla, but I'm sure it must be a well known issue.
> >>
> >>Does anybody know what's up with my set-up?
> >>
> >>Adam
> >>
> >>--
> >>struts 1.1 + tomcat 5.0.12 + java 1.4.2
> >>Linux 2.4.20 RH9
> >
> >
>
> --
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
I had wanted to do that but had stupidly not found the tarball. I got it
now but after deploying them and changing the taglib declares to what
you gave, tomcat chokes on the TLD validation. Do you recognise the
problem?
preRegister with Catalina:type=Logger,path=/blacksail,host=localhost
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
starting with element 'jsp-version'. The content must match
'((("http://java.sun.com/xml/ns/j2ee":description){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":tlib-version),("http://java.sun.com/xml/ns/j2ee":short-name),("http://java.sun.com/xml/ns/j2ee":uri){0-1},("http://java.sun.com/xml/ns/j2ee":validator){0-1},("http://java.sun.com/xml/ns/j2ee":listener){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":tag-file){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":function){0-UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":taglib-extension){0-UNBOUNDED})'.
On 10/02/2003 07:32 PM Kris Schneider wrote:
> You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
> container. Note that the URI will be different:
>
> JSTL 1.0:
> http://java.sun.com/jstl/fmt
>
> JSTL 1.1:
> http://java.sun.com/jsp/jstl/fmt
>
> Quoting Adam Hardy <ah...@cyberspaceroad.com>:
>
>
>>I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
>>descriptor I replaced the old web-app_2_3.dtd reference with
>>web-app_2_4.xsd . Now I'm having problems.
>>
>>What was working fine:
>>
>><fmt:message key="${var4SomeKey}"/>
>>
>>is now causing the JasperException:
>>
>>According to TLD or attribute directive in tag file, attribute property
>>does not accept any expressions.
>>
>>I don't know why it should state that since the taglib was handling the
>>EL expressions before perfectly.
>>
>>In my web.xml I do not have any taglib tld location mappings and I'm
>>wondering if I need them now to solve my problem.
>>
>>I can't find any reference to this issue in the archives or google or
>>bugzilla, but I'm sure it must be a well known issue.
>>
>>Does anybody know what's up with my set-up?
>>
>>Adam
>>
>>--
>>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>>Linux 2.4.20 RH9
>
>
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: fmt taglib validation fails with web-app_2_4.xsd
Posted by Kris Schneider <kr...@dotech.com>.
You should probably try using Standard 1.1.0-B1 since TC 5 is a JSP 2.0
container. Note that the URI will be different:
JSTL 1.0:
http://java.sun.com/jstl/fmt
JSTL 1.1:
http://java.sun.com/jsp/jstl/fmt
Quoting Adam Hardy <ah...@cyberspaceroad.com>:
> I upgraded to tomcat 5 and taglib standard 1.0.4. In my deployment
> descriptor I replaced the old web-app_2_3.dtd reference with
> web-app_2_4.xsd . Now I'm having problems.
>
> What was working fine:
>
> <fmt:message key="${var4SomeKey}"/>
>
> is now causing the JasperException:
>
> According to TLD or attribute directive in tag file, attribute property
> does not accept any expressions.
>
> I don't know why it should state that since the taglib was handling the
> EL expressions before perfectly.
>
> In my web.xml I do not have any taglib tld location mappings and I'm
> wondering if I need them now to solve my problem.
>
> I can't find any reference to this issue in the archives or google or
> bugzilla, but I'm sure it must be a well known issue.
>
> Does anybody know what's up with my set-up?
>
> Adam
>
> --
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org