response.sendRedirect...

Hello,

The code belove shows a part of my project. When I debug it, i see that altough response.sendRedirect executes, the flow goes on the other lines. I think it should redirect to the wanted page and goes on from there.. but it doesn't...

Object o = session.getAttribute("user");

UserBean user =null;

if (o==null)

response.sendRedirect(request.getContextPath());

else

user = (UserBean)o;

if (request.getParameter("kime")==null)

out.println("(*) needed");

[793 byte] By [xyzta] at [2007-11-27 6:45:25]
# 1
You're just giving the response the command that it should send a redirect. It certainly does not promptly abort the rest of the method. Just add a return statement right after response.sendRedirect().
BalusCa at 2007-7-12 18:17:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...