时间:2021-07-01 10:21:17 帮助过:15人阅读
response.sendRedirect("http://www.foo.com/path/error.html"); |
<% response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); String newLocn = "/newpath/index.html"; response.setHeader("Location",newLocn); %> |
<jsp:forward page="/newpage.jsp" /> |
<jsp:useBean id="globals" scope="application" class="com.xxx.GlobalBean"/> |
<%@ page import="Java.util.*, Java.text.*" %> <HTML> <HEAD> <TITLE>JSP to display the current time</TITLE> </HEAD> <BODY> The current time is: <% Date now = new Date(); out.println(DateFormat.getTimeInstance().format(now)); %> </BODY> </HTML> |