Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From webapp sludge to a working Eclipse project deployed to local Tomcat

How to eclipsify a bad webapp

Assumptions

  • Tomcat 7 is available and imported into eclipse
  • Eclipse Juno, EE flavour.

Any mismatch between these assumptions and reality may result in failures and face-palm.

Steps

  1. Right click on project > Properties (at the bottom)

  2. Configure the properties thusly:

Project Facets > Convert to Faceted Form...

  • tick Dynamic Web Module > Apply

Java build path

  • Libraries tab
    • Add Library...
      • JRE System Library > OK
    • Add JARs...
      • [project name] > WebContent > lib
      • select all the .jar files > OK
  • Source tab
    • Add Folder...
    • tick src
    • Choose yes when asked if you want to remove the project dir as source

Javascript

  • Include path > click on folder > double click on Excluded (None)
  • Exclusion Pattern > Add...
    • **/*.min.js
    • OK > Finish > OK
  1. If all the red-x's be gone, then we can deploy it to tomcat:

Servers

  • Tomcat > right click
    • Add and Remove...
    • Add the available project
  • Hit the green play button to restart tomcat
  • open up http://localhost:8080/[projectname] in a browser
  • See the wonder.

DONE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.