You should not have development tools in the deployment environment.
Both environments should have similar features, like operating system, etc.
So, about your question, you would code in development environment, generate the war file and deploy the war file in your web server (eg:
tomcat) in your deployment environment.