I just worked out how to solve a problem I was having using EL to print attributes of a VideoData object in the
JSP with ${videoData.title}, but it involved modifying the supplied VideoData.java - is this allowed, or do I need to find some other way round the problem? The instructions for this assignment say I "
can use these files without modification", but do I
have to?
A little context: I was getting a blank page and "javax.el.PropertyNotFoundException: Property 'title' not readable on type com.javaranch.drive.videos.VideoData" in localhost.[today's date].log. The best I could do was print out the output of the object's toString() method, but any attempt to access its properties failed. I added the example Employee class and tried accessing its properties, and that worked fine, so I could then see that the public access modifier was the difference, and once I made VideoData public, it also worked as expected.
Also, I haven't got as far as working with the booleans dvd and vhs, but I noticed that their accessor methods are called inDVD() and inVHS(), shouldn't they be isDVD() and isVHS() in order to work with ${videoData.dvd} and ${videoData.vhs}? So I need to know if I'm able to change these myself or if I have to find another way around it.