[Index]

web:oddjob-web


Provide the Oddjob Web Service and Oddjob Web interface.

The actual service API is defined in org.oddjob.rest.OddjobApi.


Property Summary

allowCrossOrigin Is cross origin content allowed?
contextPath The context path.
multiPartConfig Set parameters for MultiPartConfig so that file upload from a form works.
root The root Oddjob component to expose via the web service.
serviceOnly Only enable the Oddjob Web Service, not the accompanying html.
servicePath The context path for the Oddjob web service.
uploadDirectory Upload directory.
webappDir The directory for the html files for oddjob web.
webappResource The class path to the html files for oddjob web.

Example Summary

Example 1 Provide an Oddjob web client.
Example 2 Provide an Oddjob web service only without the client.

Property Detail

allowCrossOrigin

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Default to false.

Is cross origin content allowed?

contextPath

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The context path.

multiPartConfig

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo. Defaults are used.

Set parameters for MultiPartConfig so that file upload from a form works.

root

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The root Oddjob component to expose via the web service.

serviceOnly

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

Only enable the Oddjob Web Service, not the accompanying html.

servicePath

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to '/'

The context path for the Oddjob web service.

uploadDirectory

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo. Defaults tmp dir.

Upload directory. Required for an action form that specifies a file.

webappDir

Configured ByELEMENT
AccessREAD_WRITE
RequiredNo.

The directory for the html files for oddjob web. Mainly used for development to save stopping and starting Jetty.

webappResource

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo. Defaults to the webapp in the jar at org/oddjob/webapp.

The class path to the html files for oddjob web.


Examples

Example 1

Provide an Oddjob web client.

<oddjob id="this">
  <job>
    <sequential>
      <jobs>
        <web:server id="server" port="${server.port}" xmlns:web="oddjob:web">
          <handlers>
            <web:oddjob-web root="${jobs}"/>
          </handlers>
        </web:server>
        <sequential id="jobs">
          <jobs>
            <echo name="Echo 1">Hello</echo>
            <echo name="Echo 2">Hello</echo>
          </jobs>
        </sequential>
      </jobs>
    </sequential>
  </job>
</oddjob>

Example 2

Provide an Oddjob web service only without the client.

<oddjob>
  <job>
    <sequential>
      <jobs>
        <web:server id="server" xmlns:web="oddjob:web">
          <handlers>
            <web:oddjob-web serviceOnly="true" root="${jobs}"/>
          </handlers>
        </web:server>
        <sequential id="jobs">
          <jobs>
            <echo name="Echo 1">Hello</echo>
            <echo name="Echo 2">Hello</echo>
          </jobs>
        </sequential>
      </jobs>
    </sequential>
  </job>
</oddjob>


(c) R Gordon Ltd 2005 - Present