CADViewer Technical Documentation, Installation Guide and Reference Samples Library

Servlets - Tomcat

Folder Structure

For a CADViewer Servlets installation under Tomcat on Windows, the base file-structure should be as below:

NOTE: Under Linux replace c:\xampp\tomcat\webapps with /var/lib/tomcat{X}.

c:\xampp\tomcat\webapps
       └─── cadviewer
               ├── app
               │    ├── cv
               │    │    ├── cv-pro 
               │    │    │   ├── menu_config
               │    │    │   ├── language_table
               │    │    │   └── space
               │    │    │         ├── css 
               │    │    │         └── html
               │    │    ├── cv-core
               │    │    │   ├── menu_config
               │    │    │   └── language_table
               │    │    └── cv-custom_commands
               │    ├── fonts
               │    ├── images
               │    ├── js
               │    ├── css
               │    └── user_resources	
               ├── converters
               │    ├── ax2020
               │    │     ├── windows 
               │    │     │      └── fonts
               │    │     └── linux
               │    │            └── fonts
               │    ├── dwgmerge2020
               │    │         ├── windows 
               │    │         │      └── fonts
               │    │         └── linux
               │    │            └── fonts
               │    ├── linklist2020
               │    │         ├── windows 
               │    │         │     └── fonts
               │    │         └── linux
               │    │               └── fonts
               │    └── files
               ├── WEB-INF
               │      ├── classes
               │      └── lib
               ├── content
               ├── html
               └── temp_print

1: Download and install CADViewer under this structure.
2: Download and install AutoXchange 2020 under this structure.
3: Optionally, Download and install DwgMerge 2020 under this structure.

WEB-INF Configuration

NOTE: Under Linux replace c:\xampp\tomcat\webapps with /var/lib/tomcat{X}.

In folder:

c:\xampp\tomcat\webapps
	            └─── cadviewer
                        └─── WEB-INF
                               ├── classes
                               └── lib

4: Download install WEB-INF folder under this structure from the download Handlers section.

In folder /cadviewer/WEB-INF open and edit the file web.xml.

Locate and change all CADViewer Servlets related <param-name> / <param-value> pairs, so the paths and executable points properly to the values defined in your CADViewer installation structure.

HTML

NOTE: Under Linux replace c:\xampp\tomcat\webapps with /var/lib/tomcat{X}.

In folder:

c:\xampp\tomcat\webapps
    └─── cadviewer
            └── html

identify your sample mysample.html file, and ensure that it loads the CADViewer_ServletHandlerSettings.js file:

Handler Settings JS File

NOTE: Under Linux replace c:\xampp\tomcat\webapps with /var/lib/tomcat{X}.

In folder:

c:\xampp\tomcat\webapps
    └─── cadviewer
            └── app
                 └── cv

Open the CADViewer_ServerHandlerSettings.js file, and ensure that the top variable settings correspond to your server settings:

Open a web-browser pointing to your sample html file (any of the files in the /cadviewer/html/ folder): http:/localhost:8080/cadviewer/html/mysample.html

Use the server traces and browser development console for debugging, alternatively contact our Support

NOTE: Under Linux replace c:\xampp\tomcat\webapps with /var/lib/tomcat{X}.

For debugging, the folder:

c:\xampp\tomcat\
            └─── temp
		

contains a debug files corresponding to each of the Servlets defined in /cadviewer/WEB-INF/classes folder. The debug files are of type: getFileServlet-log-err2938081564144043508.txt and ConversionServlet-log_8998081420588034766.txt.

Especially ConversionServlet-log_xxxxxx.txt lists the command line and traces in the communication with the back-end converter AutoXchange 2020.
If drawing files does not display, this file will contain useful information to pinpoint the issue.

Troubleshooting

One issue that often appears in installations is that interface icons do not display properly:

Icons

Typically the variable ServerUrl in /cadviewer/app/cv/CADViewer_ServerHandlerSettings.js is not set to reflect the front-end server url or port.

Last updated on 7 Oct 2020
Published on 7 Oct 2020