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.
this part is in servlet myData is List<String> myData = get the data from java file then in the servlet i call the code to show the jsp file which has the following code to recieve the data from servlet
this part is in jsp List<String> myData = request.getAttribute("myData"); Iterator<String> it = myData.iterator();
but jsp page is now shown gives this error Type mismatch: cannot convert from Object to List
Tomcat 5.5 ships with and uses it's own compiler (JDT from the Eclipse group). This compiler is not fully 1.5 compliant yet so, even if you're using a Java 1.5 JDK/JRE, JSPs compiled by Tomcat won't understand all of the 1.5 features.
Yet another reason not to put scriptlets in JSPs. You can write all the Java 1.5 stuff you like in your servlets, beans, and other Java objects with the current version of Tomcat.