At some point you'll presumably want to deploy your domain object using Restful Objects as a webapp.
If you've used the Naked Objects archetype then it will have created
a webapp project for you, with its web.xml
set up
with the servlets and filters for the HTML viewer. We
can use this as the basis for Restful Objects'
configuration. (In principle, the web.xml
could
support both the HTML viewer and Restful
Objects. This chapter assumes you only want to expose the
latter interface, however).
In addition, you'll need to decide on the authentication mechanism. Restful Objects comes with some out-of-the-box support, but you may want to extend it for your own purposes. This chapter shows you how.d
First up (just as we did when prototyping, see Chapter 2, Using Restful Objects in Prototypes), we need to reference the Restful Objects viewer:
<dependencies> ... <dependency> <groupId>org.starobjects.restful</groupId> <artifactId>viewer</artifactId> </dependency> ... </dependencies>
Here I'm assuming that this is in the webapp submodule where the
parent defines the version in its
<dependencyManagement>
section (see Section 2.1, “Parent Module”).