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?

Inheritance, Your task for this assignment is to define multiple classes vi...

Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various "snacks" including "M&Ms", "Popcorn", etc. To begin, create an a

Functions in javascript, The following set of short questions will focus on...

The following set of short questions will focus on getting you familiar with JavaScript functions. All functions and testing should appear in a single XHTML 1.0 Strict page. All

What is synchronization, What is synchronization and why is it important? ...

What is synchronization and why is it important? With respect to multithreading, synchronization is the potential to control the access of multiple threads to shared resources.

Java identifiers, 1. Which of the following are not valid Java identifiers,...

1. Which of the following are not valid Java identifiers, and why? (a) wolVes (b) United(there is only one) (c) 87 (d) 5 3 (e) Real ale (f) isFound?by 2. A cla

What is meant through semantic error, What is meant through semantic error?...

What is meant through semantic error? It is an error that a developer encounters while a statement is executed but it was not intended through him (the developer). Such errors ar

Explain what is object in java language, Explain what is Object in JAVA lan...

Explain what is Object in JAVA language? They are foundation of object oriented language. They are data structure holds data fields and properties and methods

Thread, what is join in java Thread

what is join in java Thread

Use javascript create some basic client-side validation, The last exercise ...

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. Date & Tim

Nonrecursive implementations of the min() and floor() method, Write nonrecu...

Write nonrecursive implementations of the min() and floor() methods in BST.java. Make sure to use only one return in your method. Use an insertion sort (discussed in class) to s

State the verify phase of java program development, State the Verify phase ...

State the Verify phase of Java Program Development Before the bytecodes in an application are executed by the java interpreter, they are verified by the bytecode verifier in

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