Importing a Project into Eclipse

Several viewers of our Spring MVC course have reported problems in importing the project code that is supplied with the course.

I should really have shown the steps on the videos as it can be quite awkward in Eclipse. There are several different ways of achieving this, but these steps work best for me:

1) Your “Practicals and Code” download contains a “Starting Workspace” folder. Open this as a workspace in Eclipse.

2) Once Eclipse is opened, you will notice that the left hand panel (Package Explorer) is blank.

3) Select “File -> New Java Project”.

4) The workspace contains a folder called “MVC Project”. This is the project folder. On the New Project wizard, type in exactly the same name – “MVC Project”. On typing the final character, you will see that several options are grayed out, and a message is displayed indicating the a new project based on the existing source is going to be created.

5) Click finish, and a full project should now appear in the left hand pane.

10 thoughts on “Importing a Project into Eclipse”

  1. Hi Richard,

    I followed these steps but I got errors :

    in any line in a jsp file using :


    The error says:
    Fragment "/header.jsp" was not found as expected path MVCProject/header.jsp

    Thanks your help is appreciated, is there any forum so people who bought your CD could discuss this errors ?

  2. Hi Majid,

    All our courses are backed with full support and we'll always help you through problems – just send a message to us via our contact page on the website.

    I think this problem is due to an error on the course though, see the errata page at

    Early versions of the course had a typo in the web.xml file, you can download a corrected version from your "My Courses" page when you login.

    Also, full details on an earlier blog post here:

    I hope that gets you started again!

  3. (I've just noticed your earlier comment about the JSP files – I think this is ok, it must be a plugin trying to validate your JSPs – but because we use a non standard project layout, the plugin thinks there are missing files.)

    Let me know if this problem prevents a compile and deployment, I'm fairly sure you can safely ignore this.

  4. Thank you, Richard, for these instructions. It worked.
    Earlier, I have tried to "import this as an existing project into workspace" but it did not see "MVC Project" as a project.

  5. Hi Richard, could you please help me with a problem?
    I watch the Spring MVC course. I have followed all your instructions and till now,
    – Tomcat's congratulation page is running.
    – Ant build.xml was successful.
    – It has even copied the mywebapp.war file into tomcatwebapps

    but is not running. I get HTTP Status 404 – /mywebapp/.
    The requested resource (/mywebapp/) is not available.

    Could you please help me with this?

Leave a Reply

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