- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4336 Articles for Java 8
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
1K+ Views
include action lets you insert files into the page being generated. The syntax looks like this −Unlike the include directive, which inserts the file at the time the JSP page is translated into a servlet, this action inserts the file at the time the page is requested.
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
966 Views
A declaration declares one or more variables or methods that you can use in Java code later in the JSP file. You must declare the variable or method before you use it in the JSP file.Following is the syntax for JSP Declarations −You can write the XML equivalent of the above syntax as follows − code fragment Following is an example of Object declaration in JSP Declarations −
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
159 Views
A declaration declares one or more variables or methods that you can use in Java code later in the JSP file. You must declare the variable or method before you use it in the JSP file.Following is the syntax for JSP Declarations −You can write the XML equivalent of the above syntax as follows − code fragment Following is an example for JSP Declarations −
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
297 Views
This action lets you insert files into the page being generated. The syntax looks like this −Unlike the include directive, which inserts the file at the time the JSP page is translated into a servlet, this action inserts the file at the time the page is requested.Following table lists out the attributes associated with the include action −S.No.Attribute & Description1pageThe relative URL of the page to be included.2flushThe boolean attribute determines whether the included resource has its buffer flushed before it is included.ExampleLet us define the following two files (a)date.jsp and (b) main.jsp as follows −Following is the content of ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
1K+ Views
A scriptlet can contain any number of JAVA language statements, variable or method declarations, or expressions that are valid in the page scripting language.Following is the syntax of Scriptlet −You can write the XML equivalent of the above syntax as follows − code fragment Any text, HTML tags, or JSP elements you write must be outside the scriptlet. Following is the simple and first example for JSP − Hello World Hello World!
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
339 Views
These are two attributes that are common to all Action elements: the id attribute and the scope attribute.Id attributeThe id attribute uniquely identifies the Action element and allows the action to be referenced inside the JSP page. If the Action creates an instance of an object, the id value can be used to reference it through the implicit object PageContext.Scope attributeThis attribute identifies the lifecycle of the Action element. The id attribute and the scope attribute are directly related, as the scope attribute determines the lifespan of the object associated with the id. The scope attribute has four possible values:(a) ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
166 Views
A JSP life cycle is defined as the process from its creation till the destruction. This is similar to a servlet life cycle with an additional step which is required to compile a JSP into servlet.Paths Followed By JSPThe following are the paths followed by a JSP −CompilationInitializationExecutionCleanupThe four major phases of a JSP life cycle are very similar to the Servlet Life Cycle. The four phases have been described below −JSP CompilationWhen a browser asks for a JSP, the JSP engine first checks to see whether it needs to compile the page. If the page has never been compiled, ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
627 Views
The web server needs a JSP engine, i.e, a container to process JSP pages. The JSP container is responsible for intercepting requests for JSP pages. This tutorial makes use of Apache which has built-in JSP container to support JSP pages development.A JSP container works with the Web server to provide the runtime environment and other services a JSP needs. It knows how to understand the special elements that are part of JSPs.Following diagram shows the position of JSP container and JSP files in a Web application.JSP ProcessingThe following steps explain how the web server creates the Webpage using JSP −As ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
798 Views
Apache Tomcat is an open source software implementation of the JavaServer Pages and Servlet technologies and can act as a standalone server for testing JSP and Servlets, and can be integrated with the Apache Web Server. Here are the steps to set up Tomcat on your machine −Download the latest version of Tomcat from https://tomcat.apache.org/.Once you downloaded the installation, unpack the binary distribution into a convenient location. For example, in C:\apache-tomcat-5.5.29 on windows, or /usr/local/apache-tomcat-5.5.29 on Linux/Unix and create CATALINA_HOME environment variable pointing to these locations.Tomcat can be started by executing the following commands on the Windows machine −%CATALINA_HOME%\bin\startup.bat ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
3K+ Views
Following table lists out the other advantages of using JSP over other technologies −vs. Active Server Pages (ASP)The advantages of JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful and easier to use. Second, it is portable to other operating systems and non-Microsoft Web servers.vs. Pure ServletsIt is more convenient to write (and to modify!) regular HTML than to have plenty of println statements that generate the HTML.vs. Server-Side Includes (SSI)SSI is really only intended for simple inclusions, not for "real" programs that use form ... Read More