Hey everyone,
By a series of events I've ended up working on a big site made out of
JSP and the like. I'm pretty happy coding
java, I've done a few years at university, but obviously putting it all in a web context is a bit of a learning curve... So treat me as a newbie.
This question may seem ridiculously simple to some but I've searched all over and tried endless tests and bits of code with no joy. The site is JSP pages with some servelets and classes. Now I have some classes that are particularly useful that play with files. These originally had the path to the files hard coded in, strangely enough hardcoded paths do not work anymore after a server change (yes I did change the path to reflect the new server, still no luck

). But to be honest, why should we have hardcoded when we can have relative?
Now the classes that play with the files are not
servlets are they? They're only servlets if you define them as that? (is that right?) Now after endless
testing I managed to get a relative path working...
As you can probably guess though this is inside the WEB-INF/classes folder. I've tried everything to get out of the classes folder but all attempts have resulted in a null value being returned. Other methods of getting a relative path have failed (using getContext() couldn't be resolved due to not being able to extend some of the classes because they're already extended by other things :S). So feel free to give other suggestions.
Sorry if these questions are too simple, as I'm new to the language I maybe missing some vital bits of info!
Thanks for your time!