Has error when use response object in JSP rule
I have created a jsp rule and add the code as below:
<%
String site = new String("http://XXX");
response.setStatus(response.SC_MOVED_TEMPORARILY);
response.setHeader("Location", site);
%>
The code has run and display successfully in eclipse.But it has error msg in pega when I save the jsp rule:
response.setStatus(response.SC_MOVED_TEMPORARILY);
^^^^^^^^
response cannot be resolved
Can't I use response object in jsp pega rule?If I have to modify my code and how?