Hi,
Sorry for the delayed reply, well the code snippet is given below. In this code, I'm not able to access the userName in the confirmation.jsp if i use request scope. If i use context level scope, I'm able to retreive the username:
========================== Servlet code ==========================
public class RegistrationServlet extends HttpServlet{
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
RegistrationActionForm actionForm = new RegistrationActionForm();
RegistrationAction registrationAction = new RegistrationAction();
String userName=req.getParameter("userName");
actionForm.setUserName(userName);
req.setAttribute("registrationInfo", actionForm);
String status = //Execute the business action
RequestDispatcher rd = null;
if (status.equalsIgnoreCase("success")){
rd = req.getRequestDispatcher("confirmation.jsp");
rd.forward(req, resp);
}
}
}
========================== confirmation.jsp code ==========================
<body>
<jsp:useBean id="registrationInfo" class="com.RegistrationActionForm" scope="application" />
<p align="center">Congrats
<jsp:getProperty name="registrationInfo" property= "userName" />
</body>
[ January 16, 2007: Message edited by: Naveen Sharma ]