• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

tld file error

 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
What's gotten into you? Could it be this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic