Jump to: navigation, search

Difference between revisions of "J2EE Accessibility Smoke Test"

(New page: == Setup == * Configure a Java EE 5 compatible server. * Open the ''Java EE'' perspective. == Scenario == === Create new Web project === * Hit '''Alt+Shift+N, D''' to launch the ''Dyna...)
 
(Move the DemoEJBClient.jar to the EAR library directory)
Line 49: Line 49:
 
* Hit '''Ctrl+S''' to save the editor.  
 
* Hit '''Ctrl+S''' to save the editor.  
  
=== Move the DemoEJBClient.jar to the EAR library directory ===
+
=== Move the DemoEJBClient.jar to the EAR library directory ===
  
* Use '''Ctrl+F7''' to navigate to the ''Project Explorer'' view.  
+
*Use '''Ctrl+F7''' to navigate to the ''Project Explorer'' view.  
* Use the '''arrow keys''' to navigate to the ''DemoEAR'' project.  
+
*Use the '''arrow keys''' to navigate to the ''DemoEAR'' project.  
* Hit '''Alt+Enter, M''' to show the ''Module Assembly'' property page.  
+
*Hit '''Alt+Enter, M''' to show the ''Module Assembly'' property page.  
* Change the ''Deploy Path'' of the ''DemoEJBClient'' project to '''/lib/DemoEJBClient.jar''. Accessibility problem!
+
*Change the ''Deploy Path'' of the ''DemoEJBClient'' project to '''/lib/DemoEJBClient.jar''.
* Hit '''Enter''' to close the dialog and apply the changes.  
+
 
 +
'''Accessibility problem!''' [https://bugs.eclipse.org/301969 301969] Module Assembly page entries not editable with keyboard
 +
 
 +
*Hit '''Enter''' to close the dialog and apply the changes.
  
 
=== Create new Servlet ===
 
=== Create new Servlet ===

Revision as of 11:40, 5 February 2010

Setup

  • Configure a Java EE 5 compatible server.
  • Open the Java EE perspective.

Scenario

Create new Web project

  • Hit Alt+Shift+N, D to launch the Dynamic Web Project wizard.
  • Write DemoWeb in the Project name field.
  • Hit Alt+F to finish the wizard.

Create new EAR project

  • Hit Alt+Shift+ N, E, Enter to launch the Enterprise Application Project wizard.
  • Write DemoEAR in the Project name field.
  • Hit Alt+N to advance to the next wizard page.
  • Hit Alt+J to move the focus to the Java EE module dependencies list.
  • Use the Down Arrow key to navigate to the DemoWeb project.
  • Hit Space to select the DemoWeb project.
  • Hit Alt+F to finish the wizard.

Create new EJB project

  • Hit Alt+Shift+ N, E, E, Enter to launch the EJB Project wizard.
  • Write DemoEJB in the Project name field.
  • Hit Alt+P to check the Add project to an EAR checkbox.
  • Hit Alt+R to move the focus to the EAR project name list.
  • Use the Down Arrow key to navigate to the DemoEAR project.
  • Hit Alt+F to finish the wizard.

Create new EJB Session Bean

  • Use Ctrl+F7 to navigate to the Project Explorer view.
  • Use the arrow keys to expand the metadata of the DemoEJB project and navigate to the DemoBeanLocal node.
  • Hit Enter to open the DemoBeanLocal interface in the Java editor.
  • Use the keyboard to add new business method declaration:
public String sayHello(String name);
  • Hit Ctrl+S to save the editor.
  • Use Ctrl+F6 to switch to the Java editor of the DemoBean class.
  • Use the arrow keys to navigate to the class declaration – should be underlined with red marker.
  • Hit Alt+1, Enter to invoke the Add unimplemented methods quick fix.
  • Use the arrow keys to navigate to the generated method stub and replace the implementation with:
return "Hello, " + name + "!";
  • Hit Ctrl+S to save the editor.

Move the DemoEJBClient.jar to the EAR library directory

  • Use Ctrl+F7 to navigate to the Project Explorer view.
  • Use the arrow keys to navigate to the DemoEAR project.
  • Hit Alt+Enter, M to show the Module Assembly property page.
  • Change the Deploy Path of the DemoEJBClient project to '/lib/DemoEJBClient.jar.

Accessibility problem! 301969 Module Assembly page entries not editable with keyboard

  • Hit Enter to close the dialog and apply the changes.

Create new Servlet

  • Hit Alt+Shift+N, S, S, S, Enter to launch the Servlet wizard.
  • Hit Alt+P to move the focus to the Web project field.
  • Use the Down Arrow key to navigate to the DemoWeb project.
  • Hit Alt+K to move the focus to the Java package field.
  • Write org.eclipse.demo in the text field.
  • Hit Alt+M to move the focus to the Class name field.
  • Write DemoServlet in the text field.
  • Hit Alt+N to advance to the next wizard page.
  • Change the text in the Name field to demo.
  • Hit Alt+N to advance to the next wizard page.
  • Hit Alt+P to deselect the doPost checkbox.
  • Hit Alt+F to finish the wizard.

Modify the source code of the Servlet

  • Use the keyboard to add new member variable:
@EJB private DemoBeanLocal bean;
  • Use the keyboard to replace the implementation of the doGet() method with:
response.getOutputStream().println(bean.sayHello("Team"));
  • Hit Ctrl+S to save the editor.

Deploy and run the application

  • Hit Alt+Shift+X, R to launch the Run On Server wizard.
  • Hit Alt+F to finish the wizard. The application should now deploy and the servlet should be executed in the internal browser.