• 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

Forward to another app

 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought I saw this question recently, so I apologize if I'm on old ground. A partner system provided an API to us as an EAR & WAR that we deploy on our server. We need to POST to a servlet of theirs. Easy enough from a form in the browser, but I'd like to forward to it. Here's what I tried so far ...

In this case the "other" context and "myapp" context are the same object, and I get a 404. I also tried the full path to the servlet in the getContext.

What's the right way to do this?? Thanks!!
 
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
I've never tried to do this so grain-of-salt this response...

I think that including the context path in your foreign URL may be wrong. You don't include the context path in an in-context forward, so I would think that once you create a dispatcher for the other context that the context path would be superfluous.

Just guessing...

(I assume you've done the appropriate server setup for cross-context access).
[ January 10, 2006: Message edited by: Bear Bibeault ]
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, I left /otherapp off the getRequestDispatcher and it went fine. Thanks!

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic