[an error occurred while processing this directive]

JSP Tutorials

                         

JSP Tutorials and examples, you will find many examples with working source code.

  1. Introduction to JSP
    Java Server Pages or JSP for short is Sun's solution for developing dynamic web sites. JSP provide excellent server side scripting support for creating database driven web applications.
       
  2. JSP Tutorials - Introducing Java Server Pages Technology
    JavaServer Pages (JSP) technology is the Java platform technology for delivering dynamic content to web clients in a portable, secure and well-defined way.
        
  3. JSP Architecture
    JPS pages are high level extension of servlet and it enable the developers to embed java code in html pages. JSP files are finally compiled into a servlet by the JSP engine. Compiled servlet is used by the engine to serve the requests.
       
  4. JSP Actions
    In this section we will explain you about JSP Action tags and in the next section we will explain the uses of these tags with examples.
       
  5. Introduction to the JSP tags(This section also describe JSP Directives)
    In this lesson we will learn about the various tags available in JSP with suitable examples. In JSP tags can be devided into 4 different types.
      
  6. Detail introduction to JSP Declaratives
    JSP Declaratives begins with <%! and ends %> with .We can embed any amount of java code in the JSP Declaratives. Variables and functions defined in the declaratives are class level and can be used anywhere in the JSP page.
      
  7. Detail Introduction to JSP Scriptlets and JSP Expressions with examples
    JSP Scriptlets begins with <% and ends %> .We can embed any amount of java code in the JSP Scriptlets. JSP Engine places these code in the _jspService() method.
       
  8. Writing the Date JSP
    Till now you learned about the JSP syntax, now I will show you how to create a simple dynamic JSP page that prints the current date and time.
      
  9. Reading the Request Information
    When an HTTP client such as web browser sends a request to a wen server, along with the request it also sends some HTTP variables like Remote address, Remote host, Content type etc.
       
  10. Retrieving the data posted to a JSP file from HTML file
    Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his/her name, let's call it getname.htm.
      
  11. Accessing database from JSP
    In This article I am going to discuss the connectivity from MYSQL database with JSP.we take a example of Books database. This database contains a table named books_details.
                    
  12. Implement JavaScript with JSP
    In this section we are going to implement  insert data, delete data, and update data using with JDBC database and also using of JavaScript.
                                                       
  13. Working with JSP Sessions
    This JSP Tutorial shows you how to track the session between different JSP pages. In any web application user moves from one page to another and it becomes necessary to track the user data and objects throughout the application. JSP provide an implicit object "session", which can be use to save the data specific the particular to the user.
      
  14. JSP Cookies Example
    This tutorial shows how to handle cookies in JSP pages. In this tutorial you will learn how to add cookies through jsp page and then show the value of the same cookie in another JSP page.
               
  15. Cookie Example to Store and Show only 10 values
    This cookie example illustrates how you can manage cookie value in your JSP page. This example is saving and displaying cookies and also it is managing cookies size in such manner that if cookie size becomes greater than a limit (e.g 10 in this case), it will automatically deletes the oldest cookie from the list.
       
  16. Disabling Session in JSP
    In this tutorial you will learn how to disable session creation in the JSP pages. Disabling the session in some pages will improve the performance of your JSP container.
      
  17. JSP PDF books
    Collection is jsp books in the pdf format. You can download these books and study it offline.
      
  18. Free JSP Books
    Download the following JSP books.
      
  19. Free JSP Download
    BooksFree JSP Books for instant downloads.
                   
  20. Authentication in Web Application
    In this example we will show you how to authenticated the user against database user name and password. This program constists of a JSP page and a Servlet to authenticate the user against database password.
             
  21. Calling Servlet to build a List of data from database and show this on the JSP page in table
    In this example we are calling a servet to retrieve all the data from database and then add the data into list. The list is then added to the request object and sen to JSP page. On the JSP page this value is displayed.
                                                                                             
  22. Access all the fields from table through JSP
    This is detailed java program to connect java application with MySql database and execute query to display data from the specified table. Before running this java code you need mysql-connector-java-3.1.6-bin.jar file and set class path to this file.
                                                                                                                 
  23. Use Break Statement in jsp code
    The break statement is used to terminate the execution of near most enclosing loop or conditional statement. Now the next statement outside the loop is executed.
                                                                                                                
  24. Use Compound Statement in JSP Code
    A compound statement is collection of statements enclosed with in braces. In general, statement works without braces but it only execute single statement and rest of the statements takes as normal statement and execute them.
                                                     
  25. Connect JSP with mysql
    Now in the following jsp code, you will see how to connect with the database.
                                                                            
  26. Create a Table in Mysql database through SQL Query in JSP
    This is detailed java code to connect a jsp page to mysql database and create a table of given name in the specified database.
                                                                     
  27. Create dynamic page through JSP
    This is detailed jsp code that shows how to create dynamic page. This code shows one by one record of student from database on click a button named 'next record'. On each click of button, application fetch next record from database.
                                                                               
  28. Retrieve image from mysql database through jsp
    In this section we will see how to retrieve image from MySQL database through jsp code.
                                                                                                                                          
  29. How To Page Refresh Using JavaScript  In JSP
    In this section, we develop an User Login application . We created five file sign.jsp,signout.jsp,user_register.jsp,userlogin.jsp and useradd.jsp. 
                                                                                                                                     
  30. Display Sum of Table Column Using In JSP
    In this section, we develop an application to Display the sum data of a Table column for a specific Date. We created five file sum_count.jsp, resultForm.jsp, result_count.jsp, sumcount.java and SumCountBean.java
                                                                                                                                                         
  31. Combo Box Using Ajax In JSP
    In this section, we develop an  application to Select the Data from database using Ajax in combo box. We created two file combo.jsp and getuser.jsp.
                                                                                                                        
  32. To Upload and insert the file Into Database with Current Date and Time In JSP
    In this tutorial, you will learn how to upload a file through JSP and insert it into the database. For this, we have created two jsp pages page.jsp and upload_page.jsp
              
  33. Calendar In JSP Using JavaScript
    In this section, we develop a Calendar application in JSP using JavaScript.
              
  34. Popup Window using Ajax In JSP
    In this section, we will develop a Popup Window application using Ajax in JSP.
                                                       
  35. User Registration Form Using JSP(JspBeans)
    In this section you will learn about the handling of user registration form using jsp. One of the basic programming tactics of jsp is to assign as much processing as possible to java Bean component.
                                                                
  36. Login Authentication using Bean and Servlet In JSP
    In this section, we have developed a web application of login authentication using Bean  in JSP.  
                                                                                
  37. Record user login and logout timing In JSP
    In this section, we have developed a web application of maintain record of the user Login and Logout Time  in JSP. 
                                                              
  38. Retrieve Data from CSV file in JSP 
    In this section, we have developed a web application of maintain record of the user Login and Logout Time  in JSP.
                                                      
  39. Export Data into CSV file uing JDBC in JSP                                                                               
    In this section, you will learn how to export data into CVS file using JDBC in jsp.
                                                  
  40. Download CSV File from Database in JSP  
    In this section, you will learn how to download CSV  file from database in JSP.  In this example, we have developed two files "viewcsv.jsp" and "file_download.jsp" , code is given below.
                                                        
JSP Versions:
    1. Features of JSP 2.1
      The main purpose of Java Platform,  Enterprise Edition (Java EE) 5 is to ease development. Now the Jsp2.1 includes the Java Standard Tag Library(JSTL) and JavaServerFaces technology.
                                   
    2. New Features in JSP 2.0
      In this tutorial you will know the features added in JSP 2.0.
                                                                   
    3. Difference between JSP 2.0 & JSP 2.1
      In this tutorial you will find the basic difference between JSP 2.0 and JSP 2.1.
                        
JSTL Tutorial By R.S.RAMASWAMY.
Comments on this article may be sent to: ramrsr@rediffmail.com
    1. INTRODUCTION TO JSTL
         
    2. JSTL tags in the core-group
         
    3. JSTL XML Tags
         
    4. SQL tags in JSTL
         
 

JSP Fundamentals
This is an excellent tutorial on JSP for the beginners. Tutorial describes how to use Bean in JSP, Connection Pooling in JSP and the use of taglibs. 

    • JSP Fundamentals
      JSP termed as Java Server Pages is a technology introduced by Sun Microsystems Inc. to develop the web application in more efficient way than Servlets. It has got many advanced features than servlets, one of them itself define the JSP i.e. JSP separates the presentation logic from the business logic and provide the designer and developer of the web application to work independently without any hassle.
         
    • Using Beans in JSP
      Java Beans are reusable components. They are used to separate Business logic from the Presentation logic. Internally, a bean is just an instance of a class.
           
    • JSP Taglibraries
      JSP’s offer a unique feature of “Tag Libraries”. Simply put, these are custom defined JSP tags. They are basically meant for componentizing presentation level logic. They are very similar to beans except the fact that Beans are used to separate Business logic.

 

JSP Examples

  1. Hello World JSP Page
    By this example we are going to teach you that how can you write a "hello world" on your browser. Jsp can be learned very easily. This is just the beginning to learn this exciting language.
     
     
  2. The Page Directive in JSP Page
    This section illustrates you about the page directive of the JSP page which works for the entire JSP page. These directives apply different properties for the page like language support, page information and import etc.
      
  3. The extends Attribute of page Directive In JSP
       
  4. The import Attribute of page Directive In JSP
    This section shows you how to import a java package or the class in your jsp application.
       
  5. The session Attribute of page Directive In JSP
    This section provides you the best illustration of the session attribute of the page directive in JSP. This is the boolean attribute of the directive. It sets a boolean value either true or false.
      
  6. The buffer Attribute of page Directive In JSP
    This section just introduces about the buffer attribute of the page directive in JSP. This attribute sets the buffer size in kilobytes i.e. used by the out object to handle output generated by the JSP page on the client web browser.
      
  7. The autoFlush Attribute of page Directive In JSP
    This section illustrates you about the autoFlush attribute of the page directive in JSP. This is an boolean attribute. This attribute of the page directive supports for flushing buffer automatically when the buffer is full.
      
  8. The isThreadSafe Attribute of page Directive In JSP
    In this section, you will learn about a type of the attribute of the page directive in JSP as known as isThreadSafe attribute.
          
  9. The info Attribute of page Directive In JSP
    This section gives you the introduction about the info attribute of the page directive in JSP. This attribute simply sets the information of the JSP page which is retrieved later by using Servlet.getServletInfo() method.
       
  10. The errorPage Attribute of page Directive In JSP
    This section illustrates you about the errorPage attribute of the page directive in JSP. This attribute sets a url (relative path starting from the "/" which refers from the root directory of your JSP application).
       
  11. The contentType Attribute of page Directive In JSP
    This section gives you the best illustration about the contentType attribute of the page directive in JSP. This attribute specifies the MIME type and the character encoding i.e. used for the JSP response.
      
  12. The isErrorPage Attribute of page Directive In JSP
    This section provides the best illustration of the isErrorPage attribute of the page directive in JSP by providing three JSP pages and it's output. This is a boolean attribute of the page directive.
       
  13. The pageEncoding Attribute of page Directive In JSP
    This section provides the best illustration about the pageEncoding attribute of the page directive in JSP. This attribute specifies the language that the page uses when the page is sent to the browser. This attribute works like the meta tag of the HTML markup language.
       
  14. The isELIgnored Attribute of page Directive In JSP
      
  15. The Include Directive in JSP Page
    This section illustrates you about the include directive of the JSP. You will learn about what is include and how to implement it in the JSP page.
       
  16. How to create a form in JSP
    This section illustrates you about the procedure of the creation of a form through the HTML code in the JSP page. You can simply use the <form></form> tags for creating a from and save the file with the ".jsp" extension.
      
  17. How to handle a form in JSP
    This section teaches you about the creating a from and the procedure of handling the form through the JSP code. This section provides JSP code which used the HTML code for creating a form and this form is handled by the JSP code.
     
  18. Get Method of the Form In JSP
    This section provides you the best illustration of the get method of the form in JSP. The HTTP get method sends data to the server.
      
  19. Post Method of the Form In JSP
    This section provides you the best illustration of the post method of the form in JSP. The HTTP post method sends data to the server from the HTML form elements.
       
  20. What Is Tag Libray In JSP?
    This section provides you the detailed explanation of the Tag Library in JSP. In the Java Server Pages Technology, multiple actions are accessed by using the tags of the JSP whether the tag is standard tag of the JSP or the custom tag that is made by you.
       
  21. Declaring Tag Library In JSP 
    Tag libraries are declared by using the <%@taglib %> directive of the JSP. This tag has some own attributes and it's values are specified attributes specifically of the taglib directive.
        
  22. Request Object In JSP
    This section illustrates more about the JSP implicit object called Request object. This object retrieves values whatever client passes to the server by an HTTP request.
      
  23. getParameter() Method Of The Request Object
    This section illustrates you about the getParameter() method of the request object. This section provides you the best illustration for why the method used or how to use in your JSP application.
      
  24. getParameterNames() Method Of The Request Object
    This section gives you the detailed explanation about the getParameterNames() method of the request object. You will learn more about the procedure of using the getParameterNames() method of the request object.
      
  25. getParameterValues() Method Of The Request Object
    This section illustrates you about the getParameterValues() method of the request object. Here, you will learn more about the getParameterValues() method like what's the need of using the method in your JSP application.
      
  26. getCookies() Method Of The Request Object
      
  27. getQueryString() Method Of The Request Object
    This section describes the getQueryString() method of the request object. Here, you will learn more about the getQueryString() method of the request like what's the need of the method and how to implement it into your JSP application code.
      
  28. getRequestURI() Method Of The Request Object
    This section gives you the detailed explanation of the getRequestURI() method of the request object in JSP. This method is used for getting the information of the URI of the current page of your JSP application.
      
  29. getHeaderNames() Method Of The Request Object
    In this section, you will learn how to get the header name of the host server. This section gives you the brief introduction about the getHeaderNames() method of the request object.
      
  30. getHeader() Method Of The Request Object
    This section gives you the best illustration about the getHeader() method of the request object. Here, you will learn more about the getHeader() method like why is it used and how is it implemented.
       
  31. getAttribute() Method Of The Request Object
    This is the page for the illustration of the getAttribute() method of the request object in JSP. This method retrieves the values corresponding to the given attribute name that is set through the setAttribute() method of the request object.
      
  32. getAttributeNames() Method Of The Request Object
    This section provides you the detailed explanation of the getAttributeNames() method of the request object in JSP. Here, you will learn why this is used and how it is used in the JSP application.
      
  33. setAttribute() Method Of The Request Object
    This section gives you the best illustration about the setAttribute() method of the request object in JSP. This method sets the value of the attribute for the request.
      
  34. removeAttribute() Method Of The Request Object
    This section introduces for the method removeAttribute() of the request object. This method removes the attribute. This method takes a string type parameter i.e. the attribute name that has to be removed.
     
  35. Using  Uppercase To Lowercase Tags of JSTL
    In this section we will learn how to use <fn:toUpperCase> and  <fn:toLowerCase> Tag of JSTL. These tags are used to change case of specified string to upper or lower.
                
  36. Use of <fn:containsIgnoreCase(String, String)> Tag of JSTL
    In this section we will learn how to use <fn:containsIgnoreCase>  Tag of JSTL. This tag is used to check that given string contains the specified sub string or not.
                
  37. Use of <fn:endsWith(String, String)> Tag of JSTL
    In this section we will learn how to use <fn:endsWith>  Tag of JSTL. This tag is used to check that given string ends with the specified sub string or not.
                    
  38. Use of <fn:startsWith(String, String)> Tag of JSTL
    In this section we will learn how to use <fn:startssWith>  Tag of JSTL. This tag is used to check that given string starts with the specified sub string or not. 
         
  39. Use of <fn:escapeXml(String)> Tag of JSTL
    In this section we will learn how to use <fn:escapeXml>  Tag of JSTL. This tag is used to escape characters that could be interpreted as XML markup.
                
  40. Use of <fn:indexOf(String, String)> Tag of JSTL
    In this section we will learn how to use <fn:indexOf> Tag of JSTL. This tag returns index of first occurrence of specified sub string in the given string string.
                                                
  41. Use of <fn:length(String)> Tag of JSTL
    In this section we will learn how to use <fn:length> Tag of JSTL. This tag returns the number of items in a collection, or the number of characters in a string.
                                                 
  42. Use of <fn:replace(String, String, String)> Tag of JSTL
    In this section we will learn how to use <fn:replace> Tag of JSTL. This tag returns a string after replacing the given sub string with specified sub string.
                                                  
  43. Use of <fn:split(String, String)> and <fn:join(String, String)> Tag of JSTL
    In this section we will learn how to use <fn:split>and <fn:join> Tag of JSTL. These tags are used to split and join the specified string according to the given delimeter.
             
  44. Use of <fn:subString(String, int, int)> Tag of JSTL                                     
    In this section we will learn how to use <fn:subString>  Tag of JSTL. This tag returns a subset of a string of specified length. This takes string and integer type as arguments and return string type.
                                                                                       
  45. Use of <fn:substringBefore(String, String)> and <fn:subStringAfter(String, String)>JSTL Tag
    In this section we will learn how to use <fn:substringBefore> and <fn:substringAfter> Tag of JSTL.
                      
  46. Use of <fn:trim(String)JSTL Tag
    In this section we will learn how to use <fn:trim> Tag of JSTL. This tag removes white spaces from both ends of specified string. This takes string type as arguments and return string type result.
                         

       
  47. Response Object In JSP
     
  48. Display image on JSP page using XML
    In this tutorial we are going to know how we can display a image on JSP page by using XML. 
        
  49. Example of printing Text message passed from XML to JSP
    In this tutorial we are going to know how we can pass a text message from XML to JSP.  
        
  50. How to Make a Pdf and inserting data
    In this tutorial you will learn how we can make a pdf file and how we can insert a data into the pdf file. This all be done by using the jsp. 
        
  51. POST METHOD  
    In this example we are going to show how we can make use of the POST in the JSP. After going through this example you will better understand the concept of the POST.
      
  52. Retrieving Data From the XML file 
    In this example we will examine how to parse and expose XML information using the JAXP with a JSP page. This example is only geared towards showing how to construct a Java object from an XML document.
        
  53. JSP With Multiple Forms
    In  this example, you will learn how to make multiple forms in single jsp page. Most of the times people need to use multiple forms on a single page.
               
  54. Implementing JSP and embedding Windows Media Player(wmp)
    Embedding WMP (Windows Media Player) means that you have to attach an external component in your page so that you can play the audio and video files in your JSP page by giving the source path. This will make your JSP page interactive.
             
  55. Connect JSP with mysql
    In this example we will show you how to connect to MySQL database from your JSP code. First, you need to create database and then write jsp code to connect jsp to database.
            
  56. Connect from database using JSP Bean file
    Java Beans are reusable components. It is used to separate Business logic from the Presentation logic. JSP provides three basic tags for working with Beans.
                
  57. Implementing Bean with scriptlet in JSP
    We can use all of the JSP coding while using Java Beans in a JSP page. There are three main kinds of JSP scripting elements in JSP.
                
  58. BodyTagSupport Example
    BodyTagSupport class implements the BodyTag interface and you can add additional functionalities in it to set property of bodyContent. If you want to add other functionalities in this tag then there are some methods which you have to override.
               
  59. Use of Core XML tags in JSP
    Core XML tags provides access to XML data and used to parse these data. There are three tags in this Core XML tag set.
               
  60. XML Transformation in JSP
    This example illustrate use of XML transformation tag in JSP file. This example performs transformation from an XML file to XSLT stylesheet. XML transform tag performs transformation from XML file to XSLT file. 
              
  61. Using JSP in pure XML  generating conforming XHTML
    This JSP example describes how JSP tags for XML can be used in XML generation conforming  XHTML.
            
  62. How to use 'if' statement in jsp page?
    This is detailed java code that shows how to use 'if' statement in jsp page. This statement is used to test conditions. You can understand use of this statement by a real world example.
                           
  63. Custom Tag example with no attribute and no body
    This example demonstrates how one can make custom tag in JSP that has no attribute and no body. There are only handful of tags in JSP which may not be sufficient for each and every working.
                
  64. How to use 'for' loop in jsp page?
    This is detailed java code that shows how to use 'for' loop in jsp page. 'if' statement is used to test conditions while 'for' loop is used to define a loop that reiterates statements.
            
  65. Request header display in a jsp page
    This is detailed jsp code that shows how to display request header information in a jsp page. When user request to the server, the request defines an object to provide client request information to a jsp.
             
  66. How to use 'continue' keyword in jsp page?
    This is detailed java code that shows how to use 'continue' keyword in jsp page. The continue statement skips the remaining statements in the body of the loop for the current iteration, and continues with the next iteration of the  same loop.
              
  67. Submit comments in database when user clicks on submit button
    This is detailed java code to show how to submit comments from a jsp page and insert it to the MySql database when user clicks the submit button of the page.
              
  68. Insert data in mysql database through jsp using prepared statement
    This is detailed jsp code that how to insert data into database by using prepared statement instead of statement. 
                 
  69. How to work with POST method in jsp page
    This is detailed JSP code, how to use POST method instead of GET method in jsp page. GET is default method for sending the request to the server.
                  
  70. Navigation in a database table through jsp
    This is detailed jsp code that shows how to navigate in database. This code shows one by one record of student from database on clicking a button labeled 'next record', so on each click of button application fetches next record from database, this is the navigation in database.
                   
  71. Using Applet in JSP
    Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer.
               
  72. Execute SQL Queries with Java Application
    This is detailed java program to connect java application and execute queries like create table in mysql database, insert some values and retrieve values from the table.
           
  73. How to use email validation check through java script in jsp page
    This is detailed java code that explains how to use java script validator in jsp page. This validator checks for valid email given by the user. 
    valid_email.jsp page has 'onSubmit' attribute, which is set to ValidateForm(), in the html 'form' element. 
                 
  74. How to create and use custom error page in jsp
    This is detailed java code how to create and use custom error page in jsp and display an error message.
               
  75. Custom Iterator Tag in JSP
    This example will demonstrate you how you can make a custom iterator tag in JSP? You can make your own custom tag in JSP which will have functionality as you want to do with them.
              
  76. JSP forward
    This section illustrates you how you can use JSP forward action to forward to servlet.
                
  77. Scripting Variables in JSP Custom Tag
    Scripting variables are variables that are available to the JSP page when any JSP page is called. Scripting variables may be any scripting variables but when we are dealing in reference of JSP page we mean page level variables declared by the JSP page.
                
  78. Use Session to Track User in JSP
    Session tracking is a mechanism that is used to maintain state about a series of requests from the same user(that is, requests originating from the same browser) across some period of time. 
              
  79. How to use switch statement in jsp code
    switch is a type of control statement used to control the flow of program execution. Its body is known as a switch block. The block can have one or more case blocks which contains some statements to be executed when the case is selected.
              
  80. Use multiple catch statement in single jsp
    In java a single try can have multiple catch statements. The code bound by the try block need not always throw a single exception so we can use multiple catches or Exception class (base class of all exceptions). When exception occurs while executing any statement within try block, control enters into the catch blocks until it finds its matching block.
               
  81. How to use multiple declaration in jsp
    JSP provide two ways to declare variables or methods.
             
  82. Joins tables in jsp
    When we want to select data from two or more tables to make our result complete. We have to perform a join between tables. In this example we have two tables stu_info and stu_marks.
            
  83. Create a greeting in jsp
    This is sample jsp code that creates a sample Birthday Greeting in jsp. In the code given below we have used an image with some text message.
           
  84. Include Static HTML Page in JSP
    This example shows how to include static html page in jsp.
              
  85. To Upload and insert the CSV file into Database
    In this tutorial, you will learn how to upload a CSV file through JSP and insert it into the database. For this, we have created two jsp pages page.jsp and upload_page.jsp.
            
  86. Use while loop in jsp code
    While loop is a control flow statement that works repeatedly based on a given boolean condition, loop will continuously execute the statements given in the body as long as a given condition is true.
             
  87. JSP Directives and HTML tags
    JSP directives are as a message from a JSP page to the JSP container that control the processing of the entire page. JSP directives control how the JSP compiler generates the servlet.
               
  88. Declare tag methods in jsp
    JSP is a extended technology to the java servlet that allows to keep separate the dynamic part of your pages from the static HTML. In the code of web page HTML will be as it is but dynamic part is enclosed in special tag , most of which start with "<%" and end with "%>".
            
  89. Embed flash file in jsp page
    In this example, we will see how to embed a flash file in jsp page. In the example given below we have used HTML tag in jsp code to embed flash file.
                
  90. Create Data Grid in JSP page
    This is detailed code that how to create data grid that shows data from database table in jsp page. In this jsp code given below we have used a tag library that provide some tags to create data grid.
             
  91. Setting and getting JavaBean properties in JSP
    This example shows how to set and get properties of java bean class in jsp page.
                  
  92. Update Database Table using JDBC in JSP
    This example shows how to update the existing  record of mysql table using jdbc connectivity in the jsp page. In this example we have created two jsp pages update.jsp and updatingDatabase.jsp.
               
  93. Parsing The XML File using DOM parser in JSP
    W3C (World Wide Web Consortium) started the DOM (Document Object Model) parser, that is the platform independent and language-neutral interface.
               
  94. Parsing The XML File Using JDOM Parser in JSP
    In this example we show how to work with JDOM parser to parse the xml document. JDOM can read existing XML documents from files, network sockets, strings, or from reader.
              
  95. Implementing CSS and JavaScript in JSP File
    This example shows how to implement css and JavaScript in jsp. Here we have created three main files that is cssScript.jsp, validate.js and style.css.
                
  96. Alphabetical DropDown Menu In JSP
    In this section, we have developed an User Search application . We created five file adduser.jsp, addform.jsp, userUpdate.jsp and delete.jsp. 
                
  97. Using Bean Counter in JSP
    In this section you will learn how the counter bean can be used in jsp. As you all know a counter increments the value by one. Here, we will use bean with a jsp .
                  
  98. Use Constructor in JSP
    Constructors are used to initialize the object. They are just like method declaration but they do not return value. Constructors are defined by their class name.
             
  99. Retrieve HTTP Request Headers using JSP
    When a HTTP client sends a request, it is required to supply GET or POST. It can send a number of headers.
              
  100. Request Path in JSP
    We are providing you an example which shows the request path. The HTTPServletRequest interface provides method getRequestURL().
                     
  101. Request Parameters in JSP
    HttpServletRequest interface is responsible for providing request parameters. Request Parameters are the data sent from client to the server side program.
               
  102. Printing a Stack Trace to the Server Console
    When you generate an exception in a program, it will be better to print out the exception stack trace to catch the error instead of debugging jsp pages.
              
  103. Nested If Statement
    Nested If statement means to use the if statement inside the other if statement. Here we are providing you an example using Nested-If statement.
             
  104. JSP Session Parameter rewrite
    JSP session provides methods like getCreationtime(), getLastAccessedTime(), getId(), invalidate(), getMaxInactiveInterval(), setMaxInactiveInterval(), removeAttribute(String name) and setAttribute(String, object) which will provide the session information.
               
  105. How JSP Forwards a request
    The <jsp:forward>  forwards the request information from one resource to the other, for example, one jsp file to other. To forward a request from one page to other, following syntax is required which forwards the request to other page.
              
  106. Getting a Property value in jsp
    To reduce the the scriplet code with jsp, there is an easier way of accessing properties of bean by using getProperty tag which automatically sends the result of the method.
               
  107. Error testing in JSP
    In JSP, you can specify the error page to be invoked when any error or exception is encountered. Exception and error can be handled by using two page directives <%@ page errorPage="errorPage.jsp" %> and <%@ page isErrorPage="true" %>.
                
  108. Multiple form in Jsp
    In this section, we have developed an Multiple form application . We created two file userform.jsp and UserForm.java. 
             
  109. Simple Bank Application in JSP
    In this section, we have developed a simple bank application in jsp . In this application user can Update the User Profile, Cash Transaction, check the account Deposit/Withdraw Cash details and display transaction report  for particular time period.
                
  110. Date Formatter in JSP
    To display the date in different formats, we have used DateFormat class. This class provides methods like getDateInstance(), getTimeInstance() and getDateTimeInstance().
                
  111. Get Column names using Metadata in jsp
    Here we are providing you an example that retrieves all column names from a database table student1. Create a table student1 which contains student_id, student_name and student_address.
                  
  112. Passing Parameters in jsp
    JSP can access the HTTP request object. It provides getParameter() method for retrieving parameter values by name. Parameters can be passed by using a tag <jsp:param>.
               
  113. Display Data from database in Popup Window  Using Ajax in JSP
    In this section, we have developed a application to display data  in pop up window. We created  file view.jsp, windowopen.jsp, getuser.jsp.
               
  114. Insert data in Excel File from Database  using JSP
    In this section, we have developed a application to insert data  in excel file from database in JSP. We created  file SearchUser.jsp, excelData.jsp.
             
  115. Bar Chart
    To draw a bar chart, we have used html tags. In this, firstly create rows with <tr> tag. The tag<td> contains the row data,<div> tag provides the division in a chart.
            
  116. Draw Statistical chart in jsp
    To draw a bar chart, we have used  JFreeChart Library. JFreeChart is a chart library used to generate different variety of charts. Download jar file: jfreechart.jar and jcommon.jar
                 
  117. JSP Paging Example in Datagrid
    In this section, we have developed a web application to create paging in JSP.
            
  118. Download images from Database in JSP
    In this section, we have developed a web application to download images from database in JSP.
             
  119. How to Create JSP Page
    In this section we will show you how you can create JSP page and then test on tomcat server. Creating a new JSP page is very simple and any text editor can be used.
         
  120. How to Open JSP?
    In this section you learn How to Open JSP in text editor. The JSP file is simple text file with HTML code embedded with Java Code. Since JSP is simple text file you can simply open it in notepad.
            
  121. Add and Delete Element Using Javascript in JSP
    In this section, we have developed an application to add and delete element using javascript .
             
  122. Java bean example in JSP
    In this Tutorial we want to describe you a code that help in understanding Java bean example in JSP.This code illustrates the procedure of handling session and print a Hello world using Java Bean.
               
  123. JSP bean get property
    The code illustrate an example from JSP bean get property. In this example we define a package bean include a class Employees. Inside the class we declared a String variable first Name, last Name and address.
                
  124. JSP bean set property
    In this Tutorial we want to describe you a code that help in describing an example from JSP bean set property. The code include a package bean , we have a class Employees.
              
  125. Online Quiz Application in JSP
    In this section, we are going to implement of Online quiz application using of JSP.
              
  126. Implementing Bean with script let in JSP
    This application illustrates how to create a bean class and how to implement it with script let of jsp for inserting the data in mysql table.
           
  127. JSP Window. Open
    JSP Window. Open  is used to open a new window in JSP. The JavaScript function  window.open( ) open a new browser window for the viewer to use.
            
  128. Using JSP in pure XML  generating conforming XHTML
    This JSP example describes how JSP tags for XML can be used in XML generation conforming  XHTML.
              
                   
  129. JSP Write XML
    JSP technology is basically used for building HTML pages with dynamic content but you can use it to generate dynamic content in other formats as well, including XML.
            
  130. JSP User-Agent
    JSP User-Agent is used to display the user-agent. The page displayed you the name of the client requested the page and any refferer.
             
  131. Jsp to Excel
    In this section you will learn how to create an excel file and write data into it using jsp.
             
  132. JSP Request.getContextPath( )
    JSP Request .get Context Path ( ), the context path is the portion of the request URL that indicates the context of the request.
              
  133. JSP for Each
    JSP Error Page is used to specify the custom error page and runtime error occurs with an exception being thrown, the custom error page helps in handling the error page and display a customized view of the exception.
              
  134. JSP Error 500
    JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error that prevent it from fulfilling the request.
                 
  135. JSP Enumeration
    Enumeration, a concept of core java is an object that implements the Enumeration interface generate a series of elements, one at a time. Each call to the nextElement method ( ) will return the successive elements of the series.
              
  136. JSP decode URL
    JSP decode URL is the process of converting all Hex Characters back their normal form. . The Tutorial shows you an example to decode the specific URL.
             
  137. JSP Current Path
    JSP Current Path is used to get the current path of the JSP page.
              
  138. JSP Create Variable
    JSP Create Variable is used to create a variable in jsp. The scriptlets include a java code to be written as <%! %> provided by the jsp.
             
  139. JSP Choose
    In the given example, the c:if tag is used for a decision need, to be made in the page. If the result of processing the test using the EL Expression pageContext.request.method=='POST' is true, the body of the tag is processed otherwise it is skipped.
             
  140. JSP CheckBox
    JSP CheckBox is used to create a CheckBox in JSP. The JSP Page allows the user to select more than one option from multiple checkbox and also print the userdefined message that specify the languages option choosen by the user on submitting the button.
              
  141. JSP Buffered Reader
    JSP Buffered Reader allows the user to read text from character input stream, that provides the efficient reading of character, arrays and lines.
              
  142. JSP Background Image
    The Section of this tutorial helps you to create JSP Background Image on your login page .
              
  143. JSP Back Button
    Jsp Back Button enables the user back to the page from which they just come from.
           
  144. JSP Array Length
    JSP Array Length is performed when you want to compute the length of array in JSP.
             
  145. JSP Array
    Array is defined as the set of similar type of data in series. The Array can be String, int or character kind of datatypes. The below example gives you a demo on use of Array in JSP.
             
  146. JSP Alert
    JSP Alert is used to put the validation on login page for the users. The example in this Tutorial provides you to create the validation on the login form using Javascript method in JSP page. 
                
  147. JSP Absolute Path
    This section demonstrates you to get the absolute path in jsp. The absolute path is the full path that contains the root directory instead of a few directories contained within the absolute path.
               
  148. JSP Variable in Javascript
    JSP Variable in Javascript helps you to pass jsp variable to javascript. The JavaScript include a function that takes the defined variable from the jsp expression and display the message from variable using alert box.
         
  149. JSP SQL Tag
    JSP Variable in Javascript helps you to pass jsp variable to javascript. The JavaScript include a function that takes the defined variable from the jsp expression and display the message from variable using alert box.
              
  150. JSP Request URI
    JSP Request URI is used to return the URI of the current page in jsp. The method request.getRequestURI( ) return you the request object that will return the URI of the current JSP page.
              
  151. JSP redirects
    In this section, you will learn how to redirect a page in JSP. You can see in the given example that we have used the method response.sendRedirect() through which the server sends the response to the client browser, from where the next request comes and it displays that url correctly.
             
  152. JSP Buffer Overflow
    JSP Buffer Overflow is said to be overflow when the attribute 'autoFlush' of buffer is set to false. As you know that anything generated by the JSP page is stored in a buffer.
             
  153. JSP Value to JavaScript
    JSP Value to JavaScript tells you to pass the value from JSP to JavaScript. The JavaScript create a function that accepts the value from the jsp page. 
               
  154. JSP URL Encoding
    JSP URL Encoding is used to encode the url in JSP. URL Encoding is the process of converting string into valid URL format. The valid URL format means that the URL contains alpha, digit, extra, escape characters.
         
  155. JSP Thread Safe
    JSP Thread Safe is used to send only one client request for processing. It is used to implement Single Thread Model interface.
               
  156. JSP System.getProperty
    JSP System.getProperty is performed when you want to view the system properties and display them on the browser.
                    
  157. Jsp Option Value
    In this section, we are going to create a select box by retrieving the value from the database in jsp. For further processing, first of all you need to create a table in the database.
                 
  158. JSP Open File
    JSP Open File is used to create a file and write a text into the file.
                
  159. JSP Modulus
    JSP Modulus is used to determine the modulus of number in jsp. Modulus is the remainder of division operation.
                
  160. JSP Mime Type
    JSP Mime Type for Multipurpose Internet Mail Extension. MIME is a describe technique for attaching files to Internet mail by changing the raw binary files to printable ASCII.
                
  161. JSP Meta refresh
    In this section, you will learn how to use a META tag in the jsp. The META tag with an HTTP-EQUIV attribute controls the action of browsers, by setting the HTTP headers.
               
  162. JSP Locale
    JSP Locale is used to get the preferred locale of the user. A user can configure their browser with a US language locale ("en_US") as the preferred one.
                 
  163. JSP List Size
    JSP List Size is used to get the size of the list. The JSP List Size uses array list object to add the elements and finally return the number of elements are added to the list. 
                
  164. JSP JSTL c:when tag
    In this section, you will learn how to use the jstl when tag in jsp. Basically, the choose, when, and otherwise tags can be used to construct an if statement.
               
  165. JSP JSTL c:if tag
    The c:if tag is used for a decision need, to be made in the page. If the result of processing the test using the EL Expression pageContext.request.method=='POST' is true, the body of the tag is processed otherwise it is skipped.
                
  166. JSP Include Param
    JSP Include Param is used to pass parameter in the include directive. The example uses <jsp:param> clause to pass the parameter name and value to the dynamic jsp page.
              
  167. JSP Include jsp
    This section illustrates you about the <jsp:include> directive in jsp. With the <jsp:include> directive, you can include either a static or dynamic file in a JSP file.
              
  168. JSP Include File
    JSP Include File is used to insert a html file and the text file in the jsp page when the JSP page is compiled. The insert file can be an HTML file, a text file or code file  written in the Java programming language.
                 
  169. JSP Get URL
    JSP Get URL is used to get the url of the current JSP page. The HttpServletRequest interface has a method getRequestURL ( ) that return the url of the current page.
               
  170. JSP get Parameter
    JSP get Parameter is used to return the value of a request parameter passed as query string and posted data which is encoded in the body of request.
                 
  171. JSP Frameset
    The frameset element holds two or more frame elements. Each frame element in itself holds a separate document.
                          
  172. JSP Examples TOC
    Good collection of many Simple JSP Examples.
     
  173. JSP Session Examples
    JSP Session Tutorials Toc.
             
  174. Many JSP Tutorials
    Collection of a large number of JSP Tutorials
                              
  175. File Upload Examples In JSP
    This tutorial is very helpful in the developing the project in which you have to upload any type of files whether single or multiple simultaneously. 
                
  176. JSP And Excel
    This tutorial helps you for performing several operations on the Excel Sheet by using JSP. This section also introduces about a 3rd party APIs provided by Jakarta-Apache Group that is POI.
     
  177. JSP Search Book Example
    Learn how to create database driven application in JSP. In this example we are connecting to MySQL database to perform search.         

                         

[an error occurred while processing this directive]