views:

11

answers:

1

using IDEA ultimate, how would I start a project and have the following layout:

/src/
/src/main/java/com/example/myapp
/src/main/resources
/src/main/webapp
/src/main/webapp/META-INF
/src/main/webapp/WEB-INF
/src/main/webapp/WEB-INF/jsp
/src/main/webapp/WEB-INF/lib
/src/main/webapp/WEB-INF/myapp-servlet.xml
/src/main/webapp/WEB-INF/web.xml

So from what I understand, once this is setup I have to now somehow wire things using Modules/Artifacts/Facets.

I have JDK and tomcat setup.

I just don't know how to wire things up, so when I hit RUN it will build, deploy the app.

+1  A: 

The best way to start creating a web project in Idea is to use either a maven project (any project with valid pom.xml and by your folder structure I guess thats what you are trying to do) Or create a project and add a web module (a module with web facet). Artifacts are like your build artifacts, your wars, jars and such things. Modules are sub projects or logical division of your main projects like common module, services, web module in a main project. Facets gives your some extra features like spring auto completion. It tells the IDE that your module is using so and so technology...

Teja Kantamneni
great, so I created project using pom.xml, added spring-mvc, create web.xml, xxx-servelet.xml, homecontroller, index.jsp, added tomcat. building doesn't deploy. I didn't setup any artifacts/facets/etc. yet, so what do I do? please help thanks!
Blankman
If you have not created a run/debug configuration already, start by creating one and add the artifact to the deployment tab and then start the server
Teja Kantamneni
so how many artifacts should I have? just the war?
Blankman
Yes, you should have only one.
Teja Kantamneni