Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "J2EE Smoke Test (WTP 2.0)"
m |
m |
||
Line 1: | Line 1: | ||
− | + | == J2EE 1.4 == | |
− | + | === Setup === | |
− | + | * Install a J2EE 1.4-compatible server, such as JOnAS, JBoss or WebSphere | |
− | + | * Add the server in Window->Preferences...->Server->Installed Runtimes | |
− | + | * Install the XDoclet support (1.2.1, 1.2.2 or 1.2.3) | |
− | + | * Add the XDoclet support in Window->Preferences...->XDoclet | |
+ | * Expand the XDoclet node and configure the ejbdoclet and webdoclet support for your installed server(s). | ||
− | + | === Create resources === | |
− | + | ==== Create a Web 2.4 project ==== | |
− | + | * Target it at the installed J2EE server | |
− | + | * Choose "Dynamic Web Project with XDoclet" from Configurations | |
− | + | * Create a servlet inside the project | |
− | + | ** enter "test" for Java Package | |
+ | ** specify a name | ||
+ | ** select the "Generate an annotated servlet class file" checkbox | ||
+ | ** give "test" for servlet's name (second page) | ||
+ | ** leave only the "doGet" checkbox checked (third page) | ||
+ | ** add the following code in the doGet() method of the servlet class | ||
+ | response.getOutputStream().println("This is a test servlet. "); | ||
+ | * Create a JSP inside the project | ||
+ | ** file name: index.jsp | ||
+ | ** add the following text into the body | ||
+ | <body>This is the Smoke Test.</body> | ||
+ | * Ensure the project builds and is targeted to a server correctly | ||
− | + | ==== Create an EAR 1.4 project ==== | |
+ | * Target it at the installed J2EE server | ||
+ | * Select the Web 2.4 project as J2EE module (third page) | ||
− | + | ==== Create an EJB 2.1 project ==== | |
+ | * Target it at the installed J2EE server | ||
+ | * | ||
;Add EJB to an EAR | ;Add EJB to an EAR | ||
Line 36: | Line 52: | ||
:Export the EJB project - verify that all of the classes and the deployment descriptor are included in the EJB JAR. | :Export the EJB project - verify that all of the classes and the deployment descriptor are included in the EJB JAR. | ||
− | + | == Java EE 5 == | |
+ | |||
+ | == See also == | ||
:[[WTP Smoke Test Scenarios R15 | Click here to view smoke test scenarios for WTP 1.5.]] | :[[WTP Smoke Test Scenarios R15 | Click here to view smoke test scenarios for WTP 1.5.]] | ||
:[[WTP Smoke Test Scenarios R20 | Click here to view smoke test scenarios for WTP 2.0.]] | :[[WTP Smoke Test Scenarios R20 | Click here to view smoke test scenarios for WTP 2.0.]] |
Revision as of 11:28, 23 August 2007
Contents
J2EE 1.4
Setup
- Install a J2EE 1.4-compatible server, such as JOnAS, JBoss or WebSphere
- Add the server in Window->Preferences...->Server->Installed Runtimes
- Install the XDoclet support (1.2.1, 1.2.2 or 1.2.3)
- Add the XDoclet support in Window->Preferences...->XDoclet
- Expand the XDoclet node and configure the ejbdoclet and webdoclet support for your installed server(s).
Create resources
Create a Web 2.4 project
- Target it at the installed J2EE server
- Choose "Dynamic Web Project with XDoclet" from Configurations
- Create a servlet inside the project
- enter "test" for Java Package
- specify a name
- select the "Generate an annotated servlet class file" checkbox
- give "test" for servlet's name (second page)
- leave only the "doGet" checkbox checked (third page)
- add the following code in the doGet() method of the servlet class
response.getOutputStream().println("This is a test servlet. ");
- Create a JSP inside the project
- file name: index.jsp
- add the following text into the body
<body>This is the Smoke Test.</body>
- Ensure the project builds and is targeted to a server correctly
Create an EAR 1.4 project
- Target it at the installed J2EE server
- Select the Web 2.4 project as J2EE module (third page)
Create an EJB 2.1 project
- Target it at the installed J2EE server
- Add EJB to an EAR
- Bring up the Properties dialog of the EAR project
- Select J2EE Modules
- Check the checkbox next to the EJB project name
- Press OK
- Add a bean to the EJB project
- Create a new XDoclet Enterprise JavaBean as a Session Bean in package test
- Verify the EAR module in the navigator
- Expand the EAR - verify that there is a node for the deployment descriptor.
- Expand the deployment descriptor node- verify that there are "Modules" and "Utility JARs" nodes
- Expand the Modules node - verify that the EJB reference is shown
- Export the projects
- Export the web project - verify that the deployment descriptor, Servlet class, and libraries are included in the WAR.
- Export the EJB project - verify that all of the classes and the deployment descriptor are included in the EJB JAR.