JSP – Param Action Tag

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”/>

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.ameerpettech.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>
Scroll to Top