by Dinesh Thakur Category: JSP Elements

In this Example we will discuss about how to read text file with the JSP objects. First we create a text file that contains strings in it. In the program we use input and output stream for execute the expression.

 
by Dinesh Thakur Category: JSP Elements

             This Example is use to get the Information about Server’s Information. Like port number, server name.

 
by Dinesh Thakur Category: JSP Elements

In this example we will define that about page counter every time a user visit the page will be counted. In this we made a program where i static click variable initialize and the value declare 0. If any user visit site any tym it will display the visit number. With help of for loop it will increase the visits one by one.

 
by Dinesh Thakur Category: JSP Elements

Jsp expressions known as those kind of expressions that are containing the scripting language values. To Display the expression value we create a HTML tags page that will use to fill the required fields that will be displayed according to need.

 
by Dinesh Thakur Category: JSP Elements

We know servlet program is placed in WEB-INF folder. WEB-INF is a private directory of deployed web application. So any web resource program that is placed in WEB-INF folder or its subfolder (like classes) must be configured in web.xml file to make the underlying container and server recognizing web resource program.



 
by Dinesh Thakur Category: JSP Elements

A JSP program can have two types of objects.

• Explicit objects

• Implicit objects

 
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

A JSP page contains tags. The tags are in the form of scripting tags, directive tags and comments. Tags help programmers to develop Java codeless JSP program. Implicit objects increase the functionality of JSP page. Scripting element also helps in generating dynamic content and displaying dynamic content.

 
by Dinesh Thakur Category: JSP Elements

Life cycle of a program includes the phases starting from creating objects for the class, execution, and at last destruction of objects. For this life cycle, JSP needs some life cycle methods.

 
by Dinesh Thakur Category: JSP Elements

A JSP page mainly comprises the following types of code.

 
by Dinesh Thakur Category: JSP Elements

For web application development JSP generally supports two types of architecture.

 
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

We know that Servlet is a server side technology, so why has Sun Microsystems given JSP?

 
by Dinesh Thakur Category: JSP Elements

There are some problems with Servlet programming.

 
by Dinesh Thakur Category: JSP Elements

JSP technology is the Java Platform Technology (enterprise technology) for delivering dynamic content to web user (the person who is giving request from browser window) in a portable, secure and well-defined way. JSP has been built on top of the Servlet API and utilizes Servlet semantics. It uses HTML and XML templates and Java code to generate JSP page. JSP is secure, fast and independent of server platforms.

 
by Dinesh Thakur Category: Session

In this example we will explain the get status method() this method is referred  to HttpServletResponse interface. The status we set will be diaplayed.

 
by Dinesh Thakur Category: Session

This example will explain that the HttpServletResponse setDateHeader() method is used to set date with header name.in the example we use util package that will allow us to access the mandatory library for date initializing on the web browser as output.

 
by Dinesh Thakur Category: Session

Header Request is a request information that the user make request to the server. This will display the header information like local host name, request path, query generation. Here we made a program that will demonstrate the header information with as output on the web browser. Some packages like enumeration also declared for coding.



 
by Dinesh Thakur Category: Session

HttpSession object allocates memory on the server and remembers client data across the multiple requests in the form of session attribute values. HttpSession object is one per browser window (client) so each HttpSession object can be used to remember client data during a session.

 

Page 3 of 5



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular 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.