Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SchemaLocation Error In Eclipse IDE

 
amarshi mohanty
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using the below example as given in HFSJ :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<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="1.0">
<tlib-version>1.2</tlib-version>
<short-name>RandomTags</short-name>

<uri>randomThings</uri>

<tag>
<description>random advice</description>
<name>advice</name>
<tag-class>foo.AdvisorTagHandler</tag-class>
<body-content>empty</body-content>
<attribute>
<name>user</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

The code in block says:
-SchemaLocation:schemaLovatin value="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" must have even number of URI's.

What can be the problem?
 
chandan kumar mitwaa
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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="1.0">


Use version="2.0" instead.

Hope that it works.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And use an even number of URIs--you have only one.

Every example I've seen looks more like this:
 
amarshi mohanty
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<?xml version="1.0" encoding="ISO-8859-1" ?>
<taglib>
....
....
</taglib>

worked .
Thankx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic