Your First Cup: An Introduction to the Java EE Platform

ProcedureCreate the DukesAgeResource Class

  1. Make sure dukes-age is selected in the Project menu.

  2. Select File -> New File.

  3. Select Web Services in the Categories pane.

  4. Select RESTful Web Services From Patterns in the File Types pane.

  5. Click Next.

  6. Under Select Pattern select Singleton and click Next.

  7. Set Resource Package to firstcup.webservice.

  8. Under Path enter dukesAge.

  9. Under Class Name enter DukesAgeResource.

  10. Under MIME Type select text/plain.

  11. Click Finish.

    You should now see the file inside the firstcup.webservice package in the Projects pane. The file should also be open in the editor pane.