Likes

WCD-LAB @HOME 6-Ans 2

Invertigate the compilation of JSPs to servlets


                       INVESTIGATE THE COMPILATION OF JSPsto servlets
1.Create a new java Webproject.
 2.Add a little body text tothe JSP.
3.Run the project.
4.Right click the JSP and select View Servlet from the pop-up menu.
5.Examine the contents of thr servlet , and notice how it corresponds to ypur
   original JSP.
6.Make.the following changes to your JSP,and each change ,re-run the
  project,thenexamine the servlet source again.
      a.Add apage initalize declaration for a private int variable.
       b.Add apage dirctive to import java.util.*.
       c.Add an expression to output the result of doubling the private int
              variable you added in stepa above.
     d.Add code to iterate overthe number 1 to 10, prinating a message as a part
        of an unnumberd list each time tround.Be sure to explicit
        curly braces for the loop boudaries.
   e. Edit thenow?Exmine the generated servlet and determine what
      Went Wrong.

      Retrive sessionin information using jsp tags
1.Create a new page called shoe ADDRESS.JSP
2.Using elements of the show Address.jsp page for assistance,create a standalone
   page that shows the currrent values ofa bean called addressBean thst is in the
 session scope.Note that this page will be loaded by typing its URLd directly
  accessiable because it is in the session scope.
3.test the page to show the values from the previous from submission.