![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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 9326 Articles for Object Oriented Programming
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
381 Views
A JSP expression element contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file.Because the value of an expression is converted to a String, you can use an expression within a line of text, whether or not it is tagged with HTML, in a JSP file.The expression element can contain any expression that is valid according to the Java Language Specification but you cannot use a semicolon to end an expression.Following is the syntax of JSP Expression −You can write the XML equivalent of the above syntax as ... Read More
![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)
952 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)
155 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)
284 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)
334 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)
162 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)
620 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)
784 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