如何读取 jsp 中 c:import url 的 header 值
How to read the header values of c:import url in jsp
是否可以在 jsp.
中读取 c:import url 的 header 值
<c:import url="http://test.com/test.jsp/" />
这里的“http://test.com/test.jsp/”是外部的url。我想读取那个外部的 header 值。
Note: The external url have iframe and cross origin policy.
提出您宝贵的建议。
我认为这是不可能的。如果你真的需要包含一些外部内容(+阅读它的 headers),你将不得不在 server-side controller/action 中获取该内容(在那里你将可以访问 headers).
使用 c:import 无法获取 header 值,它仅用于打印 url 源代码。
注意:这是机器对机器的调用。
是否可以在 jsp.
中读取 c:import url 的 header 值<c:import url="http://test.com/test.jsp/" />
这里的“http://test.com/test.jsp/”是外部的url。我想读取那个外部的 header 值。
Note: The external url have iframe and cross origin policy.
提出您宝贵的建议。
我认为这是不可能的。如果你真的需要包含一些外部内容(+阅读它的 headers),你将不得不在 server-side controller/action 中获取该内容(在那里你将可以访问 headers).
使用 c:import 无法获取 header 值,它仅用于打印 url 源代码。 注意:这是机器对机器的调用。