Struts Practice (with solution)

Struts Practice - Consider an auction web application that provides a page like this and allows the user to bid on an item specified by an item ID

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Consider an auction web application that provides a page like this and allows the user to bid on an item, specified by an item ID that the user somehow (we do not care how) obtained. Validate the ID is a legit product ID, assuming model.validID() and similarly validate that the dollar amount is indeed a dollar amount (as opposed to, say, a non- numeric string). Upon clicking “Place Bid”, the business logic of the web application uses a given Integer function model.currentHighestBid(String id) to find out what is the highest current bid placed earlier. • If the current bid exceeds the highest earlier bid the user is sent to the Page B, a sample of which is displayed below. • If it does not (exceed), the user is sent back to Page A, whereas a message like the one shown below also appears. Upon clicking the “Buy” the business logic invokes a boolean function model.buyWithCard(String CreditCard) , which if it succeeds the customer is sent back to Page A and otherwise he is sent back to Page B and a message “Provide another card” is displayed. Ignore validation of the credit card form. Write a struts program that implements the above. You may use any of the given model functions above. Provide the following pieces: - struts-config.xml (we provide a template in the next page so that you do not write tags by hand) - form beans, including validation (if you decide to use validation in form beans – you do not have to) - action beans - html code of page A – you may break it down into more pages if it facilitates the solution....
View Full Document

This note was uploaded on 08/31/2011 for the course CSE 135 taught by Professor Papakonstantinou during the Fall '10 term at UCSD.

Page1 / 9

Struts Practice - Consider an auction web application that provides a page like this and allows the user to bid on an item specified by an item ID

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online