35.1 | What is the file name extension of a JavaServer page? How is a JSP page processed ? |
35.2 | Where should a JSP file be placed for it to run from Tomcat? |
35.3 | You can display an HTML file (e.g., c:\test.html ) by typing the complete file name in the Address field of Internet Explorer. Why can't you display a JSP file by simply typing the file name? |
35.4 | What are a JSP expression, a JSP scriptlet, and a JSP declaration? How do you write these constructs in JSP? |
35.5 | Find three syntax errors in the following JSP code: <%! int k %> <% for ( int j = 1 ; j <= 9 ; j++) %> <%= j; %> <br /> |
35.6 | In the following JSP, which variables are instance variables and which are local variables when it is translated in the servlet? <%! int k; %> <%! int i; %> <% for ( int j = 1 ; j <= 9 ; j++) k += 1 ; %> <%= k ><br /> <%= i ><br /> <%= getTime() ><br/> <% private long getTime() { long time = System.currentTimeMillis(); return time; } %> |
35.7 | Describe the predefined variables in JSP. |
35.8 | What is wrong if the JSP scriptlet <% in line 7 in ComputeLoan.jsp (Listing 35.3) is replaced by JSP declaration <%! ? |
35.9 | Can you use predefined variables (e.g., request , response , out ) in JSP declarations? |
35.10 | Describe the JSP directives and attributes for the page directive. |
35.11 | If a class does not have a package statement, can you import it? |
35.12 | If you use a custom class from a JSP, where should the class be placed? |
35.13 | You can create an object in a JSP scriptlet. What is the difference between an object created using the new operator and a bean created using the <jsp:useBean ... > tag? |
35.14 | What is the scope attribute for? Describe four scope attributes. |
35.15 | Describe how a <jsp:useBean ... > statement is processed by the JSP engine. |
35.16 | How do you associate bean properties with input parameters? |
35.17 | How do you write a statement to forward requests to another JSP page? |