Running and exploring the Auction sample

After you start the server, you can run and explore the application.

You can perform the following tasks with the Auction Web site application:
  • Running the application To run the application, you must deploy it.
  • Exploring the Auction Web site You can run the application and explore its functionality.
  • Removing the Auction sample You can remove the imported Auction sample, including the project.
  • Reinstalling the default Auction sample You can re-install the Auction sample overwrite any changes and to restore it to its default state.
  • Verifying the Auction application is running If the application does not appear to be running, you can verify that it has started.

Running the application

To run the application:
  1. Verify that WebSphere® Application Server is running.
  2. In the Project Explorer, right-click the AuctionV60Web project, and click Run As > Run on Server.
The Auction home page opens in the internal browser. Note that this may take a few moments as the JSP files are compiled the first time it runs. If you want to run the sample in an external browser, use this URL: http://localhost:9080/AuctionV60Web.

Exploring the Auction Web site

The Auction Web site is a functioning Web site. You can perform the following tasks:
  • Finding Auction items You can find items in the catalog by searching for specific items.
  • Logging in to the Auction Web site Although you can browse for items on the Auction Web site without logging on, you must log in as a user or administrator to perform other tasks.
  • Bidding on Auction items You can bid on items in the Auction catalog.
  • Selling items on the Auction Web site You can add items to the Auction Web site catalog.
  • Changing item expiration dates You can change the expiration date for the items in the catalog.

Finding Auction items

You can find items in the catalog by searching for specific items or searching by the maximum price for items.
  1. To search for specific items by keywords, do one of the following steps:
    • On the Auction home page, enter the search keyword in the Enter search words field, and click Go.
    • Click the Browse tab, then enter the search keyword in the Search descriptions field, select Expiration or Value to specify the order in which to list the search results, and click Go.
  2. To find all the items available for less than a specific amount, click the Browse tab, enter the maximum amount in the Maximum price field, select Expiration or Value to specify the order in which to list the search results, and click Go. The search engine searches item descriptions.
  3. To see all the items in a category, on the Home page, click the desired category. The Items List displays the items that meet the search criteria or are in the selected category, including item description, value, item expiration date and image (if available).
  4. Click the item. The Item Details page opens and displays the item number, name, and description, and the bidding information.

Logging in to the Auction Web site

Although you can browse for items on the Auction Web site without logging in, you must log in as a user or administrator to perform all other tasks.
  1. Click the Login tab. The Login page opens.
  2. To bid on items or add items for auction, log in as a user. Enter jack@acme.com or jill@xyz.com in the Userid field and enter jack for Jack's password or jill for Jill's password in the Password field.
  3. Click Go.

Bidding on Auction items

You can bid on items in the Auction catalog.

Prerequisite: To bid on an auction item, you must first log in to the site. You can log in before finding the item or when you start to bid. You must also Find the item for which you want to bid.
  1. Open the Item Details page. The Details page lists the minimum bid, current bid, and the date when the item is no longer available.
  2. Click Bid.
  3. Enter a single bid amount in the Bid field. The bid values are managed through JSF validation functions. Bids must be at least one dollar more than the current bid and be a whole dollar value. For example, if you enter 26.01, the application truncates the value to 26.
  4. Click Go.

Selling items on the Auction Web site

You can add items to the Auction Web site catalog.

Prerequisite: To sell an auction item, you must first log in to the site.

  1. Click the Sell tab to open the Sell page.
  2. Enter the information for the item:
    1. Select the category for the item in the Category list.
    2. Enter the item name and description in the Item name field.
    3. Enter the item description in the Description field.
    4. Enter the lowest, valid bid in the Minimum bid field.
    5. Enter the item's value in the Estimated value field.
    6. Select the date for the item to be available for sale in the Start bidding field.
    7. Select the item expiration date in the End bidding field.
    8. Optional: If you have a picture for the item, enter the URLs in the Small image url and Large image url fields.
  3. Click Go to add the item to the catalog listing.

Changing item expiration dates

By default, the expiration date for all items shipped in the original database is set for Jan 2009. You can reset these dates.

  1. Click the Setup link at the top-right corner on any Auction page. The Setup page opens.
  2. In the Duration field, enter the duration for how long you want the item to be listed in the auction before they expire. You can specify 1 to 99 days from the currently displayed date. For example, if the currently displayed date is 04/15/07 and you specify 30 days for the expiration date change, then the expiration dates for all the items in the catalog change to May 15, 2007.
  3. Click Initialize Database. The expiration for all the items changes based on the number of days specified.

Removing the Auction sample

To remove the Auction sample:
  1. Close the Auction Web application in the browser.
  2. Undeploy the EAR file with the following steps:
    1. Right-click WebSphere Application Server v6.1 in the Servers view and click Add and Remove Projects. The Add and Remove Projects window opens.
    2. Select the AuctionV60EAR project and click Remove to remove it from the project list.
    3. Click Finish, and the Add and Remove Projects window closes.
  3. Delete the Auction projects with the following steps:
    1. Click Window > Other Perspectives > Resource to switch to the Resource perspective.
    2. In the Navigator view, delete the following projects:
      • All projects whose names start with "AuctionV60"
      • OIDGenerator
      • OIDGeneratorClient

Reinstalling the default Auction sample

Prerequisite: You must first remove the sample before you can re-install it.

To re-install the Auction sample, use these steps:
  1. Click Help > Samples Gallery. The Samples Gallery opens.
  2. Expand Showcase Samples and then click Auction Web Application.
  3. Click Import to import the sample again.
  4. Click Setup Instructions and follow the instructions to set up the sample again.

Note: The auction database is not re-installed and will have the same data.

If you made a copy of the database plugin, com.ibm.etools.auction.sampledb_6.0.0/db/AUCTION60, and placed it in another directory, you can restore it.

To restore the default database, use these steps:
  1. Stop the Web server.
  2. Verify that no other applications are connected to the database.
  3. Replace the changed database with the copy of the original database.
  4. Restart the Software Development Platform with the -clean option.

Troubleshooting the Auction application

If the application does not appear to be running, check the following items:
Server is running
To verify the server is running, search the Console view for the string "Server server1 open for e-business".
Autobuild is enabled
To verify that Autobuild is enabled, click Project > Build Automatically. If it is not enabled, click Project > Build All to build all the project files and redeploy.
Web application is running on the application server
To verify that the Web application is running on the application server:
  1. In the Server view, right-click WebSphere Application Server v6.1 and click Run administrative console. The Administrative console opens.
  2. Enter a user ID in the Userid field, and then click Log in. This user ID is used to identify who made changes. It also appears in messages.
  3. Expand Applications and click Enterprise Applications.
  4. If AuctionV60EAR is not listed, then you must add the EAR to the application server.
  5. If AuctionV60EAR is listed, but not started, then click Start.
Auction database connected
  1. If another tool is connected to the database, stop the other tool. If you don't know which tool is connected to the database, restart the Software Development Platform.
  2. To configure a data source other than the internal WebSphere Application Server (WAS), which is preconfigured to run on the WAS 6 test server:
    1. Switch to the J2EE perspective.
    2. In the Project explorer, expand Enterprise Applications, expand AuctionV60EAR, and select Deployment Descriptor.
    3. Select the Deployment tab, and then select Derby JDBC Provider in the JDBC provider list. The datasource path is under Resource properties defined in the data source selected above in the Value column.
Parent topic: Auction Web application

Feedback