A sample web.xml (servlet 3.0) with ejb-ref and ejb-local-ref

This is a sample web.xml based on servlet 3.0 (part of Java EE 6).
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">

<servlet>
<display-name>Servlet1</display-name>
<servlet-name>Servlet1</servlet-name>
<servlet-class>test.Servlet1</servlet-class>
<init-param>
<param-name>sleep-time-in-seconds</param-name>
<param-value>10</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>

<ejb-ref>
<ejb-ref-name>ejb/fooremote</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<remote>test.FooRemoteIF</remote>
</ejb-ref>

<ejb-local-ref>
<ejb-ref-name>ejb/foo</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>test.FooIF</local>
<ejb-link>FooBean</ejb-link>
</ejb-local-ref>
</web-app>

Followers

Pageviews Last 7 Days