What are the basic components of jsp?, JAVA Programming

Assignment Help:

There are two different types of data in a JSP page.

1. Static part which occurs copied directly to the response by the JSP Engine.

2. Dynamic part, which have anything that may be compiled and translated by the JSP Engine.

There are three basic types of dynamic components. (TIP: remember SAD as an abbreviation for Scripting, Directive elements, and Action).

Declaration component: is the embedded Java declaration statement, which gives inserted at the Servlet class level.

<%! Calendar c = Calendar.getInstance(); %>

 Can you define a method within your JSP page?

You can define methods within your JSP pages as declarations, and your methods may be called from within your other methods you define, scriptlets or expression elements. Those declared functions do not have direct access to the JSP implicit objects like response, request, session etc but you may pass them to your functions you declare as parameters.

Expression Element: is the embedded Java expression, which gets solved by the service method.

<%= new Date() %>

Scriptlet Element: are the embedded Java statements, which get performed as part of the service function.

<%

            String username = null;

username = request.getParameter("firstName"); //"request" is a JSP implicit object

%>

Action components: A JSP element that gives information for execution phase.

 


Related Discussions:- What are the basic components of jsp?

Simple Java Project Please help, I have a project due tonight and I need he...

I have a project due tonight and I need help setting up the project I know what I need to put in the class but not sure how to set it up properly

What is actionform, An ActionForm is a JavaBean that extends org.apache.str...

An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm.  ActionForm handles the session state for web application and the ActionForm object is automatically p

Synchronization and its importance, What do you mean by synchronization an...

What do you mean by synchronization and its importance?

Retrieving file records randomly, how to retrieve multiple records randomly...

how to retrieve multiple records randomly from a file and store it in another file

Need java, Need JAVA,SPRING,JSF(primefaces) Application Support Project ...

Need JAVA,SPRING,JSF(primefaces) Application Support Project Description: We want someone to be part of our team's new development, it's minute application but in future, cha

Calculate the kilometer within an hour, Calculate the kilometer within an h...

Calculate the kilometer within an hour? class Car { String licensePlate = ""; // e.g. "New York 543 A23" double speed = 0.0; // in kilometers per hour doubl

Code, Write a programme to create a webpage that prints the name of the STU...

Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa

What are the two important tcp socket classes, Socket and ServerSocket. Ser...

Socket and ServerSocket. ServerSocket is used for normal two-way socket communication. Socket class permits us to read and write by the sockets. getInputStream() and getOutputStrea

Heap and Stack memory allocation in java, Each time an object is started in...

Each time an object is started in Java it goes into the area of memory named as heap. The primitive variables like double and int are allocated in the stack, if they are local inst

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd