What are the basic components of jsp?, JAVA Programming

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.

 

Posted Date: 7/25/2012 4:02:47 AM | Location : United States







Related Discussions:- What are the basic components of jsp?, Assignment Help, Ask Question on What are the basic components of jsp?, Get Answer, Expert's Help, What are the basic components of jsp? Discussions

Write discussion on What are the basic components of jsp?
Your posts are moderated
Related Questions

? • ?read from a file a series of an infix algebraic expressions comprised of constant and variable operands (integers), operands (%, *, /, +, -) and parenthesis. Two slashes (//)

Why are JSP pages the preferred API for creating a web-based client program? Because no plug-ins or security policy files are required on the client systems (applet does). Also,

there is a pebble merchant. he sells the pebbles,that are used for shining the floor.his main duty is to take the length of the room side but he sometines mistakes doing that and m

To load a text-file, read it line by line, and return the total number of alphanumeric tokens it contains and skip over the comments and double-quoted strings in the text-file whil

Project Description: We prepare and operate smartphone application.(Picture sharing and social networking) But there are problems in server side. It's very slow. So we

n this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, such

What is heuristic? Heuristic is a procedure which commonly, but not always, works or that provides nearly the right answer.

Define the key weakness of the web? the key weakness of the web is Initially web was designed only for humans to read not for computers to understand it.

I have a GUI assignment due Friday noon and i can''t get my hand on it will anyone be able to solve it to me and what is the cost?