In the first place under Windows, the Java environment or something will no longer be recorded, remember to install Java EE before the installation of Java EE so that a smooth setup.
After installing Tomcat primarily, when configuring in Eclipse, at the bottom of the Servers window, double-click the English tag "create server", and then create it step by step next, depending on your tomcat version. Note that the JRE version in the middle of the process is tuned to the same JRE that is used with its own environment variables. There is a bit of attention, after configuration, but also to note, if not run, double-click the configured Tomcatx, in the pop-up configuration page, the server location that place, to choose the second item, install the address to choose their own, do not choose the default, here is a long time.
It's still a little tricky under Linux.
First, the installation of the Java environment (when the Ubuntu environment)
The first type:
Since the image cannot be downloaded directly, click on the Accepted button to refer to this procedure:
Https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
There's one place, in some cases, that's when you execute the first three commands. add-apt-repository not found error will occur
So I used the following solution. This may be related to Ubuntu's version information
Http://stackoverflow.com/questions/13018626/add-apt-repository-not-found
To use this command instead:
sudo apt-get install Software-properties-common python-software-properties
The second type:
If Linux has an interface, download the installation package from the official website and unzip it directly.
Either way, you set the environment variable.
Installing Tomcat under Linux is an environment variable problem, and one of the better tutorials is:
http://blog.csdn.net/ithomer/article/details/7827045
Note the environment variable setting location, some tutorials in the setpath.sh file modification, and some in the startup.sh, should be able to put.
There is a big pit is the issue of file permissions, starting in the Linux environment, Eclipese in the Tomcat is always not successful configuration, and later found that is to change the Tomcat directory under the Conf folder of all the files permissions, in short, is changed to all users can read the line, For example, change to 777. There is before, such as TOMCAT7 did not configure the success to reconfigure, the servers directory under the TOMCAT7 related information, after the discovery and click on the "Add Server" English tag, the corresponding TOMCAT7 can not be selected, This time you can delete the previous workspace directory, restart the Tomcat directory, re-build a workspace, so that the match, then OK.
Linux file permissions are still very important, For example, to upload a. War package to the WebApps file add, it is important to remember to change the attributes of the file to a file, not a directory, otherwise the app will not start normally, in short, file attributes, file categories this piece is still very significant, at the beginning of the experience is not very deep, take time to have a good look.