[英]ActionResponse.sendRedirect is not working in Spring Portlet liferay?
我正在使用spring portlet版本(spring 4.1)。
@ActionMapping(param="action=redirectTest")
public void handleRenderRequest(ActionRequest request,ActionResponse response,Model model){
System.out.printIn("the value coming");
response.sendRedirect("https://www.google.com");
System.out.printIn("the value coming");
}
sendRedirect無法正常工作?
檢查Liferay的受限重定向配置,進行相應配置,然后重試。
通過該鏈接,包括默認值和文檔:
對於重定向安全性方法,將此屬性設置為“ ip”或“ domain”。 如果設置為“ domain”,門戶將僅將用戶重定向到屬性“ redirect.url.domain.allowed”中列出的域。 如果設置為“ ip”,則門戶將僅重定向到其IP地址解析為屬性“ redirect.url.ip.allowed”中列出的IP地址的域。 默認值:
redirect.url.security.mode=ip
例子:
redirect.url.security.mode=domain
輸入允許門戶重定向到的以逗號分隔的域的列表。 輸入空白列表以允許任何域。 用前導“ *”指定域。 允許重定向到子域。 默認值:
redirect.url.domains.allowed=
輸入允許門戶重定向到的以逗號分隔的IP列表。 輸入一個空白列表以允許任何IP。 SERVER_IP將替換為主機服務器的IP。 默認值:
redirect.url.ips.allowed=127.0.0.1,SERVER_IP
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.