WTP JEE5 Test Scenarios
WTP 2.0 JEE 5 Use Cases
These scenarios are created to test the basic functionality that we would expect from WTP 2.0 to support JEE5. Please note that NO wizards are used other than the ones needed to create the servers, projects and add the necessary facets to these projects. The idea is if we are provided with valid JEE5 module and components (such as EJBs, JPA, Servlets, JSPs, etc), WTP 2.0 should support it. This includes Web, EJB, and EAR and Run As> Run on Server support. Of course this involves basic models for deployment descriptors (sans Annotation injections). Annotation support will only include that provided by JDT.
SIMPLE WEB APPLICATION USE CASE
This use case is the most basic Web application scenario that involves creating the Web module, targeting it to a JEE5 runtime, and testing it using Run As> Run on Server
- Go to Installed Runtimes and add Tomcat 6 as a runtime.
- Create a new Dynamic Web Project named HelloWorldWeb, select Tomcat 6 as the target runtime
- Select Dynamic Web Module 2.5, and Java 5 as facets, click next to accept defaults. A new Web 2.5 project is created.
- CURRENT I-BUILD NO WEB:XML CREATED. CAN ADD ONE MANUALLY
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" metadata-complete="true"> <display-name>MyJEE5Web</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app>
- Add a new JSP file called test.jsp with the following content:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> Hello World!
- Right click test.jsp, Choose Run As: Run on Server, select Tomcat 6 as the server