• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception when Passing Object to JSP from Servlet

 
Ranch Hand
Posts: 70
IBM DB2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic