Forums Register Login

Exception when Passing Object to JSP from Servlet

+Pie Number of slices to send: Send
Abends in JSP with “Unable to find a value for "reason" in object of class "java.lang.String" using operator "." “ ( I believe I'm getting this because my “histDB” object is null ? Does any one see my problem in the code ? Thanks

Code in Servlet:



Java Class:


Javabean:

+Pie Number of slices to send: Send
You're asking us about some JSP code, but you haven't posted that code. Which makes it a bit difficult...

Anyway the error is saying "You asked me to evaluate the getReason() method on a String". You wouldn't get this error if you tried to evaluate it on a null reference, the JSP processor would just ignore that. So look at your code and find out why you attached ".reason" to a variable which is a String and not a ViewHistDB object.
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1070 times.
Similar Threads
how to explain the change on a object as a parameter
how to pass the values and how to get the Arraylist table from java script function
Passing of an object : example
Question about Mock Exam 2
Setting a session attribute in a servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:14:29.