Advanced Internet Programming - Architecture - Lab exercise - Familiarisation 1 31242/32549/ AJPCPEAdvanced Internet Programming INFO: What's New FAQ Software Machines Oracle Assignments MODULES: 00 Admin 01 Intro 02 Architecture 03 Servlets 04 JSP 05 JDBC 06 RMI 06 JNDI 07 EJB 08 XML 08 Web Services 09 Security 10 Transactions 11 Legacy 12 Review 99 Design LINKS: START page Faculty of IT UTS Module: Architecture Lab exercise - Familiarisation 1 - Installing Eclipse The laboratory exercise for this module to install Eclipse and then develop a one or two static HTML pages Level of Difficulty: 2 (moderately easy) Estimated time: 30 minutes Pre-requisites: Completed WebLogic setup lab exercise Running Eclipse Eclipse has been pre-installed on the lab workstations. You can start this via Applications → Programming → eclipse-oracle You MUST use the "oracle" version of eclipse, not the "wtp" verson. You now should see the Eclipse workspace launcher start. You will eventually see a prompt to enter the workspace directory. Leave the default (workspace), just be aware that you can change this and Eclipse will automatically create a directory for you with that name in your home directory. You will then get the Welcome screen (this only happens the first time you create a workspace) You should click on the X on the [Welcome] tab to get the following workspace window: This is the main Java EE "perspective". If you don't see this, click on the Window → Open Perspective → Other → Java EE (default) Or click the perspective button on the left-hand side of the current perspective and select the 'Java EE' perspective (Please look at the screenshot above). Arranging your windows Before you begin the setup instructions below, you will probably find it helpful to rearrange your windows so that this browser window and your Eclipse workspace window are side-by-side. This will save you flipping back and forth between the instructions and eclipse. Add Server Before creating a new Java EE project, we need to add a Java EE application server that is weblogic for this course. To add a new server, Click on the Window → Preferences Expand the 'Server' category → Select 'Runtime Environments' → Click the Add button Select the Oracle WebLogic Server 11gR1 PatchSet 2 under the Oracle category → Click the Next button Enter WebLogic home and Java home. WebLogic Home: /opt/oracle-middleware/wlserver Java Home: /usr/java/default If the 'Finish' button is not enabled, click the 'Back' button. Then click the 'Next' button again → Now the 'Finish' button is enabled → Click the Finish button As you can see, the 'Oracle WebLogic Server' is added to the Server Runtime Environment. Click the OK button Select the 'Server' view → Right-click inside the Server View panel → New → Server Click the Next button In the "Domain directory" box, enter /home/your_username/weblogic (Your user name is your student number). Oracle WebLogic Server 11gR1 PatchSet 2 is added to the Server view Creating a project To create a new Java EE project, we are going to create a Web application first. Step 1: From the Project Explorer:, Right Mouse Button click→ New→Project → Dynamic Web Project (alternatively: Choose the File-→New→Other→Web→Dynamic Web Project ) Enter the project name: labs Make sure the Target runtime is Oracle WebLogic Server 11gR1 Patch Set 2 and Dynamic Web Module version is 2.5 and a new default configuration for Weblogic. Depending on your server runtime chosen, Eclipse will display different information. Our first main exercise will be to just create a plain old web page. Deploying static HTML The next challenge is to create HTML files for our web site. From Project Explorer select Labs Now Right Mouse Button click -> New > HTML → (note: WebContent is highlighted) We choose a filename: index.html & press [Next] At the Select HTML Template panel: HTML 4.01 Transitional & press [Finish] You can now see it generates a HTML page which you can edit. Why not add some text or HTML formatting tags - change the title and maybe add a