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.
The moose likes Struts and the fly likes Type safety: Unchecked cast from Object to List<String> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply locked New topic
Author

Type safety: Unchecked cast from Object to List<String>

jazy smith
Ranch Hand

Joined: Nov 18, 2009
Posts: 101
Hi all,

I have a jsp scriplet where i wrote this code

List<String> user = (List<String>)session.getAttribute("username") ;

but it says " Type safety: Unchecked cast from Object to List<String>" error. Any idea to resolve it ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63202
    
  69

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
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
 
subject: Type safety: Unchecked cast from Object to List<String>
 
It's not a secret anymore!