The Artima Developer Community
Sponsored Link

Java Buzz Forum
Tomcat 4 Servlet/JSP Classloading Hell

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Joe Shelby

Posts: 101
Nickname: acroyear
Registered: Jun, 2003

Joe Shelby is a senior software developer at ISX Corporation.
Tomcat 4 Servlet/JSP Classloading Hell Posted: Oct 14, 2004 5:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Joe Shelby.
Original Post: Tomcat 4 Servlet/JSP Classloading Hell
Feed Title: Joe's Java Jottings
Feed URL: http://www.blog-city.com/bc/
Feed Description: Notes, observations, and occasional other stuff on Java, with concentrations on Swing, XML, and the Semantic (Object) Web.
Latest Java Buzz Posts
Latest Java Buzz Posts by Joe Shelby
Latest Posts From Joe's Java Jottings

Advertisement
interface I
class X implements I
jsp Y creates instance of class X
jsp Y does request.setAttribute("someI", X);
jsp Y has custom taglibs

custom taglib tag Z (referenced in jsp Y) has code
I theI = (I) request.getAttribute("someI");

ClassCastException ensues.  in spite of everything I try, the "I" class definition in the custom taglib is loaded by a different classloader from the JSP that instantiated the object, so X is not an instanceof I when the taglib java code sees it.

why?

what is the point of making taglibs that can (should) be used to render special objects if you can't cast a reference to that object (or more importantly, an interface that object might implement)?

thanks for any help on this...

Read: Tomcat 4 Servlet/JSP Classloading Hell

Topic: Linking metadata tags would help me with apps like GMail and del.icio.us Previous Topic   Next Topic Topic: Sony gives up on copy protected CDs

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use