...
The sample web application deploys demo.SimpleApp
servlet and JEST servlet. The essential aspect of the deployment descriptor WEB-INF/web.xml
is shown below
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Demo Application with JEST Servlet</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <servlet> <servlet-name>demo</servlet-name> <servlet-class>demo.SimpleApp</servlet-class> </servlet> <servlet-mapping> <servlet-name>demo</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <servlet> <servlet-name>jest</servlet-name> <servlet-class>org.apache.openjpa.persistence.jest.JESTServlet</servlet-class> <init-param> <param-name>persistence.unit</param-name> <param-value>jestdemo</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>jest</servlet-name> <url-pattern>/jest/*</url-pattern> </servlet-mapping> </web-app> |
...
Once the sample web application is deployed, say in Tomcat running on localhost:8080
, open the web browser http://localhost:8080/demo
and you should see the web page served by demo.SimpleApp
. This step initializes demo.SimpleApp
and hence the persistence unit jestdemo
.
Now, if you go to URL http://localhost:8080/demo/jest/
, the JEST welcome page will be displayed – which is JavaScript enabled web page that demonstrates currently available JEST facilities such as finding or querying for instances.
...