Java page re-direct

末鹿安然 提交于 2019-12-02 08:25:50

When the person hits the page for the first time, throw a flag on the session layer. Then anytime a person comes to the page you can check to see if it exists or not, and redirect them accordingly. Only problem with that is that they have to agree to it every time they visit unless you implement a login system.

P.S. you should be able to get the Session off of the request object you get in that first line. Then just use setAttribute on that session object.

Create a session so you can track whether it's a users first "hitting the method", so you can chose to redirect him to the disclaimer or anywhere else.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!