I have a web project and I am writing a support Java project (will generate runnable jar out of it) which will do some post processing for my web project.
I need to access some classes and functions from web project (which I don't want to re-write in supporting project).
How can I import these classes into my supporting project as web application generate .war files not .jar?
If you are using eclipse IDE then you can add the required web project to your java project build setup. Just go to the properties of the java project and there go to "Java Build Path". In "Projects" tab add your web project. In "Source" tab add your web project src folder.
This way you can get the required classes from your web project in your java project.