Passing parameters when setting the Refresh HTTP header with setHeader() method in Servlet
问题 I am using setHeader() method to refresh a JSP page as shown below response.setHeader("Refresh", "5; URL=passDebitCard.jsp"); Now I want to send parameters to this passDebitCard.jsp after refreshing for 5 seconds How can I do that? 回答1: You can append GET parameters to the URL like this : response.setHeader("Refresh", "5; URL=passDebitCard.jsp?param1=test1¶m2=test2"); You should also put an absolute path to this URL as a good practice, like this : response.setHeader("Refresh", "5; URL=" +