This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by shaf maff: I typed it. Ignore the small errors. The main message was to outline the struture of the code/how Im doing things..
Please don't waste people's time with sloppy posting. The "small errors" as you call them can be the source of your errors or not. People trying to help you don't know what's real and what's just a result of your unwillingness to put any effort into your questions.
People who volunteer their time to help others will quickly grow tired of such sloppiness and just go on to help others who are putting more effort into their posts.
BTW, what does the note/warning mean and why ignore it ?
What this suggests to me is that for some reason the session is not returning a List (that is, the attribute returned is null, because mail being null would not throw an NPE) Test is probably null. This may be because it is a different Session object somehow. Your best bet is to store some kind of identifier value into the session (as a string) and then look for this value at this line with a debugger. If that value is not a Session attribute, then you do indeed have a different session for the current request and as such may not have the information you require.
As for the warnings, the reason you *have* to ignore this is that the Servlet API has been here for awhile, especially before the Java 5 change. Therefore, it is backwards compatible (for the most part) with previous versions. getAttribute returns Object, which is what it has to return, naturally (you can store anything) but the compiler now warns you that you're doing a potentially unsafe cast (casting it to your List<special> type) because the only safe cast in that situation is a method defined as returning (directly) a List<special> instance.
The other one is a SerializableUID warning, which Eclipse can solve instantly for you (add default serializable id) which creates a private static final long serialVersionUID = 1L; This is because your class implements the Serializable interface, which recommends that a class provide an identifier for its version when being serialized (otherwise, this will be generated by the JVM).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com