JSTL c:param Core Tag

The JSTL <c:param> Core Tag is used with <c:url> and <c:redirect> tags to add the parameters.

Syntax:

<c: param name =”paramName” value=”paramValue” />

c:param tag attributes:

Attribute Description Required
name It specify the name of the request parameter to set in the URL. Yes
value It specify the value of the request parameter to set in the URL. No

Example:

test.jsp

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


	
		c:param JSTL core tag example
	
	
		
			
		
		

Click here

hello.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


	
		c:param JSTL core tag example
	
	
		

This is a c:param JSTL core tag example.

UserName: <%= request.getParameter("userName")%>

web.xml


	
  
          test.jsp
  	


Output:

jsp example 41 first
 
Click on the link.
jsp example 41 second
 
Download this example.
 
Next Topic: JSTL c:redirect Core Tag with example.
Previous Topic: JSTL c:url Core Tag with example.