- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the use of tag in JSP?
The <c:param> tag allows proper URL request parameter to be specified with URL and also does the necessary URL encoding required.
Within a <c:param> tag, the name attribute indicates the parameter name, and the value attribute indicates the parameter value −
Attribute
The <c:param> tag has the following attributes −
Attribute | Description | Required | Default |
---|---|---|---|
name | Name of the request parameter to set in the URL | Yes | None |
value | Value of the request parameter to set in the URL | No | Body |
Example
If you need to pass parameters to a <c:import> tag, use the <c:url> tag to create the URL first as shown below −
<c:url value = "/index.jsp" var = "myURL"> <c:param name = "trackingId" value = "1234"/> <c:param name = "reportType" value = "summary"/> </c:url> <c:import url = "${myURL}"/>
The above request will pass the URL as below - Try it yourself.
"/index.jsp?trackingId=1234;reportType=summary"
- Related Articles
- What is the use of Action in JSP?
- What is the use of jsp plugin action element?
- What is the use of jsp text action element?
- What is the use of Cookie or hidden fields in JSP?
- I want to create a custom tag in JSP. How to write a custom tag in JSP?
- What is the use of page object in JSP? Need an example.
- How to apply if tag in JSP?
- How to apply choose tag in JSP?
- How to apply forEach tag in JSP?
- How to apply forTokens tag in JSP?
- What is the function of action in JSP?
- How can I create custom tag in JSP which can accept attribute from parent jsp page?
- How to use the tag in HTML?

Advertisements