How to query Date format from oracle DB into JSP using struts
I have a DAO from which I am querying a date. I am unable to display it in JSP field using session.
Here is the set property I have in DAO-
cdfb.setStartDate(rs.getInt("startDate"));
Here is the code I am using now to display in JSP:
<bean:write name="results12" property="startDate" scope="session" />
Plz help me :-(
# 1
What format are you storing the date in? How is a date an int?
How does the variable cdfb get to the JSP? What is the link between that and the been "results12"?
# 2
I am storing in date format in DB. Actually it is not int. code
<b>cdfb.setStartDate(rs.getInt("startDate")); </b> is not a valid statement in DAO class. I don't know how to print a date format result on console from DAO using the above code.
2. cdfb is the instance of the form bean used to set values of variables from result set in DAO.
3. The result is stored in a session results12 (in Action class) using request.setAttribute("results12",coredata);
4. A specific value is printed on the JSP using the code
<bean:write name="results12" property="startDate" scope="session" />
Plz help me.