This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Then I attempt to retrieve the TableData object in my JSP page like so: <%@ page import="mvcs.*" %> <% .... TableData td = (TableData)session.getAttribute("EnrollTableData"); .... %>
The TableData class is in a directory named mvcs. It exists in two places actually. See the directory structure below. I did include the package statement "package mvcs;" in my TableData.java file.
When I try to access the JSP page I get the following message: The type TableData is not visible
This doesn't make sense to me. TableData is in the same directory as a lot of the other classes I created, and I can access them, no problem. My directory structure is as follows. Maybe this will help?
I'll just add that it would be a good idea for you to try and remove scriptlets from your JSP's. Move all that code to a Servlet and then, if using JSP 2.0, use EL to get to the data. Otherwise you can use JSP tags. And then add JSTL in with that and you are cooking with fire.
I realize that if you are in the learning phases, this might be a lot to take on at once, but the sooner you commit to, the better off you'll be and it will also make it easier to debug your apps in the future since there is a better seperattion of concern (MVC).