...
- Right-click on the SampleWAR project and select Properties. Go to J2EE Module Dependencies and select the checkbox next to SampleEJB.jar (it's in the J2EE Modules tab) and click OK.
- Right-click on the SampleWAR project and select New -> Servlet and fill it in with the following values:
Section - Java Package: sampleear
- Class name: MyServlet
- Click Next.
- Change the URL Mapping section so the servlet serves at /sayHello url mapping and click Finish.
...