简体   繁体   English

servlet和代理servlet之间的区别

[英]Difference between a servlet and a proxy servlet

What is the difference between a servlet and a proxy servlet (or in short what does proxy mean in this context)? servlet和代理servlet之间有什么区别(或者简言之,代理在这个上下文中意味着什么)? How/Why routing backend calls though a proxy servlet, instead of http calls, in AJAX/Javascript helps resolving cross domain issues? 如何/为什么在AJAX / Javascript中通过代理servlet而不是http调用来路由后端调用有助于解决跨域问题?

As far as I know, ProxyServlet is the one which does not serve the request by itself but seeks another resource (possibly in the same war/different war/even different machine). 据我所知,ProxyServlet不是自己提供请求而是寻求另一种资源(可能在相同的战争/不同的战争/甚至不同的机器上)。 However, the calling client is unaware of this delegation. 但是,调用客户端不知道此委派。

HTTP Proxy Servet is a nice example of ProxyServlet HTTP Proxy Servet是ProxyServlet的一个很好的例子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM