friends i am trying to redirect from login page to home page....when login is succeeded...but not able to do this.
I have tried request Dispather
it gives me illigal state exception
and by using

            String site=new String("home.html");
            response.setStatus(response.SC_MOVED_TEMPORARILY);
            response.setHeader("Location", site); 

not able to redirect....plz help me to overcome this problem

Recommended Answers

All 2 Replies

I am not sure about jsp, but I put exit statement after header redirection line.

<?php
    header("location:gopage.php");
    exit;
?>

So Try to exit the page with proper syntax, I hope that will work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.