views:

45

answers:

3

If I make a spring mvc application, what are the things I have to do to deploy the application? (say its a commercial application)

What options do I have? Do all applications compress the classes into a .war file?

/WEB-INF/web.xml, appname-servlet.xml, etc.
/WEB-INF/jsp/*.*
/WEB-INF/appname.war ???
+1  A: 

Done correctly, the build process will create a war which can be dropped into any servlet container (Tomcat, Jetty, Glassfish).

If you use external source files, those would have to be configured.

If you use advanced features provided by the servlet container, the server would have to configured as well.

Milan Ramaiya
A: 

Any IDE could create the WAR file for you. As you've said the configuration xml files go to /WEB-INF folder and jsp files (by default) to /WEB-INF/jsp/. You also need to put all required jar files in /WEB-INF/lib folder. Compiled classes will go to /WEB-INF/classes, but let the IDE do that for you.

The war file shouldn't be in the /WEB-INF folder. In Tomcat for example you need to copy it to the webapps folder.

kgiannakakis
+1  A: 

Spring application is no different from any java web application when deploying. but generally the only thing I have to do is flip the order of test spring config with the actual one.

Teja Kantamneni