uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

12.3.4 Creating application.xml

You create application.xml required as a component of the EAR file.

The following is an example of creating application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application version="6"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
 
    <description>Sample application &quot;tutorial&quot;</description>
    <display-name>Sample_application_jaxrs_tutorial</display-name>
    <module>
        <web>
            <web-uri>tutorial.war</web-uri>
            <context-root>tutorial</context-root>
        </web>
    </module>
</application>

When creating application.xml of version 5, specify 5 in the version attribute of the application element and specify http://java.sun.com/xml/ns/javaee/application_5.xsd as the second location information in the xsd:schemaLocation attribute.

You save the created application.xml in the c:\temp\jaxrs\works\tutorial\server\META-INF\ directory in the UTF-8 format. For notes on creating the application.xml file, see 5.2.2 Points to consider when editing application.xml in the uCosminexus Application Server Application Development Guide.