• Post Reply Bookmark Topic Watch Topic
  • New Topic

Best Practice to send a request to 2 destinations?  RSS feed

 
Alex Philippi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am developing a servlet A that receives a HTTP POST request from a client B with a XML Stream as payload. I transform the Stream via XSLT and send the result with httpcommons from apache to a client C. At the same time I am sending the "normal" response back to client B. It sound weird but it works so far.
But I think thats should be a better solution to send the result to the client C. Thats my code for that:



Can someone suggest a better solution?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a custom Tag library to capture the output (in a JSP obviously) and then fork to two locations, in a similar way that many caching techniques do it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!