Question: I am using windows 7.  

I have written a simple Spring3 Hello World using Eclipse and successfully run it using tomcat on my computer.  

Now I have a Server which runs Linux.  

I would like to run the project that I just wrote on my server. It has no GUI or anything of the kind so I can't simply start up eclipse and write the same project on the server.  

How do I go about doing that? I am completely new to the whole java and Spring thing, and have absolutely no clue as to how to run my project on the server and be able to view it.  

I have searched everywhere online trying to figure out how to put my project on the Server, but it seems like Spring isn't the most noob friendly, especially with its documentation. There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.

Answer: 
> 
> There doesn't seem to be any explanation on how to take your code from one computer and put it into another and make it work.
> 
> 
> 

That's right, as it is not often considered "not a programmers job". Its not very related to the framework you're using (Java EE or Spring or whatsoever), instead it's more of an infrastructure thing (related to the operating system and application server that are being used). Nevertheless, it can be very useful to know how the process works.

Generally speaking there are two steps:

1. **Packaging** - If you use Maven, you simply run the `mvn package` command. Or using Eclipse, you can export your project as an WAR-file (Right-click your project, click Export, search for "WAR"). I would advice to use Maven, but that's a bit outside the scope of your question probably. Either way, this step will result in a WAR file.
2. **Deployment** - This is a bit harder. The WAR file from step 1 needs to be copied to the Linux server where the application must be ran, and then copied into a special directory where the application server looks for apps. If you're using Tomcat on the Linux machine as well, look for the Tomcat installation directory and find the 'webapps' subdirectory. Other application servers have other procedures / locations, though.

This is under the assumption that Tomcat was already set up for you on the Linux server, and that is running.
Spring is just a 3rd party open source API. You can do without Spring and still be able to "run" your application on a server.

By "run", this means that your project must be placed in a directory in the server's filesystem, most of the time in the form of a WAR file.

I said most of the time, because if done correctly, you can actually put your project directory inside the server, and it will run without transferring it as a WAR file.

A WAR file is just an archive that has a standard directory structure so that it is readable and executable by the server.

Read the following link on how to package your project as a WAR:

<http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Fcwwarovr.html>

And then just copy the WAR file to the TOMCAT\_HOME/webapps folder.