In this blog I'll show how to host a Java Servlet in Apache Tomcat 7.0, build a basic android APP and then establishing communication between the two. I have come up with a basic android app "Double Me" for this tutorial, which just sends an integer to server and the server doubles it and returns it back to the android app.
Here is an easy and quick way to encrypt and decrypt data. I needed it for one of my project where I building an Anonymous Voting System on android. The technique shown here could be used else where on your Java projects as well.