能帮我解释一下这段jsp程序吗?
String MM_authorizedUsers= "guest ";
String MM_authFailedURL= "noright.jsp ";
boolean MM_grantAccess=false;
if (session.getValue( "MM_Username ") != null && !session.getValue( "MM_Username ").equals( " ")) {
if (false || (session.getValue( "MM_UserAuthorization ")== " ") ||
(MM_authorizedUsers.indexOf((String)session.getValue( "MM_UserAuthorization ")) > =0)) {
MM_grantAccess = true;
}
}
if (!MM_grantAccess) {
String MM_qsChar = "? ";
if (MM_authFailedURL.indexOf( "? ") > = 0) MM_qsChar = "& ";
String MM_referrer = request.getRequestURI();
if (request.getQueryString() != null) MM_referrer = MM_referrer + "? " + request.getQueryString();
MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied= " + java.net.URLEncoder.encode(MM_referrer);
response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
return;
}
[解决办法]
根据get的请求值重新构建URL地址
[解决办法]
验证登录用户的访问权限,如果没有权限访问,则返回到一个错误界面