Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask JSP Expert


Home >> JSP

 

Introduction of Jsp :

Java Server Pages is a server-side programming technology that is enables the creation of the dynamic, platform-independent method for the building Web-based applications. JSP have access to entire family of the Java APIs, including the JDBC API to access the enterprise databases. The Java Server Pages technology allows the Web developers and the designers to the rapidly develop and easily maintain, information-rich, dynamic Web pages that the leverage existing business systems. As part of Java family, JSP technology enables the rapid development of the Web-based applications that are the platform of independent.

What is Java Server Pages :

Java Server Pages is the technology for the developing web pages that support dynamic content which helps the developers insert in the java code in HTML pages by making use of the special JSP tags most of which start with the <% and end with the %>.A Java Server Pages component is the type of Java servlet that is designed to fulfill role of the user interface for Java web application. The Web developers write JSPs as text files that combine to HTML and XHTML code, XML elements and embedded JSP procedures and commands.

Using the JSP you can collect the input from the users through web page forms, present records from the database and another source and create the web pages dynamically. The JSP tags can be used for the variety of purpose, such as the retrieving information from the database and registering user preferences, accessing JavaBeans components, the passing control between the pages and sharing information between the requests and pages etc.

Why Use JSP :

*The Java Server Pages often serve same function as programs implemented using Common Gateway Interface but JSP offer several advantages in the comparison with the CGI.

*Performance is the significantly better because the JSP allows to embedding the Dynamic Elements in the HTML Pages itself instead of having the separate CGI files.

*JSP are always compiled before it is processed by server unlike CGI/Perl which requires to the server to load an interpreter and target of the script each time the page is requested.

*The Java Server Pages are built on the top of Java Servlets API so like Servlets, JSP also has access to all the prevailing Enterprise Java APIs.

*The JSP pages can be used in the combination with the Servlets that handle  business logic, the model supported by the Java servlet template engines.

*JSP is an integral part of the Java EE, a complete platform for the enterprise class applications. That means  JSP can play a part in simplest applications to the most of complex and demanding.

Jsp life cycle :

The key to understanding to the low-level functionality of the JSP is to understand the simple life cycle of Jsp.

JSP life cycle can be defined as entire process from its conception till the demolition which is similar to the servlet life cycle with additional step which is required to the compile JSP into servlet. The four major phases of the JSP life cycle are very similar to the Servlet Life Cycle.

The following are paths followed by the JSP.

*The Compilation

*The Initialization

*The Execution

*The Cleanup

Advantages of the JSP :

Following is list of the other advantages of using the JSP over other technologies.

1.Active Server Pages: Advantages of the JSP are twofold. The dynamic part is the written in Java, not Visual Basic and other MS specific language, so it is more authoritative and easier to the use. Second, it is portable to the other operating systems and the non-Microsoft Web servers.

2.Pure Servlets: It is the more convenient to write regular HTML than to have plenty of the printing statements that generate to the HTML

3.Server-Side Includes: SSI is a really intended for the simple inclusions not for real programs that use form data make the database connections and the like.

4.JavaScript: The JavaScript can generate the HTML dynamically on the client but can only just interact with the web server to perform multifaceted tasks like database access and the image processing etc.

JSP Processing:

The following steps explain how the web server creates a web page using the JSP:

As with  normal page, our browser sends an HTTP request to web server.

*Web server recognizes that the HTTP request is for the JSP page and forwards it to the JSP engine. This is done by the using of URL and JSP page which ends with the .Jsp instead of .the html.

*JSP engine loads the JSP page from the disk and converts it into servlet content. This conversion is very easy in which all template text is renewed to statements and all JSP elements are changed to Java code that implements the equivalent dynamic behavior of the page.

*JSP engine compiles the servlet into the executable class and forwards original request to the servlet engine.

*A part of web server called the servlet engine loads Servlet class and executes it. During the execution, the servlet produces an output in the HTML which is the servlet engine passes to web server inside an HTTP reaction.

*Web server forwards the HTTP response to our browser in the terms of static HTML content.

*Web browser handles the dynamically generated the HTM page inside the HTTP response exactly as if it were the static page.

Common Attributes of Jsp :

There are two attributes that are common to all act elements, the id attribute and scope attribute.

1.Id attribute: id attribute exclusively identifies the Action element and allows the action to be referenced inside JSP page.

2.Scope attribute: That attribute is identifies the lifecycle of the Action element. And the scope attribute has four possible values: that are (1) page, (2)request, (3)session, and (4) application.

Looking for JSP expert? Hire experts for JSP question's answers

Are you looking for the expert's assistance for your JSP job? Finding answers for your JSP problems? Hire today online JSPexpert and start finding your answers. The Mywordsolution offers you valuable service to delivery in solving your problems and the questions through expert's assistance. You will get quality service delivery by the qualified and experienced subject and category experts within the short time span.

Programming,JSP


Recent JSP Questions

No Category Found!
  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro