John
John

Reputation: 11

Imported maven project but can't see jsp in WEB-INF in eclipse

I checked out a maven project, the directory looks like this :

.settings
[bin]

[src] inside this folder there is [java],[resources] and [webapp] folders. inside [webapp] there is index.jsp and [WEB-INF]. inside [WEB-INF] there is web.xml and [jsp] folder.

[target]
.classpath
.project
pom.xml

I did : File --> Import --> Existing Maven projects

The project now appear in Project Explorer of Eclipse with this contents :

src/main/java
src/main/resources
src/test/java
JRE System Library[JavaSE-1.6]
Maven Dependencies
bin
src
target
pom.xm

My question, where are : WEB-INF and jsps ?

Thanks, your help is appreciated. John

Upvotes: 1

Views: 3193

Answers (4)

Lorin S.
Lorin S.

Reputation: 762

Down below the source files that you described, you should see a "src" folder (with nothing after it). Drill into this folder and you should find your missing files.

Upvotes: 1

Raghuram
Raghuram

Reputation: 52645

You should look at m2eclipse plugin to work on maven projects in eclipse. Assuming you have installed this and m2eclipse extras (for WTP support), import the project in eclipse as a maven project. The jsps should be show up in Web Resources (src/main/webapp).

Note that this plugin does not need you to run mvn eclipse:eclipse either. If you have done this and want to undo it, you can run mvn eclipse:clean.

Upvotes: 0

lobster1234
lobster1234

Reputation: 7779

First off, you will need to make sure you have the Eclipse Maven Plugin installed. You can get it here. Once thats there, you will need to run mvn eclipse:eclipse on the project base folder on command line. That will create .project, .settings and .classpath files, making it a valid Eclipse project. Now start Eclipse, select File -> Import -> Existing Projects in Workspace and navigate to the project folder. You should be able to see the project with Maven folder layout now.

Upvotes: 0

kalyan
kalyan

Reputation: 3106

Did you run mvn eclipse:eclipse?

Upvotes: 0

Related Questions