• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Get ServletContext of a web app hosted in another server

 
Greenhorn
Posts: 12
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Is there anyway i can get the servletcontext of a web app in a server not the same as the one in which the current app is hosted?

For Ex,

WEBAPP A is in WEBSERVER B, and WEBAPP C is in WEBSERVER D.

I need to get the context of WEBAPP C in WEBAPP A.

getServlet().getServletContext().getContext("WEBAPP C") would have got it if WEBAPP C was in server B.

Is there anyway i can set the server to look in first and then get the context after that?

TIA
Sai
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rajani Gummadi,
Your post was moved to a new topic.
 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there anyway i can get the servletcontext of a web app in a server not the same as the one in which the current app is hosted?



Could you let us , why are you attempting for such a thing ?? so taht we can help you achive your requirement . Thnaks .
 
Saiprasad Natarajan
Greenhorn
Posts: 12
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Could you let us , why are you attempting for such a thing ?? so taht we can help you achive your requirement . Thnaks



There is an application on Server1 and another application on Server2. The application starts off from Server1 and in the interim, i need to process some info in Server2 and then back. To process this info, i need the request object from Server1's application.
These 2 apps being on different servers, how do i maintain a session between them?

Passing the required data to server2 through query parameters is not an option since there are too many of them.

I am in the process of trying the HttpProxyServlet (weblogic) but i am not sure if RequestDispatcher can forward requests to app in other servers.

I read something about Coherence in this forum, not sure if that worked for someone?

Thanks
Sai
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Basically for this requirement you need to consider using HttpClient for achiving this .This is a sample program , here as you can see i am passing Object to different server .


Thanks .
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic