Programming Tutorials

JSP Tutorials

21. The Session Object in JSP

By: Sathya Narayana : 2010-10-24

Description: The session object is an instance of a class that implements the javax.servlet.http.HttpSession interface. You can use it to store session state for a user, and it makes the following methods available.


22. The Application Object in JSP

By: Sathya Narayana : 2010-10-24

Description: The application object is an instance of a class that implements the javax.servlet.ServletContext interface, and it allows the page to obtain and to set data information about the Web application in which it's running. It makes available the following methods.


23. The Exception Object in JSP

By: Sathya Narayana : 2010-10-24

Description: The exception object is an instance of the java.lang.Throwable class. It's available in error pages only, and it represents the exception that occurred that caused control to pass to the error page. Its most useful methods are as follows.


24. Querying Data with the JSTL in JSP

By: Sathya Narayana : 2010-10-24

Description: To query data with the JSTL, follow these steps:


25. How to create an array and method in JSP

By: Saravanan : 2010-01-01

Description: In this tutorial we are going to see how to create an array and method in JSP. We have to use the scriptlet tag and declaration tag. We can write java comment inside a scriptlet tag. And we can declare the variables inside a declaration tag.


26. IIS and Tomcat - how to configure to work together

By: Emiley J. : 2009-09-01

Description: This tutorial explains how to configure your IIS (in this example IIS 5.0, since I have not upgraded yet) and Tomcat 4.1 xxx version (again since I have not upgraded yet). But the concept should be the same. So if you want to host some JSP files or servlets on your Tomcat which is installed in port 8080 and your IIS is installed on the same machine at port 80 and you want to direct all JSP files also to port 80 so that IIS can forward these queries to tomcat internally and respond. So the user does not have to type 8080 on the url. Well if you want to do that then these are the steps.


27. Drawbacks of the JSP Model 1 Architecture

By: Barbara : 2008-12-09

Description: The Model 1 architecture has one thing going for it: simplicity. If your project is small, simple, and self-contained, it's the quickest way to get up and running. But the previous example, although by no means large or complicated, already illustrates a number of the disadvantages of Model 1 architecture:


28. What are the different scopes in JSP?

By: Barbara : 2008-12-09

Description: The scope of an object describes how widely it's available and who has access to it. For example, if an object is defined to have page scope, then it's available only for the duration of the current request on that page before being destroyed by the container. In this case, only the current page has access to this data, and no one else can read it. At the other end of the scale, if an object has application scope, then any page may use the data because it lasts for the duration of the application, which means until the container is switched off.


29. Automatically Refreshing a JSP

By: Emiley J. : 2008-11-24

Description: The following scriptlet code adds a Refresh header that specifies a 60-second interval for refreshing the JSP. Place this code at the top of the JSP before any content appears:


30. Embedding MP3 audio file in a JSP

By: Bruce W. Perry : 2008-11-24

Description: The embed tag is used to include an audio file with a JSP, so that when a user requests the JSP, the browser plays music. Specifically, the browser is designed to detect the MIME type of the embedded file, then activate a helper application such as QuickTime or RealAudio to handle the embedded file and play the music.