Build a WebService Based on Tomcat + Axis

Source: Internet
Author: User
ApacheTomcat is an open-source Servlet container that supports Servelet and assumerverpage. You can deploy WebService on the Tomcat server. Installation Steps: 1. Install jdk to the c root directory. After installation, the directory structure is as follows: c: \ java \ jdkjre62.. download tomcat pressure from http: atat.apache.org

ApacheMcAt is an open-source Servlet container that supports Servelet and assumerver Page.CatDeploy Web services on the server.

Installation steps:

1. Install jdk to the c root directory. After installation, the directory structure is as follows:

C: \ java \

Jdk

Jre6

2. Download tomcat from http://tomcat.apache.org/websiteCompressionPackage "32-bit WindowsZip"Version, compress the packageExtractGo to the C-drive root directory and change the directory name to tomcat.

3. Set environment variables:

CATALINA_HOME = c: \ tomcat
CLASSPATH =.; C: \ Java \ jdk \ lib \ tooLs. Jar
JAVA_HOME = C: \ java \ jdk
Append "C: \ Java \ jdk \ bin; C: \ Java \ jdk \ jre \ bin;" to the PATH variable (excluding double quotation marks)

4. Run tomcat

C: \ tomcat \ bin> catalina. bat jpda start

There will be a prompt form, such:


5. Download The axis2.war file from www.apache.org and copy it to the tomcat \ webapps directory.

AXIS is an open-source Web Service framework for easy deployment of Web Services. AXIS in the form of WAR package saves you the trouble of configuring environment variables. During tomcat running, the WAR package under the tomcat \ webapps directory is automatically decompressed.


6. Use http: // localhost: 8080/access in the browser

If Tomcat is successfully deployed, you can see the following interface:



7. Add a tomcat account in the user profile (tomcat \ conf \ tomcat-users.xml)

In a pair Add the following statement in the tag, account tomcat, and password




8. Click Tomcat Manager in the upper left corner to use the tomcat account. You can see the Web application on Tomcat.


9. Deploying Tomcat on Linux

Tomcat is implemented by Java and supports cross-platform. Copy the tomcat package in step 2Linux.

The procedure is as follows:

A. Install JDK (fromSuDownload n.com)

B. Copy tomcat to CentOS, such as/home/tomcat.

C. Configure environment variables in/etc/pro.FileAdd the following statement to the file:

ExPort JAVA_HOME =/usr/java/jdk1.7.0

ExportCATALINA_HOME =/home/tomcat

D. Go to the tomcat \ bin directory under SHELL and useCommand./Catalina. sh jpda start run tomcat and the configured environment variable value is printed.

E. Repeat Step 6 to check whether tomcat is deployed successfully.

You can use http: // 192.168.1.109: 8080/to access the Tomcat server on the specified host. If you cannot access the server, check whether a firewall is enabled.


If tomcat is required to support debugging, add the following statement to the tomcat \ bin \ catalina. bat file to start with the file. 5005 is the debugging port

SET JPDA_ADDRESS = 5005
SET CATALINA_OPTS =-Xdebug-Xnoagent-Djava. compiler = NONE-Xrunjdwp:TrAnsport = dt_socket,DdRess = 5005, suspend = n, server = y

Related Article

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.