• 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

Call servlet from Struts Action Class

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have two web applications.One is written using struts and another is written using servlets.I want to call servlet from struts action class.Both are present in different web applications.
In simple words i want to achieve communication between two web applications.Is it possible??

Please help me

Regards,
Surya
 
Sheriff
Posts: 67747
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
You can issue an HTTP request under code control. There are a number of ways to do this but one of the easiest is with a project named HttpClient.

As this is not really a Struts question, I've moved it to a more appropriate location.
 
Surya Kant
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,
Can you elaborate more on how HTTPClient will help me in forwarding request to servlet which is sitting in some other web application of same servlet container?Struts does not provide any solution for this?

Regards,
Surya
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTPClient is used to make web requests. "Calling" another web application from *within* a web application generally requires doing your own communication. If you're just making a request from the client (browser) side to the other application you don't have to do anything.
 
Surya Kant
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thanks for the reply,
Yes i know if call is from client to server i can do it very easily.I dont have to do anything.But my problem is i want to forward the request from one web application to another web application.Is it possible??

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