Posts Tagged ‘standard action’

Basic Standard Action Tags In JSP Tutorial With Examples JSP Technical Advices

Standard Action Tags In JSP

Standard Action Tags In JSP are meant for performing some action at run time. As the name of the tag itself suggests these tags are used for run time behavior. Unlike scripting tags which are meant for generating related servlet code at the time of translation,Standard Action Tags In JSP generates code for run time behavior.

 

Examples of Standard Action Tags In JSP are as follows :

 

  1. <jsp:include file= ”AnotherJsp.jsp”/>
  2. <jsp:forward file=”AnotherJsp.jsp”/>
  3. <jsp:useBean id=”obj” type=”SomeBean” class=”SomeBean” scope=”request”>
  4. <c:set var=”attrName” value=”attrVal” scope=”request”/>

 

There are so many other tags as well amongst which these are some and important.

Let us take these tags individually as see how do they contribute for Standard Action Tags In JSP

 

  1. <jsp:include file= ”AnotherJsp.jsp”/> : This tag is used for run time inclusion of another JSP page in an existing one. This inclusion is not similar to inclusion with include directive. Include directives are meant for static inclusion. This means that the code from the included JSP will be included int the including JSP at the translation time. But in the case of <jsp:include file= ”AnotherJsp.jsp”/> tag a run time call to the included JSP is done and the response from the included JSP is added to the response of the including JSP.
  2. <jsp:forward file=”AnotherJsp.jsp”/> : This tag is used for forwarding the request to another JSP at run time. The difference here from run time or dynamic inclusion is that here the response from the forwarded JSP only goes to the user and the response from the first JSP from where the forward happens gets flushed out.
  3. <jsp:useBean id=”obj” type=”SomeBean” class=”SomeBean” scope=”request”> : This tag is used to create or fetch a java bean object ,set or get its property value/s and retrieve or set this java bean object in certain scope.
  4. <c:set var=”attrName” value=”attrVal” scope=”request”/> : This tag is used to set an attribute in a particular scope.This is an important tag as our MVC applications rely heavily on attributes
Number of View :1238

Tags: , , , , ,

No Comments



SetPageWidth
Content Protected Using Blog Protector By: PcDrome.

Mahol Dot Org is Stephen Fry proof thanks to caching by WP Super Cache