CS6320:  SW Engineering of Web Based Systems

 

Exercise 11:  JSP using JSP scriplets

  NOT COLLECTED

You are to create a JSP document that has static HTML and together acts like a slot machine (or lottery machine) game. First you will create another totally static HTML page that will contain a form asking the user for a number. After typing in the number and hitting enter, you will read in this information and then post the URL of the JSP document passing the number entered by the user.

 

Your JSP code will read in this parameter and use it as a seed to a random number generator, this will return a new lottery number in an HTML using some of the static HTML in the JSP document to make it look nice. YOU MUST create a method using JSP declaration statement called generateRandomNumber that takes a seed number and will return a newly created random number for the new lottery number. This method (generateRandomNumber), should be called from within the produced Servlet's _jspService method that is created using JSP scriplets.

 Post your work to your server account and test, then SHOW your work to your instructor for recording towards grade.

© Lynne Grewe