Package helma.servlet

# Class StandaloneServletClient

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
helma.servlet.AbstractServletClient
helma.servlet.StandaloneServletClient

All Implemented Interfaces:
  `Serializable`, `javax.servlet.Servlet`, `javax.servlet.ServletConfig`

public final class StandaloneServletClient extends AbstractServletClient
Standalone servlet client that runs a Helma application all by itself in embedded mode without relying on a central instance of helma.main.Server to start and manage the application. StandaloneServletClient takes the following init parameters:

- application - the application name
- appdir - the path of the application home directory
- dbdir - the path of the embedded XML data store

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`StandaloneServletClient()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`createApp()`
Create the application.
`void`
`destroy()`
The servlet is being destroyed.
`Application`
`getApplication()`
Returns the `Applicaton` instance the servlet is talking to.
`void`
`init(javax.servlet.ServletConfig init)`
Init this servlet.

### Methods inherited from class helma.servlet.AbstractServletClient

`getServletInfo, parseParameters, parseParameters, parseUploads, service, writeResponse`

### Methods inherited from class javax.servlet.http.HttpServlet

`doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service`

### Methods inherited from class javax.servlet.GenericServlet

`getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StandaloneServletClient

public StandaloneServletClient()

## Method Details

### init

public void init(javax.servlet.ServletConfig init) throws javax.servlet.ServletException
Description copied from class: `AbstractServletClient`
Init this servlet.

Specified by:
  `init` in interface `javax.servlet.Servlet`
Overrides:
  `init` in class `AbstractServletClient`
Parameters:
  `init` - ...
Throws:
  `javax.servlet.ServletException` - ...

### getApplication

public Application getApplication()
Returns the `Applicaton` instance the servlet is talking to.

Specified by:
  `getApplication` in class `AbstractServletClient`
Returns:
  this servlet's application instance

### createApp

protected void createApp()
Create the application. Since we are synchronized only here, we do another check if the app already exists and immediately return if it does.

### destroy

public void destroy()
The servlet is being destroyed. Close and release the application if it does exist.

Specified by:
  `destroy` in interface `javax.servlet.Servlet`
Overrides:
  `destroy` in class `javax.servlet.GenericServlet`