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?

What is jms administered object, A preconfigured JMS object (a resource man...

A preconfigured JMS object (a resource manager connection factory or a destination) formed by an administrator for the use of JMS clients and placed in a JNDI namespace

Collections, Write a program to proove that HashSet maintains random order

Write a program to proove that HashSet maintains random order

Define class diagram , Class diagram technique is vital within Object Orie...

Class diagram technique is vital within Object Oriented functions. Class diagrams illustrate the kinds of objects in the system and the several static relationships among them. Cl

Forward action and include action, What is the difference among ForwardActi...

What is the difference among ForwardAction and IncludeAction? Ans) The difference is that you require to use the IncludeAction only if the action is going to be contained by ano

Video course on computer security needed, Video course on computer security...

Video course on computer security needed Project Description: We want a video course on computer security. Just like the way lynda provides. Skills required are Computer S

What are the different scopes for java variables, What are the different sc...

What are the different scopes for Java variables? The scope of a Java variable is explained by the context in which the variable is declared. Therefore a java variable can have

What content issues is happened in java language, What Content Issues is ha...

What Content Issues is happened in java language? Some people claim in which Java is insecure since it can show the user erotic pictures and play flatulent noises. By this stan

Life span of variables, While you declare a variable in a function, the var...

While you declare a variable in a function, the variable can be accessed within that function only.  While you exit the function, the variable is destroyed.  These variables are ca

Boolean array, If I have a boolean array that contains 30 elements (boolean...

If I have a boolean array that contains 30 elements (boolean[] fish), how do I go about isolating every 10 elements to use for something specific? Say there are 30 types of fish s

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