I have problem in redirecting a request.
I have one jsp(submitjob.jsp) ,this jsp forward request to a servlet(submitJobHandler.java)which handles all the request send by submitJob.jsp.
Servlet will handle all the task and display a message that "you job is submited ", now I want to redirect to submitJob.jsp after showing this message by servlet (submitJobHandler.java).
plz help me with example to solve this problem.
Thanx in Advance.
Originally posted by Ahmed Shaikh:
Thanx for your reply.
As we are using this forum in it when we post any Question or we reply to any one then after post it took us to a new page and on that page it shows message "please wait we are redirecting to forum".
I want do the same in my application.
plz help ...
You can do the following [pretty sure there are cleaner ways to do this]:
when you are outputting ur message, pass it as a parameter to a JSP which will show that message, plus also will do a timer based redirect to a page that again can be passed as a parameter. Makes sense?
Post a reply, view the source when that page loads, steal the code. Pay particular attention to the part in the HTML header.
Originally posted by David O'Meara:
Here, I'll save you the trouble:
'3' means redirect in 3 seconds. Then have a semicolon and the link that will be redirected to.
Here is some sample code, that uses 3 files: 2 JSPs and 1 servlet.