This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In order to call a method outside the application, you have to provide one of the following:
- RMI server; or
- Sockets server.
In every case, you should implement code in your web application to allow other proccess to comunicate with it and access its methods.
The closer to what you need is RMI, that literally allows you to invoke remote methods, but it will need that both sides to maintain an Interface of which methods may be called.