Eclipse Tomcat Server

 

Go to server tab and double click on the Tomcat server, the configuration file for Tomcat will open and look like this: 2. Mark down the Port Number Tomcat is running on. Defining a Server in Eclipse Before configuring Tomcat in Eclipse, we'll have to install it first. Now, let's start by invoking the New Server wizard in Eclipse using File New Other: Clicking on Next will take us to the window where we can select the version of Tomcat. 1.5 Installation of Apache Tomcat in Eclipse Development Environment. Eclipse is a very powerful development environment for Java. For Web Development project you need Web Server. Apache Tomcat is the best production ready web container. How to Install Eclipse for Java. These installation steps are written for windows user.

Greenhorn
posted 9 years ago
  • Optional 'thank-you' note:
I have a peculiar problem working with Eclipse 3.6 and TomCat 7.
I'm developing a webapplication in JSF and been doing that for a while now.
But now, all of a sudden, when i choose my project and goes
[right click]-->'Run As' --> 'Run on Server'
...the newly edited xhtml data is showing old stuff on the web page.
I've tried to:
* Reinstall Eclipse
* Reinstall TomCat
* 'Clean' choice on 'Servers' in Eclipse.
* 'Clean TomCat work directory' on 'Servers' in Eclipse.
Nothing works.
I assume that Eclipse has som cache stored somewhere, that it doesn't matter what I'll do.
Anyone has any idea?

It's better to be approximately right than exactly wrong.

Config
Greenhorn
posted 9 years ago
  • Optional 'thank-you' note:
Ok...
This is nuts!
I totally evaporated/killed/deleted the old project (including all files).
I started a new project with the same name as the one deleted.
I have a new start page which says something like 'hello'.
And guess what!!!
The same old cached data from the old deleted project is still presented in my browser!!!
I am clueless.
Now... someone here has any idea??

It's better to be approximately right than exactly wrong.

Greenhorn
posted 9 years agoEclipse tomcat server webapps location
  • Optional 'thank-you' note:
Hi!
One thing I can think of is if, after re-installing Eclipse, you kept using the same workspace. By default, when adding a new tomcat server to Eclipse, it's configured to use the workspace's metadata folder to deploy projects so it doesn't affect your real tomcat installation. The folder it deploys to should look like: <your workspace folder>.metadata.pluginsorg.eclipse.wst.server.coretmpX.
When you cleaned the tomcat work folders, maybe it couldn't clean that workspace folder for some reason.
In Eclipse, you can change that deploy folder to something else.
- Remove all the projects assigned to tomcat or you won't be able to change the setting (right-click the server / Add and Remove ...).
- Do a Clean (right-click the server / Clean ... ).
- Double-click the server to open the config page.
- In the server location section, select 'use Custom location' and specify a folder of your choice as the server path. You can leave 'wtpwebapps' as the deploy folder. I usually set something like 'C:virtualTomcat' as the server path.
- Save the file, do another clean and add your projects back to the server (right-click the server / Add and Remove ...).
The advantage of setting a folder as 'c:virtualTomcat' is that it's easily accessible in windows explorer so you can see exactly what is being deployed to the server or even clean it manually. When you see cached pages, go check out the folder to see what got deployed and when you clean the work folders, make sure everything is cleaned properly.
Hope this helps!
Fred.
Greenhorn
posted 9 years ago
  • Optional 'thank-you' note:
Thanks Fred for your exquisite answer.
I've tried a few of those and will embrace the TomCat virtual folder idea.
Eventhough I tried a lot of your ideas I think that the solution that finally worked for me was to clean the 'temporary internet files' folder.
Obviously I need to implement the 'no-cache' in the response.

It's better to be approximately right than exactly wrong.

On this page, you will get the complete solution to how to resolve Tomcat Server at localhost failed to start. Most of the time Java Web Developer facing the problem that their Tomcat Server failed to start at the localhost in Eclipse IDE.

When you are working on a project and all is going in the right direction and you are ready to deploy your project and suddenly you get the message your Tomcat server is failed to start at the localhost and you have no idea what’s going wrong, it’s really irritating. Now no need to worry we have the complete solution.

How to Solve It?

Basically, there are three ways that I have tried personally and all is working fine.

Solution 1:

1-Go to your workspace directory » .metadata » .plugins » org.eclipse.core.resources folder.

2- Delete the .snap file.

3- Restart your Eclipse IDE.

Solution 2:

1- Open the Servers tab from Windows » Show View » Servers menu.

Add

2- Right click on the server and delete it

3-Create a new server by going New » Server on server tab.

4-Click on Configure runtime environments link.

5-Select the Apache Tomcat Server and remove it. This will remove the Tomcat server configuration.

6-Click on OK and exit the screen above now.

Eclipse Tomcat Server

7-From the screen below, choose Apache Tomcat server and click on Next button:

8-Browse to Tomcat Installation Directory.

9-Click on Next and choose which project you would like to deploy:

10-Click on Finish after adding your project.

Eclipse Tomcat Server Settings

11-Now launch your Server.

Eclipse Tomcat Server Installation Directory

Solution 3:

1-Go to your workspace directory » .metadata » .plugins » org.eclipse.wst.server.core folder.

2- Delete the tmp folder.

3- Restart your Eclipse IDE

Note: If the problem still persists, you can terminate the PORT in Windows by the following command:
1: netstat -ano findstr :<YOUR_PORT_NUMBER>

Eclipse Tomcat Config

2: taskkill /PID <PID_OF_YOUR_PORT> /F

Eclipse

Eclipse Tomcat Server Configuration

To ensure that whether it is terminated or not run the first command again. You will get an empty line if the process is successfully ended.

Similar Posts

Eclipse Tomcat Server Docbase

About the Author

Eclipse Tomcat Server Failed To Start

Atul Rai
I love sharing my experiments and ideas with everyone by writing articles on the latest technological trends. Read all published posts by Atul Rai.
Please enable JavaScript to view the comments powered by Disqus.