Logo F2FInterview

JSP Interview Questions

Q   |   QA

If you are planning to include only bare HTML, it’s better to use the #include directive as usual inside the ‘.jsp’ file.

e.g.:

<!–#include file=”data.inc”–>

But it will be different if you are planning to have the server to check the JSP code that is inside the included file.If the data.inc file has the jsp code you may have to have

<%@ vinclude=”data.inc” %>

The <!#include file=”data.inc”> is used for including non-JSP files.

A hidden is one that documents the JSP page but that is not dispatched to the client. The JSP engine normally ignores the hidden comment, and does it does not process any code within hidden comment tags. This useful if you want to document what the JSP does or if you are experimenting with the code.

Expressions are normally mentioned as place holders for language expression, expression is evaluated each time the page is accessed.

It declares one or more variables or methods for use later in the JSP source file. A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as semicolons separate them. The declaration must be valid in the scripting language used in the JSP file.

A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language. Within scriptlet tags, you can declare variables or methods to use later in the file.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: