Setup Menus in Admin Panel

3.3 Standard actions

Standard actions

They are used for performing an action during request processing phase of JSP life cycle.

JSP Actions

JSP Actions lets you perform some action.

Directives vs. Actions

  1. Directives are used during translation phase while actions are used during request processing phase.
  2. Unlike Directives Actions are re-evaluated each time the page is accessed.

The following are the action elements used in JSP:

 1. <jsp:include>

Used to include one JSP or html inside another JSP.

<jsp:includepage="page URL"   />

<title>Demo of JSP include Action Tag</title>
<h3>JSP page: Demo Include</h3>

 2. <jsp:forward>

Used to forward the request from one JSP to another JSP.

<jsp:forwardpage="URL of the another static, JSP OR Servlet page"/>
<title>Demo of JSP Forward Action Tag</title>
<h3>JSP page: Demo forward</h3>

 3. <jsp:param>

Used to pass the parameters from one jsp to another jsp

<jsp: paramname="param_name_here"value="value_of_parameter_here"/>
<title>Demo of JSP Param Action Tag</title>
<h3>JSP page: Demo Param along with forward</h3>



 4. <jsp:useBean>

Used to  useJava  Beans in a JSP page, through this tag you can easily invoke a bean.

<jsp: useBeanid="bean instance name"  class="fully qualified class name"scope="some scope" type="type casting"/>

5. <jsp:setProperty>

Used to assign the value to the properties of the java bean class.

<jsp:setPropertyname="bean instance name"property="java bean class property"param="request parameter value" value="any value"/>

 6. <jsp:getProperty>

Used to get the value of  the properties from  the java bean class.

<jsp:getPropertyname="bean instance name"property="java bean class property"/>



public class PersonTO {
private String firstname;
private String lastname;
private String email;
//getters and setters


<td>Enter your first name</td>
<td>Enter your last name</td>
<td>Enter your Email</td>
<inputtype="submit"value="click here"></td>



<h4>Your first Name is <jsp:getPropertyname="pto"property="firstname"/></h4>
<h4>Your Last Name is <jsp:getPropertyname="pto"property="lastname"/></h4>
<h4>Your Email is <jsp:getPropertyname="pto"property="email"/></h4>


January 16, 2016

0 responses on "3.3 Standard actions"

Leave a Message

Your email address will not be published. Required fields are marked *

About Us

Pradeep Academy is an online & Training institute To make learning easy, interesting, affordable and accessible to millions of learners across the Globe. To create an alternative learning platform, using a unique learning methodology of live online interactive courses along with 24x7 support. We aim to empower our customers with skills which will help them get an edge in their careers and improve their lives.

Contact Us

Address :

PradeepIT Consulting Services Pvt Ltd

205,Brigade gardens, No.19 Church Street , Bangalore – 560001, Karnataka, India

Email : [email protected]
Ph No: 08047363377
© Pradeep Academy.  Design & Developed by