• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet forwarding  RSS feed

 
Kris Smith
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone got a question for you. Ive been trying to get servlet fowarding between two different .war's in the same .ear file working but cant seem to get it off. The code im useing is as follows...



Now this code resides in my testing.war (the config is there because this is all in cactus). The /testing im trying to access is in my web-commons.war. This will always return null. Do i need to set anything on the server (oracle 10.1.2 ap server) to enable context communication or am i just doing something wrong? Thanks for the help

Kris
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66156
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the J2EE forum which I feel is more appropriate.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I think this sounds like a ClassLoader issue, where the two different Servlets are loaded in two different ClassLoaders.

But that is a guess.

Mark
[ December 07, 2005: Message edited by: Mark Spritzler ]
 
Kris Smith
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above code works fine if i combine the war files so the problem lies in trying to communicate between different contexts. Read several places it was possible but i have no clue how to make it work. Its probably an oracle configuration problem.
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously,each web app. has its own context so in Application A's context you are requesting a handle of a resource located in application B which is not possible.

Shrinivas


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Tomcat you can use the crossContext attribute of the Context element to allow a webapp to obtain RequestDispatchers for other contexts. It's described here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!