PDF HTML FlashPaper

JSC401

Contents

  • 1 Setup
  • 2 Technical Requirements
    • 2.1 Operating System Options
    • 2.2 Apache HTTP Server
    • 2.3 Apache Tomcat
    • 2.4 MySQL 5.0 or Microsoft Access
    • 2.5 Any Text or HTML Editor
      • 2.5.1 Windows
      • 2.5.2 Mac OS X
    • 2.6 Browsers for Windows
    • 2.7 Firebug for Firefox
      • 2.7.1 Using Firebug with Ajax
  • 3 Class Files
  • 4 Setup Instructions
    • 4.1 Class files placement
    • 4.2 Databases
    • 4.3 Database Access in 64-bit Windows
    • 4.4 Data Source Names
    • 4.5 Testing The Setup
    • 4.6 FAQ

Setup

Please note, this page is for setting up the Ajax Training using JSP as the server-side language. If you are using another server-side language, please choose from the following list:

  • ColdFusion
  • Classic ASP
  • PHP

Technical Requirements

Operating System Options

This class only supports Windows Operating Systems.

  • Windows XP Service Pack 2 or above
  • Windows Vista
  • Windows 7

Apache HTTP Server

  • Download
  • System Requirements

Apache Tomcat

  • Download

MySQL 5.0 or Microsoft Access

You can use MySQL or Microsoft Access for this class

  • Download MySql 5.0 for Windows.
  • If you do not have Microsoft Access, you can download a free trial of Microsoft Office Professional, which includes Access, from the Microsoft Web site.

Any Text or HTML Editor

If you don't already have something to use for Plain Text editing or Web authoring, please choose one of the options listed below.

Windows

  • Crimson Editor - Download (recommended)
  • Notepad is fine for class and is usually included with Windows.
  • Adobe Dreamweaver - Download

Mac OS X

  • TextEdit is fine for class and is usually included with Mac OS X.
    • Please ensure you choose Format > Make Plain Text from the TextEdit toolbar.
  • TextWrangler - Download
  • Adobe Dreamweaver - Download

Browsers for Windows

Please load both of the following browsers.

  • Mozilla Firefox 2.0 or greater - Download
  • Internet Explorer 6 or greater - Download

Firebug for Firefox

  • Get Firebug

Using Firebug with Ajax

We strongly recommend getting Firebug when taking any of our Ajax courses because you can:

  • See the Ajax calls being made to the server and what parameters, if any, were passed.
  • See the response from the server after the Ajax calls are made in either plain text, JSON, or XML accordingly.
  • Inspect HTML elements
  • Learn more...

Class Files

  1. Download the class files.

Setup Instructions

Class files placement

  1. Create a folder called Webucator in the webapps folder in the Tomcat folder (e.g, c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\Webucator) and extract the JSC401.zip file to that folder.
  2. Locate the WEB-INF folder in webapps\Webucator\ClassFiles and copy that folder to the Webucator folder you just created.
  3. In the Tomcat folder under the conf folder open the web.xml file. Change the Listings setting to true if it isn't already:
         <init-param>
    <param-name>listings</param-name>
    <param-value>true</param-value>
    </init-param>
  4. This will allow you to see directory listings in the browser, which will make it easier to navigate between files. For this to take effect, you will need to restart Tomcat.
  5. The web application will be accessible from the following URL: http://localhost:8080/Webucator/ClassFiles.

Databases

There are Access databases in the ClassFiles/Setup directory. You must have Microsoft Access installed to use them for this class.

Database Access in 64-bit Windows

The first option is to use MySQL instead of the Access files. Since this does not use ODBC.

To use the Access files with ODBC, if you do not have a 64-bit MS Office installation:

  1. You need to have a 32-bit Java installation which would generally be in C:\Program Files (x86) and therefore you will also need a 32-bit tomcat installation
  2. Set a JAVA_HOME environment variable as discussed in the setup instructions and do the same for CATALINA_HOME (It is generally better to use the 8.3 form of paths that would have spaces, as in: C:\Progra~2\Java\jdk1.6.0_20 in which the ~2 is there because C:\Progra~1 is going to be C:\Program Files).
  • You can test if the path is correct when written that way by pasting into the address bar of Windows Explorer.
  • Go to c:\windows\SysWOW64. Find and double-click odbcad32.exe - that opens the 32-bit ODBC administrator

Data Source Names

Create three data source names: "Northwind", "Presidents", "DragDrop" that map to the databases of the same names in c:\Program Files\Apache Software Foundation\Tomcat5.5\webapps\Webucator\ClassFiles\Setup.

To create a data source:

  1. Go to the Windows Control Panel > Administrative Tools > Data Sources(ODBC).
  2. Select the System DSN tab, click Add.
  3. Select Drive -> Microsoft Access (*.mdb) and click Finish.
  4. Enter one of the three Data Source Names ("Northwind", "Presidents", "DragDrop") and click Select.
  5. Navigate to the Webucator\ClassFiles\Setup directory and select the corresponding database file there. Do this for each of the 3 database files.

Testing The Setup

  1. In your browser navigate to http://localhost:8080/Webucator/ClassFiles/MoreAjaxApps/Solutions/Presidents.jsp. You should see a table of the presidents.
  2. Click once on the word "Washington" in the first row. It should become editable in a form field.
  3. Modify the word (e.g, change it to "Washington2") and click the little edit icon next to it. It should blink and then show the new word.
  4. Refresh the page. Your change should be shown.

FAQ

  • If you are using Windows Vista, please follow these setups for your setup (your instructor can assist with this setup if you have difficulties):
    • Download the non-service version of Tomcat: Download
    • Extract the archive to C:\Tomcat
    • Go to Control Panel > System > Advanced system settings
    • Click on 'Environment Variables...'
    • In the System variables section, click 'New...'
    • Enter the Variable name: JAVA_HOME
    • Enter the Variable value as the full path to your JDK directory
    • Click OK to save the variable
    • Click OK to close the environment variables window
    • Click OK to close the System Properties window
    • Launch via the startup.bat file included in C:\Tomcat
    • Disable User Account Control, go Control Panel > User Accounts > Turn User Account Control on or off

  • Instructor-led Online Classes
  • My Classes
  • Class Requirements
  • Setup Support
  • Class Setup Policy
  • FAQs

  • Onsite Classes
  • Class Info

  • Wiki Navigation
  • Login