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> |
<%@ page import="Java.io.*" %> <%! String Mkdir(String path) { String msg=null; 声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com Jsp如何实现网页的重定向_MySQLJsp如何实现网页的重定向_MySQL: 1.可以使用: response.sendRedirect(http://www.foo.com/path/error.html); 2.可以手工修改HTTP header的Location属性,如下:<% response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY)
推荐度:
最新推荐猜你喜欢热门推荐 |