I need to communicate from my servlet to another independent process. Can I use the RequestDispatcher instead of opening a socket connection?

Alex Chaffee

No. The RequestDispatcher can only send a message to a servlet or JSP running inside the same servlet engine. You either have to open a socket, use native code, or use Runtime.exec() to spawn a process on the web server host.