Found 177 Articles for JSP

What do the id and scope attribute mean in the action elements in JSP?

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

309 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

Please explain lifecycle of a JSP

Samual Sam
Updated on 30-Jul-2019 22:30:25

150 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

How a JSP page works. Can somebody explains the JSP architecture in simpler terms

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

530 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

How to setup a Web server like Tomcat to test JSP pages?

Samual Sam
Updated on 30-Jul-2019 22:30:25

711 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

What are advantages of using JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

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

What is Java Server Pages, JSP? Why JSP is preferred over CGI?

Samual Sam
Updated on 30-Jul-2019 22:30:25

835 Views

JavaServer Pages (JSP) is a technology for developing Webpages that support dynamic content. This helps developers insert java code in HTML pages by making use of special JSP tags, most of which start with .A JavaServer Pages component is a type of Java servlet that is designed to fulfill the role of a user interface for a Java web application. Web developers write JSPs as text files that combine HTML or XHTML code, XML elements, and embedded JSP actions and commands.Using JSP, you can collect input from users through Webpage forms, present records from a database or another source, and ... Read More

How to avoid Java code in jsp page?

radhakrishna
Updated on 30-Jul-2019 22:30:21

202 Views

You can use JSTL, JSP Standard Tag Library or EL, Expression Language to avoid scriptlets.

Advertisements