×
☰ See All Chapters

param action tag n JSP

The jsp:param element is used in the jsp:include, jsp:forward, and jsp:plugin elements to provide information in the name/value format.

The syntax for the jsp:param action is:

<jsp:param value="Manu Manjunatha" name="name"/>

JSP param action tag example

one.jsp

<html>

<body bgcolor="yellow">

        <jsp:forward page="two.jsp" >

        <jsp:param value="Manu Manjunatha" name="name"/>

        </jsp:forward>

        Hello from first jsp.

</body>

</html>

two.jsp

<html>

<body bgcolor="pink">

        Hello from second jsp.</br>

        <%

        String name = request.getParameter("name");

        out.println("Name: " + name);

%>

</body>

</html>

Output

jsp-param-0
 

All Chapters
Author