This Domain(Admin5.com) is for Sale:

Velocity 的应用示例

时间:2007-10-22  来源:不详  作者:林子

boolean logined = false;

String loginaccount = (String) request.getSession(true).getAttribute("loginaccount");

if (loginaccount != null)

{

logined = true;

}

//default page is mainpagepage = mainPage;

if (requestFunctionName == null||requestFunctionName.equalsIgnoreCase("home"))

{

page = mainPage;

}

//no login , can use these pageelse if (requestFunctionName.equalsIgnoreCase("login"))

{

page = new LoginProcessSubPage();

}

else if (requestFunctionName.equalsIgnoreCase("ChangePassword"))

{

page = new ChangePasswordSubPage();

}

else if (requestFunctionName.equalsIgnoreCase("ForgetPassword"))

{

page = new ForgetPassword();

}

else if (requestFunctionName.equalsIgnoreCase("about"))

{

page = new AboutSubPage();

}

else if (requestFunctionName.equalsIgnoreCase("contact"))

{

page = new ContactSubPage();

}

//for other page, need login firstelse if (logined == false)

{

page = new LoginProcessSubPage();

}

else if (requestFunctionName.equalsIgnoreCase("listProgram"))

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息