Blog

JSP Elements Part 3 – Standard Actions

Actions are XML elements that encapsulate functionality on a JSP page. Programmers can create them and they can be used by the nonprogrammer to introduce dynamic behavior to a JSP page without having any knowledge of Java programming language. For those, non-programmers these will like a new html or xml tag element.

There are two forms of action elements:

  1. standard

  2. custom.

JSP Elements Part 2 - Scripting elements

With the scripting support you can write your own java logic in a JSP page.

There are mainly two forms of scripting in a JSP

  1. Newer Expression Language (EL)

  2. Traditional Scripting

 

Traditional language-based scripting elements

Traditional language-based scripting elements in a JSP are further divided into:

JSP Elements Part 1 - Directives

Directives are elements that provide the JSP translator with directions on how it should treat the JSP page being translated.

Our simplejsp from previous demo had the below page directive in it:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

            pageEncoding="ISO-8859-1"%>

JSP Elements Overview

A JSP page can be said to be divided into two types of contents, which are template text and JSP elements. Template text is any non-java lines like html, comments, javascript, css etc. that are directly sent to the client without any processing. Java code is embedded into JSP pages using scripting elements and these elements will be processed and not directly rendered to the output like template text.

 

JSP elements can be mainly divided into 3 categories:

The JSP Life Cycle Events

JSPs are actually servlets, as you have already seen. Container will convert all jsp files into servlets before executing them. JSPs just provide an easy way to create components containing non-java code.

Once a JSP page is created and deployed, container will do some life cycle events, which also includes calling some of its methods similar to servlet life cycle events.

 

Pages

Quick Notes Finder Tags

Activities (1) advanced java (1) agile (3) App Servers (6) archived notes (2) Arrays (1) Best Practices (12) Best Practices (Design) (3) Best Practices (Java) (7) Best Practices (Java EE) (1) BigData (3) Chars & Encodings (6) coding problems (2) Collections (15) contests (3) Core Java (All) (55) course plan (2) Database (12) Design patterns (8) dev tools (3) downloads (2) eclipse (9) Essentials (1) examples (14) Exception (1) Exceptions (4) Exercise (1) exercises (6) Getting Started (18) Groovy (2) hadoop (4) hibernate (77) hibernate interview questions (6) History (1) Hot book (5) http monitoring (2) Inheritance (4) intellij (1) java 8 notes (4) Java 9 (1) Java Concepts (7) Java Core (9) java ee exercises (1) java ee interview questions (2) Java Elements (16) Java Environment (1) Java Features (4) java interview points (4) java interview questions (4) javajee initiatives (1) javajee thoughts (3) Java Performance (6) Java Programmer 1 (11) Java Programmer 2 (7) Javascript Frameworks (1) Java SE Professional (1) JPA 1 - Module (6) JPA 1 - Modules (1) JSP (1) Legacy Java (1) linked list (3) maven (1) Multithreading (16) NFR (1) No SQL (1) Object Oriented (9) OCPJP (4) OCPWCD (1) OOAD (3) Operators (4) Overloading (2) Overriding (2) Overviews (1) policies (1) programming (1) Quartz Scheduler (1) Quizzes (17) RabbitMQ (1) references (2) restful web service (3) Searching (1) security (10) Servlets (8) Servlets and JSP (31) Site Usage Guidelines (1) Sorting (1) source code management (1) spring (4) spring boot (3) Spring Examples (1) Spring Features (1) spring jpa (1) Stack (1) Streams & IO (3) Strings (11) SW Developer Tools (2) testing (1) troubleshooting (1) user interface (1) vxml (8) web services (1) Web Technologies (1) Web Technology Books (1) youtube (1)