You are here:   HomeJava Server Pages
by Dinesh Thakur Category: JSP Elements

The intention is to introduce the communication in between the servlet and JSP. The welcome page is designed by the HTML code.



 
by Dinesh Thakur Category: JSP Elements

Standard syntax

<% @ include file= "desturl" %>

 
by Dinesh Thakur Category: JSP Elements

Standard syntax

<j sp: forward page= "desturl" />

 
by Dinesh Thakur Category: JSP Elements

There are some problems with Servlet programming.



 
by Dinesh Thakur Category: JSP Elements

When we send any request to the JSP program from the browser window, we pass the request URL in the browser window. In this process to send the data along with the request, the programmer also requires adding the query string to request URL explicitly. But this task is highly of technical. For that a graphical user interface is required which can generate a request which mayor may not hold the data. For this purpose, the programmer can use either HTML form or hyperlink to generate the request with or without data. The example of HTML to JSP communication is given below:

 
by Dinesh Thakur Category: JSP Elements

Supports tags based programming

JSP supports tag-based programming. As it is a tag-based programming extensive knowledge of Java is not required. Non-Java users can learn it easily. This tag increases the readability of code. Gives built-in JSP tags and also allows to develop custom JSP tags and also to use third party supplied JSP tags.



 
by Dinesh Thakur Category: JSP Elements

JSP comment

Used for commenting JSP tags base code (or JSP code) of JSP program. A JSP page compiler recognizes JSP comments. As JSP comments are visible in source, code of  JSP program and not visible in any other process of JSP program execution so these are called hidden comments. They are written like this:

 
by Dinesh Thakur Category: JSP Elements

When the bill amount exceeds Rs. 1000 then else part of calc.jsp gets executed and it forwards the request to discount.jsp page .

 
by Dinesh Thakur Category: JSP Elements

A JSP program can have two types of objects.

• Explicit objects

• Implicit objects

 


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular