I am very bothered by the way a typical Java web site development works. Java website developments, through JSP (Java Server Pages) is largely supported by IDEs such as Eclipse and Netbeans. It is not in any way the easiest to utilize. And at worst these huge IDEs are too kludgy for my liking.
Take the current Java project that I am working on, it’s a website that has sign in and numerous data presentation tools. Everything .java compiles into a .class file and the remaining JSP files are deployed into this WAR file through Apache Maven into tomcat. With an IDE, everything seems seamless. You don’t even need to know how it works. Just by magic. You configure the servers and paths and it just works.
You could of course decide to dump WAR files again and again to the server paths and watch it automatically deploy after you do a manual restart of tomcat. Unfortunately that’s too unproductive, starting a tomcat server takes 2 seconds for me, and starting the application takes 10 seconds in debug mode. That’s unacceptably slow because it all adds up.
So, IDEs make you more productive by deploying the files in the server for you and compiles the .java files into .class and .jar files or something like that. Essentially you only need to restart the tomcat7 server if you updated the controller. Updates to the views do not require compilation. However — there’s always a caveat — you have the .jsp file edited on the server path rather than your workspace.
Now, under the hood of the IDE, each time you save a .jsp file, what you are essentially doing is:
- Saving the file in your workspace.
- Copying the file from your workspace to the server path.
Your workspace can be managed by revisioning tools such as SVN or git and the remnants don’t get copied over to the server space. It’s pretty well thought except that you really need a proper IDE set up to save you all the repetitive work.
So the reason why I am writing this is because I wanted to use Sublime Text and Sublime Text doesn’t have Java and tomcat integration features at all. At first this seemed surprising, after all Java is so common. Upon discovering what Eclipse and Netbeans actually does, I can’t help but to feel that there is a certain amount of over-engineering.
Forgive me if that’s not the way Java IDEs work. I’m uncovering new things every day still, so please correct my mistakes, I want to understand the platform better too.