- This topic has 7 replies, 3 voices, and was last updated 19 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
acuretraMemberI have a problem with the following jsp-functions.tld file, which MyEclipse tags with an error.
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<taglib 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-jsptaglibrary_2_0.xsd”
version=”2.0″><tlib-version>1.0</tlib-version>
<short-name>t1</short-name>
<uri>http://transaxiom.com/axswhsweb/jsp-functions.tld</uri><function>
<name>formatNumber</name>
<function-class>
com.transaxiom.axsWHSweb.util.JspFunctions
</function-class><function-signature>
java.lang.String formatNumber(java.lang.Double, int, char, int)
</function-signature>
</function></taglib>
The error is on “version=”2.0*> line
Resin and Tomcat accepts this. The URI is in the known schemas to MyEclipse (from the prefrences).
MyEclipse is version 3.8.4.
If I cannot fix this, how can I make the error go away?
adcworksMemberTake a look at this thread.
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-6759.html
acuretraMemberThat thread says that the schema should be publicly accessible, but as far as I can tell it is (see the http etc). Regard elss it seems to me that the error hinted in the thread is that MyEclipse has problems with locally stored TLD’s.
This is a rather fresh reinstall of Eclipse+MyEclipse so I am pretty sure that I did not turn knobs.
Riyad KallaMemberadcworks, thank you for posting you are exactly right, this is the same issue.
acuretra,
If you look really closely at this line:xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd
You see the space between the URL and then the web-jsptaglibrary_2_0.xsd file? The first part of this line is some special XML magic, the 2nd part of this line is the ACTUAL XSD file that is used to validate your TLD file, in this case since you have given no path, the parser is looking in the same dir as your TLD file.
Guys check out this page:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags6.htmlNote how the schema location just gives the full public path to the XSD? That’s what you should do.
acuretraMemberI have tried fiddling with the schemaLocation and quite a bit of research indicated to me that the version I presented to you was correct. I recognize the authority of the link given, but still after copy/pasting the declaration in the link (and fixing the broken line), I get the same error.
My file now looks like
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<taglib 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-jsptaglibrary_2_0.xsd”
version=”2.0″><tlib-version>1.0</tlib-version>
<short-name>t1</short-name>
<uri>http://transaxiom.com/axswhsweb/jsp-functions.tld</uri><function>
<name>formatNumber</name>
<function-class>
com.transaxiom.axsWHSweb.util.JspFunctions
</function-class><function-signature>
java.lang.String formatNumber(java.lang.Double, int, char, int)
</function-signature>
</function></taglib>
Could I ask you to put it in a “jsp-functions.tld” file and see what happens?
Riyad KallaMemberArgg, I typed out the correct answer in my head, then didn’t post it. You need two URIs, this is cut-pasted directly from JSTL, this is what it should be:
<taglib 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 http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0">
Sorry for the confusion (note the URI first in the location field THEN the actual physical location of the file).
acuretraMemberAm I correct in assuming that this is a parser problem in MyEclipse?
Riyad KallaMemberNo, what I originally gave you was not a valid <taglib> entry, the 2nd one I gave you was valid and does work.
-
AuthorPosts