I am working on a large application deployed on a Tomcat server. There is only one .jsp page and the entire user interface is executed using ext-js.
There are many .java classes. In one of these classes (which performs validation) I would like to add XML validation, and for this I need to access the .xsd file.
My problem is that I do not know how to find the path to my .xsd file correctly.
I will put the .xsd files in the repertoire next to css /, images / etc.
I know how this is in a shitty way: I call System.getProperty ("user.home"), and from there I find my webapp file, xsd / folder and .xsd.
But what is the βcleanβ way to do this?
Where should I find the path to my webapp (or my webapp resources) and how should I pass this information to the .java class that performs the check?
source
share