Tuesday, November 16, 2010

How can i redirect to a servlet from a jsp page?

%26lt;script type=';text/javascript';%26gt;

function display_c(start){

window.start = parseFloat(start);

var end = 0 // change this to stop the counter at a higher value

var refresh=1000; // Refresh rate in milli seconds

if(window.start %26gt;= end ){

mytime=setTimeout('display_ct()',refre鈥?br>
}

else {

alert(';Time Over for this question.Press NEXT.';);

}

}



after this alert message i want to redirect to a servlet....... how can i do this...... and this javascript is written in a jsp page...... pls help me how can i redirect to a servlet after this alert message..its urgent..pls help me out..How can i redirect to a servlet from a jsp page?
You do NOT have to ask the same question 3 times...



%26lt;script type=';text/javascript';%26gt;

...

location.href = ';yourServletURL';;

%26lt;/script%26gt;

No comments:

Post a Comment