Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forward to another app

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • 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!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64606
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, I left /otherapp off the getRequestDispatcher and it went fine. Thanks!

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic