• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tld file error

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Error saying

schemaLocation value must have even number of URI's

I have included the taglib directive along with prefix and uri attributes in Jsp page. And have coded the DiceRoller class too.
 
Stefan Evans
Bartender
Posts: 1755
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>schemaLocation value must have even number of URI's
Seems straightforward enough.

Your schemaLocation is currently:
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"

There is only one URI in that, and it says it needs two.
Try this one (copied and pasted from the JSTL c.tld)

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"

Cheers,
evnafets
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stefan Evans. But I already tried with that too. It is giving a new error saying

cvc-complex-type.2.4.a: Invalid content was found starting with element 'uri'. One of '{"http://jaav.sun.com/xml/ns/j2ee":short-name}' is expected

at the element

<uri>OutFunction</uri>

I am using Tomcat 5.5.9 and MyEclipse IDE 3.8.4 version. It supports EL
I tried even by including JSTL 1.1 libraries. But still no use.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you are missing the short name element.

Here is the skeleton for JSP 2.0 tld files that I use:



Of course, I replace the "whatever" instances with appropriate text.
[ October 06, 2005: Message edited by: Bear Bibeault ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault. Afterr including </short-name> element there was no error and got the desired result.

But I like to know whats the purpose of this element.
[ October 10, 2005: Message edited by: vishnu prakash ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The comments in the schema file say:

short-name a simple default short name that could be
used by a JSP authoring tool to create
names with a mnemonic value; for example,
the it may be used as the prefered prefix
value in taglib directives
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic