The problem I am facing is that Beans does not get(retrieve) the properties in a new
JSP page (not the one in which the properties were originally set.). I am using the Model 2 architecture (MVC
pattern). JSP is for View and Beans is the Model,
Servlets control.
I have a form which uses a bean to set all the properties. I want to display these proerties in another JSP page. The problem is when I use <jsp:getProperty...>, it does not retrieve the property; it returns 'null'. what could be the problem?
For eg:-
Let,
Bean Name: CustomerBean
JSP Page 1: GetInfo
JSP Page 2: PrintInfo
JSP Page 1: GetInfo:
<%@ page language="java" session="true" %>
<jsp:useBean id="customer" scope="session" class="CustomerBean" />
<jsp:setProperty name="customer" property="*" />
.
.
//some code
JSP Page 2: PrintInfo:
<%@ page language="java" session="true" %>
.
.
Customer Name: <jsp:getProperty name="customer" property="customerName" /> //(returns 'null')
.
.
//some code
I have checked the classpath, session configuration in
Tomcat(session timeout basically).....nothing helps.
Any idea?
------------------
-------
Raghav.