/*
<%@ page import="com.java2s.*"%>
<html>
<head>
</head>
<body>
<h1>Thankyou for your request</h1>
Thankyou for your request for more information.
It will be sent to you shortly.
<%
MoreInfoRequest infoRequest = new MoreInfoRequest();
infoRequest.setCourses(request.getParameter("courses"));
infoRequest.setFirstName(request.getParameter("firstName"));
infoRequest.setLastName(request.getParameter("lastName"));
infoRequest.setEmail(request.getParameter("email"));
// this is the method that will bind an object to a session
session.setAttribute("infoRequest", infoRequest);
%>
<p>Click <a href="displayYourRequest.jsp">here</a> to view your request.
</body>
</html>
*/
package com.java2s;
publicclass MoreInfoRequest
{
public String getFirstName() {
return firstName;
}
publicvoid setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
publicvoid setLastName(String lastName) {
this.lastName = lastName;
}
public String getCourses() {
return courses;
}
publicvoid setCourses(String courses) {
this.courses = courses;
}
public String getEmail() {
return email;
}
publicvoid setEmail(String email) {
this.email = email;
}
private String firstName;
private String lastName;
private String email;
private String courses;
}
<body>
<h1>Your Request</h1>
Here is the information that you submitted to us for processing.
<%
MoreInfoRequest infoRequest =
(MoreInfoRequest) session.getAttribute("infoRequest");
%>
<br>Course name:<b> <%=infoRequest.getCourses()%></b>
<br>Your name: <b><%=infoRequest.getFirstName()%>
<%=infoRequest.getLastName()%></b>
<br>Your email: <b><%=infoRequest.getEmail()%></b>
</body>
</html>