Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SAX Exception in Servlet but not in Main Program  RSS feed

 
Kishen Singh Punjabi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a XML validator which works fine in a standalone main program but not in Servlet.

employee.xml


employeeSchema.xsd



My Java xml validator function



The function returns true when used in a standalone program. But when its used in servelet an exception SAX Exception: cvc-elt.1: Cannot find the declaration of element 'Employees'. is thrown.

Can you please help in understand what am i doing wrong here.

Thanks
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't see what you're passing as the value of the "xsdPath" parameter in the servlet, but no doubt it isn't pointing to the schema.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!