I think you should use servlet anyway.
The interaction will be via InputStream and OutputStream or
ObjectInputStream and ObjectOutputStream
From java application:
java.net.URL Url=new java.net.URL(S_URL);
java.net.URLConnection UrlConn=Url.openConnection();
java.io.OutputStream os=UrlConn.getOutputStream();
java.io.InputStream is=UrlConn.getInputStream();
From Servlet:
ObjectInputStream ois = new ObjectInputStream(request.getInputStream
());
ObjectOutputStream oos = new ObjectOutputStream
(response.getOutputStream());
You can get and post any data from and to servlet this way