$ cat test3.jsp
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
My JSP 'index.jsp' starting page
<%
Random num = new Random();
int intrand = num.nextInt(180)+20;
Thread.sleep(intrand);
out.println(intrand);
response.sendRedirect("/test.jsp");
%>
阅读(591) | 评论(0) | 转发(0) |