?
Solved

How do I set up a development/debugging environment for a Java/Spring/Tomcat application on my local machine?

Posted on 2013-12-19
1
Medium Priority
?
620 Views
Last Modified: 2014-11-12
Hi:

I'm at the beginning stages of immersing myself into a web based project. The project is hosted on AWS running Tomcat. It's a MySQL database on the backend. The middle tier is in JAVA and utilizes the Spring Framework. The front end is series of HTML5 based screens.

I come from a heavy Microsoft Environment, so I'm used to using MSVS to build and debug applications. I would like to set up a similar scenario where a build/development environment is hosted locally on my Windows 7 box. I'd like to be able to code, build and test the application locally before pushing WAR files out to Tomcat on our AWS site.

I have to think there's a way to do this. I'm not sure if it involves extensions to Eclipse.
I have to start by saying that I'm very new to Java and a totally new to the Spring framework. The ability to step through things in a debugging environment would certainly accelerate my learning curve.

Can someone point me to straightforward tutorial or at least point me in the right direction to get started on this. Once I figure this out, we will role this environment/solution out to new developers as they join our team.

Thanks in advance for your time,
JohnB
0
Comment
Question by:jxbma
1 Comment
 
LVL 36

Accepted Solution

by:
mccarl earned 2000 total points
ID: 39730808
I can see two options for you...

1) Use an all in one type of solution called "Spring Tool Suite" (http://spring.io/tools), this download also includes a modified version of Tomcat called "VMware vFabric tc server", the fact that this is different to a plain Tomcat installation (or to the installation on AWS) should not make much/any difference in real terms. STS is still based on Eclipse so it should be familar if you already have an idea of Eclipse but because this is a Spring-oriented product, there are also other little add-ons that can make Spring development a little easier.

2) If you don't want to move away from your current Eclipse environment, you can still just "install" a server environment into it for running an application on Tomcat. Firstly, just download and install to your development machine, a normal version of Tomcat that you want to use. Then, if you already have your web-app in Eclipse, you should just be able to right-click the project and then in the "Run As..." menu, there should be a "Run on Server" option. If you select that there should be an option to "Manually define a new server" near the top and then you should be able to follow the wizard, in order to point to the installation of Tomcat that you did above.



With either of the above approaches, you can start/stop this Tomcat instance from within Eclipse, as well as easily deploy your application to the server. Also, changes you make to your application get automatically published to the server so that when you have finished making a set of changes, just start the server up again to see the results. There are some possibilities of doing "hot-deployments", ie. change the code and the classes get modified while the server is still running, but I've never had too much luck with that, your mileage may vary though.


If anything above is not clear, just let us know!
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Or at least that’s the word according to a new blog from Tech Target on AWS’s new Managed Services (MS) offering. According to the blog, AWS is launching their AWS MS program to expedite the adoption of cloud by Fortune 1000 and Global 2000 companie…
The decision to migrate to the cloud is not a simple one—many factors, such a cost, ease of use, and ongoing maintenance come into play. The goal is always for cloud platforms to make storage and backups more seamless and effective. Here’s a look at…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month16 days, 18 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question