How does Windows server2012 run the Javaweb project?

Source: Internet
Author: User
Tags java web

Recently wrote a small project in Java, want to deploy to the server, so bought a Windows server2012, but do not know how to deploy, later know the need to configure the Java Runtime environment. After some research has finally been done. Below is my personal summary, because it is the first time to deploy the server, so some places are not perfect.

First step: Install the JDK

    1. Download

This can be downloaded to the Oracle website , Download the following steps:https://jingyan.baidu.com/article/ C1465413b54ec40bfcfc4cdd.html The latest version of Oracle page is not the case, search the jdkdirectly, find javase , and then download the same steps.

    1. installation

After the download is installed, this is the next step directly. Refer to the following:https://jingyan.baidu.com/article/b24f6c82c989da86bfe5dab2.html Installation path You can choose your own.

    1. Configuring Environment variables

Reference Link:https://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html classpath can not be configured. After opening the command window, enter java and javac If output a list of things, the configuration is successful

Step Two: Install tomcat

Baidu is not self-, this is very simple

after the problem: becauseTomcatThe default access port is8080, the initial access address ishttp://192.168.1.232:8080/. (PersonalIPaddress may vary)
(1If you need direct access, do not enter8080port, you need to modifyServer.xml(file inTomcatunder the installation directoryconffolder), under
<connector port= "protocol=" http/1.1 "connectiontimeout=" 20000 "redirectport=" 8443 "/>will bePortthe value is changed to the. This allows you to enter domain name access directly.

(2)will beJAVA WEBProject Export to”Project Name. War "file. of the copied server.Tomcat \webapps
directory to store.
5,Warafter the files are put in place, you can modify them as needed.Tomcatunder the installation directoryconffolder
under theServer.xmlin the following:
<context docbase= "D:\Program files\apache software foundation\tomcat 7.0\webapps\ project name" path= "" reloadable= "true"/ >will beDocBasevalue is modified toWarthe file name of the file (not the suffix name, and the absolute path).

Part III : Installing mysql

direct Baidu MySQL, installation tutorial self-Baidu. Because this is very simple.

after opening the command prompt,cd to the bin directory under MySQL , enter mysql-u root ( Default User name )-P Enter , enter MySQL after entering the password , you can create the database, data table and so on.

finally in in Tomcat, under the bin directory, double-click startup to start the tomcat Server and you can access it.

Remark :

do not drop after Tomcat startup, you can choose to minimize.

Mysql installation is sure to remember the password

JDK best with jdk7 or jdk8

Configuration environment variables are recommended to be configured in system variables so that other users can access

If you want to use Tomcat8 above,jdk should use more than JDK8, or not support

also refer to the following http://blog.csdn.net/u013063099/article/details/58006642

How does Windows server2012 run the Javaweb project?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.