I think I misread your code. The XSD appears to be inside your application itself. That means that you can try using ServletContext.getResource. That also returns a URL, but one that does not use HTTP but instead simply looks directly inside your application.
Hi Rob, Thanks for the reply. In fact, this has been the working code since long, and it still works on other servers. So, we would not want to change the code and instead trying to find the reason why the exception is happening during validation. If we know the reason, we can fix that to make this same code work again.
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book