Java Server Pages Chapter 10: Sharing Data Between: JSP Pages, Requests, and Users
Java Server Pages Chapter 10: Sharing Data Between: JSP Pages, Requests, and Users
<body>
<form action="Welcome.jsp">
Enter your Name :
<input type = "text" name = "name" size="25"><BR/> <BR/>
<input type="submit" value ="Submit"/>
</form>
</body>
</html>
<body>
Hello ${param.name}
</body>
</html>
<body>
<form action="WelcomeUser.jsp">
Enter your Name :
<input type = "text" name = "name" size="25"><BR/> <BR/>
<input type="submit" value ="Submit"/>
</form>
</body>
</html>
<body>
Hello ${param.name}
<form action="DisplayUserInfo.jsp">
Which Product do you wish to buy?
<input type = "text" name = "product" size="25"><BR/> <BR/>
<input type = "Submit" name = "submit" value="Submit"> <BR/>
</form>
</body>
</html>
<body>
Hello ${param.name}
<c:set var="name" value="${param.name}" scope=“session”/>
<form action="DisplayUserInfo.jsp">
Which Product do you wish to buy?
<input type = "text" name = "product" size="25"><BR/> <BR/>
<input type = "Submit" name = "submit" value="Submit"> <BR/>
</form>
</body>
</html>
<body>
Hello <c:out value="${name}" /> <BR/>
You have ordered <c:out value="${param.product}" />
</body>
</html>