I have java two projects; one server project and one client project. In my network code between the two, I send requests. I don't want to type 0, 1, 2 for the different types of requests in the code, so I use constants instead. My problem is that I don't want to declare these constants in both projects, but rather at one place, since the constants are the same for both projects. Does anyone know a good solution for this?
Edit: The client project is an android application and the server is a servlet which should handle requests from clients.