October 2002
Beginner
816 pages
23h 32m
English
| A1: | The different types of tags that can be used in a JSP page are directive, declaration, expression, scriptlet, and custom tags. |
| A2: | A directive tag to set the MIME type for sending a GIF image file is
<%@ page contentType="image/gif"> |
| A3: | The include directive tag should be used in this case. Here is an example:
<%@ include file="/myhost/myapp/mySecondJSP.jsp" > |
| A4: | To define global variables in a JSP, that is, variables outside the service() method, the declaration tag should be used. An example of this is given here:
<%! // java variables instantiated here String myStringVar = new String(); int intVar = 0; %> |
| A5: | The simplest tag to use for displaying values in a JSP is the expression tag. An example of this is
Value of ... |
Read now
Unlock full access