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:
- Verify that WebSphere® Application
Server is running.
- 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.
- 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.
- 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.
- 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).
- 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.
- Click the Login tab. The Login page opens.
- 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.
- 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.
- Open the Item Details page. The Details page lists the minimum bid, current
bid, and the date when the item is no longer available.
- Click Bid.
- 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.
- 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.
- Click the Sell tab to open the Sell page.
- Enter the information for the item:
- Select the category for the item in the Category list.
- Enter the item name and description in the Item name field.
- Enter the item description in the Description field.
- Enter the lowest, valid bid in the Minimum bid field.
- Enter the item's value in the Estimated value field.
- Select the date for the item to be available for sale in the Start
bidding field.
- Select the item expiration date in the End bidding field.
- Optional: If you have a picture for the item, enter the URLs in the Small
image url and Large image url fields.
- 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.
- Click the Setup link at the top-right corner on
any Auction page. The Setup page opens.
- 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.
- 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:
- Close the Auction Web application in the browser.
- Undeploy the EAR file with the following steps:
- Right-click WebSphere Application Server v6.1 in
the Servers view and click Add and Remove Projects.
The Add and Remove Projects window opens.
- Select the AuctionV60EAR project and click Remove to
remove it from the project list.
- Click Finish, and the Add and Remove Projects window
closes.
- Delete the Auction projects with the following steps:
- Click Window > Other Perspectives > Resource to
switch to the Resource perspective.
- 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:
- Click Help > Samples Gallery. The Samples Gallery
opens.
- Expand Showcase Samples and then click Auction
Web Application.
- Click Import to import the sample again.
- 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:
- Stop the Web server.
- Verify that no other applications are connected to the database.
- Replace the changed database with the copy of the original database.
- 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:
- In the Server view, right-click WebSphere Application Server v6.1
and click Run administrative console. The Administrative
console opens.
- 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.
- Expand Applications and click Enterprise
Applications.
- If AuctionV60EAR is not listed, then you must add the EAR to the application
server.
- If AuctionV60EAR is listed, but not started, then click Start.
- Auction database connected
- 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.
- To configure a data source other than the internal WebSphere Application Server (WAS),
which is preconfigured to run on the WAS 6 test server:
- Switch to the J2EE perspective.
- In the Project explorer, expand Enterprise Applications,
expand AuctionV60EAR, and select Deployment
Descriptor.
- 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.