- From: Wolfgang Platzer <wplatzer@iaik.tu-graz.ac.at>
- Date: Wed, 15 Apr 1998 11:50:29 +0200
- To: "Jigsaw Mailinglist" <www-jigsaw@w3.org>
I modified Jigsaw to set additional parameters for a request: import test.TestClass; TestClass t = new TestClass(); request.setState("test.test_class", t); and then I wrote a servlet: TestClass tc = (TestClass)req.getAttribute("test.test_class"); But this line always causes a ClassCastException. If I write Object o = req.getAttribute("test.test_class"); System.out.println(o.getClass().getName()); I get test.TestClass. It seems that Servlets use another ClassLoader than Jigasaw. Is this a general Problem with Servlets or is this problem specific to Jigsaw? If I use java.lang.String instead of test.TestClass there is no ClassCastException. Why? Can someone explain this? Wolfgang -- Dipl.-Ing. Wolfgang Platzer Technische Universitaet Graz - University of Technology Graz Institut für Angewandte Informationsverarbeitung und Kommunikationstechnologien Klosterwiesgasse 32/I, A-8010 Graz, Tel: ++43 316 873-5527,Fax: ++43 316 873-5520 URL <http://www.iaik.tu-graz.ac.at/index.html>
Received on Wednesday, 15 April 1998 05:52:26 UTC