Create a new project with the existing project code?

Hi,

I am new at IDEA. I downloaded an IDEA and played with it today. I was trying to create a new project in IDEA with the existing web project (I has been working with this project with eclipse). I didn’t found how to do it. Please help me with this.

The structure of the existing project is like following.

config\WEB-INF\
config\lib\
src\com\companyname\appname\
\web\jsp\
\web\js\
\web\images\

Thank you in advance!

David

2 comments

Do you want to build a war file only?
More precisely how exactly should the deployment be structured?

You could create a project with a single "Web Module".
1) In the first step of the module wizard select "\" as the module's content root.
2) In the second step ("Deployment Descriptors") configure "config\WEB-INF\web.xml" as deployment descriptor (plus maybe add any other (descriptor) files that should end up in WEB-INF folder)
3) Third step: Configure "\web\jsp" as a "resource directory". Same for "\web\images" and "\web\js".
4) Exploded directory is nice for debugging with. If you created a run configuration that uses exploded deployment you can for example right click in a jsp and select "Package" to have Idea copy a modified jsp file to the exploded dir where the servlet container notices it and reloads the file on the fly.
5) Source directory. Obviously configure "\src"

When the wizard finishes go to the "Dependencies" tab that appears when you select the module in the project settings and add all needed jars from "config\lib" as module libraries ("Add.." -> "Module Library..." -> Use multi-selection to select all jars).

Twiddle with all module settings on the different tabs until done.
Good luck!

0

Thanks Stephen,

It worked. I usually build the war file by scripts, and deploy the application on Websphere.

Thank again,

David

0

Please sign in to leave a comment.