This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

--Deployment Descriptor for JVx

Documents for the development of and with JVx.

--Deployment Descriptor for JVx

Postby Development@SIB » Thu Sep 16, 2010 5:46 pm



This article is outdated - please use our new system at

https://doc.sibvisions.com




The configuration of a deployment descriptor is required for the integration of JVx in an application server.

The deployment descriptor is usually an XML file called web.xml. For Apache Tomcat, for example, the file should be constructed as follows:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                             http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID"
         version="2.5">

  <!--
   **************************************************************************
    Context configuration
   **************************************************************************
   -->

  <display-name>Application name</display-name>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <!--
   **************************************************************************
    JVx configuration
   **************************************************************************
   -->

  <!-- Servlet for accessing the JVx server through http(s) streaming protocol. -->
  <servlet>
    <servlet-name>ServletServer</servlet-name>
    <servlet-class>com.sibvisions.rad.server.http.ServletServer</servlet-class>
  </servlet>
     
  <servlet-mapping>
    <servlet-name>ServletServer</servlet-name>
    <url-pattern>/services/Server</url-pattern>
  </servlet-mapping>

  <!-- Servlet for downloading content (reports, csv export, any binary data). -->
  <servlet>
    <servlet-name>DownloadServlet</servlet-name>
    <servlet-class>com.sibvisions.rad.server.http.DownloadServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>DownloadServlet</servlet-name>
    <url-pattern>/services/Download</url-pattern>
  </servlet-mapping>

  <!-- Servlet for uploading content (images, import files, any binary data). -->
  <servlet>
    <servlet-name>UploadServlet</servlet-name>
    <servlet-class>com.sibvisions.rad.server.http.UploadServlet</servlet-class>
  </servlet>
     
  <servlet-mapping>
    <servlet-name>UploadServlet</servlet-name>
    <url-pattern>/services/Upload</url-pattern>
  </servlet-mapping>

  <!-- Online Help integration. -->
  <servlet>
    <servlet-name>Help</servlet-name>
    <servlet-class>com.sibvisions.rad.help.server.HelpServiceImpl</servlet-class>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>Help</servlet-name>
    <url-pattern>/help/services/Help</url-pattern>
  </servlet-mapping>

  <!--
   **************************************************************************
    Special mime-type mappings
   **************************************************************************
   -->

  <!-- Mime type for csv export. -->
  <mime-mapping>
    <extension>csv</extension>
    <mime-type>application/vnd.ms-excel</mime-type>
  </mime-mapping>

</web-app>


As we can see here, configuration is limited to a minimum. The relevant server objects have to be used depending on the desired client options.

  • The Servlet server is used for the communication between client and server using http(s) protocoll.
  • If data is uploaded to or downloaded from the server by the client, the UploadServlet and DownloadServlet are required as well.
  • • The HelpService is used when dynamic online help is available.
User avatar
Development@SIB
 
Posts: 323
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation