Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Alma Austin   on May 24 In Java Category.

  
Question Answered By: Perdita Lopez   on May 24

I have a set  up of 2 web  applications in my iPlanet web server,
namely application  A and application B and I would like to pass  a
bean over to a JSP page  in application B.What I did was:

Servlet in Application A:
request.setAttribute("ObjectName",SomeObject);

and in the JSP page in Application B:
(Object)request.getAttribute("ObjectName");

THe object  class resides in both the WEB-INF module  of the web
application. However, I get the ClassCastException error  each time  I
call the JSP in application B. Have I left  out anything in other to
pass the bean  over and cast  it back  to the original  object class?

Since both application have the Object class  in it, I presume that
the class will be loaded once only therefore it should be able to be
cast back to the original class. Am I correct  on this?

Does the Object class needs to reside on application B as well? If it
doesn't, how would I be able to compile  it?

Share: 

 
 
Didn't find what you were looking for? Find more on Passing beans to another web application Or get search suggestion and latest updates.


Tagged: