Importing several individual files into an eclipse project
I have several files comprising a tomcat web application that I need to import into an eclipse project so that I can easily create an EAR file from them.
I have changed the names of some folders + files for privacy reasons.
My files are currently all in the folder 'test'
.
'test'
contains some HTML and JSP files (the forms for my application) as well as a JavaScript .js file and a CSS file.'test'
also contains the folder'WEB-INF'
which contains a TLD file, and myweb.xml
file.'WEB-INF'
contains a'lib'
folder, withtwo .jar files
.'WEB-INF'
开发者_如何学Calso contains the'classes'
folder, which merely contains the'helpers'
folder.- The
'helpers'
folder contains all the java source code- several servlets, and one helper class that does database communication stuff.
How would I import these into a new project in Eclipse?
I want everything to import, including my js, css, jsp and html, not just the java
Joseph,
From eclipse you can import only 'war' files from the existing web application. If you have the war file you can directly do this, else you have to create a web project and manually add your files to the corresponding project folders.
Well I have Eclipse Indigo and for testing I just created a new project. I right clicked on the project folder and selected import. In the new window I selected General->FileSystem and then just browsed to the files I wanted (no matter the extension). Is this what you're referring to?
精彩评论