to a business logic class EditorService.java. The findEditorData( username ) searches the database and populates the properties of a JavaBean (EditorBean.java)
I got a NULL when tried to retrieve the value of one of the Bean's property in this servlet:
But, it is not possible. Because I had no problem to wrap the EditorBean in a session object:
and then passed the session object to a JSP, got the property from the session object, printed out the value of this property, which was not a null.
Tim Baker
Ranch Hand
Joined: Oct 04, 2003
Posts: 541
posted
0
the thing to do is to look in your work folder (eg tomcat/work) and find the code for getting the bean in a servlet from the JSP you wrote that accessed it
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
JiaPei Jen
Ranch Hand
Joined: Nov 19, 2000
Posts: 1309
posted
0
for getting the bean in a servlet from the JSP you wrote that accessed it.
In my servlet, I tried to get one of the properties of the bean - I got a null. I am not trying to, and I do not want to, get the bean from the JSP. I simply tested to get one of the properties of the bean in a JSP - it was not a null. [ December 06, 2003: Message edited by: JiaPei Jen ]
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
Without seeing the rest of your servlet code I can't be sure, but are you sure it's not a "scope" problem? Check that you don't have two variables called "editor" in your JSP, and that you have definately initialised the editor variable before you use it.