Im new to java web app, JavaEE if I'm not mistaken. it happen that I was task to finished a certain project, while learning Java web app. So I'm not even certain if where am at is right. Here is the dilemma Im facing.
It had a timer on a certain java class. based on the timer count, per couple of seconds, the page is suppose to redirect to another page. To explain further of what I want to achieve, refer to the following:
user opens Page1 after 30 mins redirects to Page2 after 15 minutes redirects to Page3
the timer is set on the java class and not on the jsp file. is there a way that the java class could issue a redirect command to the web browser?
Use JavaScript timeout function and not Java's
setTimeout(function(){ // Set your redirection logic here },(60000 * 10 ));Try this :
response.sendRedirect(request.getContextPath()+"/YourJsp.jsp");
Just looked after my own project. Let's try this:
response.sendRedirect("yourpage.jsp");
No comments:
Post a Comment