CodesJava

Easy learning with example program codes

jsp:param action tag


The jsp:param action tag is used pass the parameters from JSP to other resource like jsp or servlet.

Syntax: <jsp: param name=”paramName” value=”paramValue”/>

Example:

welcome.jsp

<html>
	<head>
		<title>param action example</title>
	</head>
	<body> 
	  <h3>Hello this is a param action example.</h3>
	  <jsp:forward page="home.jsp">
	     <jsp:param name="websiteName" value="www.javawithease.com"/>
	  </jsp:forward>
	</body>
</html>

home.jsp

<html>
  <head>
	<title>param action example</title>
  </head>
  <body>
    <h4>
     This content is of that resource on which request is forwarded.
    </h4>
    <%
	out.print("Website: " + request.getParameter("websiteName")); 
    %>
  </body>
</html>

web.xml

<web-app>
 
  <welcome-file-list>
          <welcome-file>welcome.jsp</welcome-file>
  </welcome-file-list>	
 
</web-app>

Output:

jsp example 29
 
Download this example.
 
Next Topic: jsp:useBean, jsp:setProperty and jsp:getProperty action tag.
Previous Topic: jsp:include action tag with example.

Related Topics:

JSP action tags with example.
jsp:forward action tag with example.
jsp:include action tag with example.
jsp:param action tag with example.
jsp:useBean, jsp:setProperty and jsp:getProperty action tag.
Exception handling in JSP with example.
JSP Expression Language with example.

 

Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki