answersLogoWhite

0

A JSP File Contents:

A JSP file can contain the following:

a. HTML contents

b. JavaScript

c. Java Code

Combining the features of the above 3 mentioned items; we get a powerful entity called the JSP. JSPs are used for the User Interface layer or the more colloquially called Front End layer of any J2EE application.

JSP Skeleton

Below is how a Skeleton JSP File would look like. (The file has to be saved as .jsp)

// Page Imports

<%@ page import = "com.xyz.ClassName %>

// Tag Library References

<%@ taglib URI = "path to Taglib file" prefix = "xx" %>

// here xx refers to the prefix with which the tag library will be referred to

// HTML Head & Title Content

// Java Script Content

// HTML Body & Form Contents

Note: Java code can be placed within the <% %> tags in the body part of the JSP page within the Body tags.

As you can see, a JSP file is pretty straightforward. Also, an important point to note here is the fact that, not all of the entities mentioned above are mandatory. You can include or exclude any of the entities mentioned above, based on your requirement and convenience.

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
JudyJudy
Simplicity is my specialty.
Chat with Judy
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga

Add your answer:

Earn +20 pts
Q: What are the components of jsp?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math