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.

JSP Actions

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. We will also show how to use JSP Action Tags in the JSP application.

What is JSP Actions?

Servlet container provides many built in functionality to ease the development of the applications. Programmers can use these functions in JSP applications. The JSP Actions tags enables the programmer to use these functions. The JSP Actions are XML tags that can be used in the JSP page.

Here is the list of JSP Actions:

  • jsp:include 
    The jsp:include action work as a subroutine, the Java servlet temporarily passes the request and response to the specified JSP/Servlet. Control is then returned back to the current JSP page.
      
  • jsp:param 
    The jsp:param action is used to add the specific parameter to current request. The jsp:param tag can be used inside a jsp:include, jsp:forward or jsp:params block.
     
  • jsp:forward 
    The jsp:forward tag is used to hand off the request and response to another JSP or servlet. In this case the request never return to the calling JSP page.
      
  • jsp:plugin 
    In older versions of Netscape Navigator and Internet Explorer; different tags is used to embed applet. The jsp:plugin tag actually generates the appropriate HTML code the embed the Applets correctly.
      
  • jsp:fallback 
    The jsp:fallback tag is used to specify the message to be shown on the browser if applets is not supported by browser.
    Example:  
     <jsp:fallback>
      <p>Unable to load applet</p>
     </jsp:fallback>
      
  • jsp:getProperty 
    The jsp:getPropertyB is used to get specified property from the JavaBean object.
      
  • jsp:setProperty 
    The jsp:setProperty tag is used to set a property in the JavaBean object.
      
  • jsp:useBean 
    The jsp:useBean  tag is used to instantiate an object of Java Bean or it can re-use existing java bean object.

In the next sections we will learn how to use these JSP Actions (JSP Action tags).