Common eclipse tomcat start up problem

You may have experience using eclipse develop spring mvc project and right click run as server but after everything is loaded you get nothing run on browser.

 

The following step is what you need to check.

  • Java build path
  • Web deployment assembly

Java Build Path

  • Check is there any unbound server library, if yes removed it and add another.

Screen Shot 2015-12-16 at 7.01.11 PM

  • Check is the maven dependency exist in the Java Build Path Library tab, if not exist, right click project, maven update project ..
    Screen Shot 2015-12-16 at 7.05.07 PM

 

  • Check is the Web App Libraries exist, if no add from Add Library… button

 

Web Deployment Assembly

Eclipse tomcat started without error but nothing deployed and loaded.

  1. Right click project property > Deployment Assembly
  2. Check the line /src/main/webapp, if missing perform the next.
  3. Click add.. button > Select Folder >
  4. Browse to src > main > webapp and click finish button.
  5. Click Apply and OK close the window

 

eclipse-disemblywindow

Started with the ClassNotFoundException:

  • Right click project > Deployment Assembly
  • Click Add button > Java Build Path Entries > Maven Dependencies
  • Click Apply > OK > Close the window

Screen Shot 2015-12-16 at 7.08.00 PM

 

project not able run as server

  1. Right click project property
  2. Select Project Facets
  3. Select Dynamic Web Module version from the drop down. (check your web.xml version)
  4. Select Java version from the drop down. (depends on what version you’re using)
  5. Checked the box, Dynamic Web Module
  6. Checked the box, Java and Javascripts
  7. On the right hand side runtimes button, checked the server you’re using.
  8. Click Apply, OK close the window.
  9. Delete the WebContent folder that generated by eclipse.

Screen Shot 2015-12-16 at 7.25.06 PM
.

 

Started but nothing loaded

Now observe your console and find out the -Dwtp.deploy and copy the full path,

eclipsetomcatpath

Open from the command prompt

open /Users/mingch/Documents/workspace-freelance/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps

Check the project is there any .class path get copy over. If no class file is copy, try the following solution.

1. From the project explorer, browse the target folder.

2. Check which folder contains full build. (include .class file and others web files)

3. Let’s say the m2e-wtp is empty, and [myproject] is the correct build folder. (build from maven package)

4. From the Deployment Assembly.

5. Click Add button > Folder > Target > [myproject].

6. Reploy tomcat.

7. You’re require build project whenver changes by using mvn package command.

Common eclipse tomcat start up problem

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.