NuGram Server SDK is released as a ZIP archive containing all
the required files to build an application-specific instance of
NuGram Server. The ZIP archive is
named nugram-server.zip.
To start a new project, simply unzip the archive. A
directory nugram-server-N.N.N-sdk gets created,
with the following subdirectories,
where N.N.N is the version number of
the SDK:
| Directory | Description |
|---|---|
bin/ |
Contains several scripts to package and start the server. |
lib/ |
Contains all the libraries required to run the server in standalone mode. |
webapp/ |
Base directory for the web application. |
webapp/WEB-INF/ |
Contains all the files and directories hidden to the
application's clients. In particular, it contains the webapp
descriptor file, web.xml. This file must be
properly configured prior
to running the application. |
webapp/WEB-INF/classes/ |
Contains all the compiled application-specific Java classes. It is empty by default. |
webapp/WEB-INF/lib/ |
Contains all the libraries required to run the server in a servlet container. This is where additional application-specific libraries must be put. |
webapp/grammars/ |
Contains all the grammars and resources delivered by NuGram Server. In particular, all dynamic grammar templates must be put in this directory, or one of its subdirectories. Files can be organized in an arbitrary directory structure. |
Free licenses for development purposes must be requested from the NuGram website. Licenses are valid for a 90-day period. Once the license expires, simply request a new one.
To install the license:
com.nuecho.application.grammarserver.license-directory
context parameter in the
file webapp/WEB-INF/web.xml to the name of the
directory containing the license file.
The bin/ directory of the project contains a number
of shell scripts (on Windows, it is highly recommended to use a
Unix-compatible set of tools like Cygwin). The two most
noteworthy ones are:
server.sh — this script is used to
start NuGram Server in standalone mode, without having
to deploy it in a Java Servlet container like WebSphere or
Tomcat.makewar.sh — this small script
packages the application as a WAR file for deployment in a Java
Servlet container.
Simply execute the scripts without any argument to get help on how to use them. Calling conventions may differ between versions.