Deploying Web Applications

WSO2 AppServer supports Apache Tomcat based web application deployment. Now you can Deploy your custom web application under WSO2 AppServer. All you need to do is to bundle your web application as a '.war' archive with all your web application-related resources and all third party libraries needed, and then deploy the archive.

To deploy the web application, all you have to do is locate the archive file and upload it.

Uploading Web Archive Files

To upload your web archive file, you have to create the '.war' file according to the standard web application format.

The folder structure of the web archive file will be as follows.

        HellowWorld.war
            index.html
            *.jsp
            WEB-INF/
                web.xml
                lib/
                classes/
            META-INF/
            images/
    

Figure 1: Uploading a web archive file

  1. In the navigator, under Manage/Web Applications, click Add .
  2. Click Browse to locate the file you want to upload. If you want to add multiple Webapps at the same time, click on the '+' sign at the right side, and new additional entry to upload a Webapp archive will appear each time you click. So you can select all the Webapps you want and deploy them at the same time.
  3. Click Upload. The Running Web Applications page appears. Subsequently, if the web application is successful, it will appear in list. If the web application is faulty, a Faulty Web Application Groups link will appear. You can click the link to view the errors.

Testing the Web Application

A successful web application can be easily tested through the user interface. Several options are available to control your web application.

  1. In the navigator, under Manage/Web Applications, click List. The Running Web Applications page appears.
  2. Figure 2: Web Applications List.

  3. Click on the web application name you want to test. The Web Application Dashboard page appears.
  4. Figure 3: Web Application Dashboard.

  5. A page with your web application name appears. It contains the operations available for your web application.
  6. In this page the Session Statistics pane shows the session related statistics collected for the selected webapp. The Maximum Concurrent Active Session indicates the maximum number sessions that have been concurrently active so far.
  7. Clicking the 'url' you will be directed the web application's index.html page

Note: Instead of using this user interface, you can also manually place the .war containing all the required files into CARBON_HOME/epository/deployment/webapps. These archive files will be deployed as web applications.