hi,
I have a servlet which redirects the page. when i call it from .shtml using
<servlet code=/...>
</servlet>
it does not redirect the page. however, if i call the servlet directly, say
(just for testing!) server/servlet/test
then it redirects the page!.
where am i going wrong?
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = new PrintWriter (response.getOutputStream());
HttpSession session = request.getSession(true);
// has the member logged in?
Object done = session.getValue("logon.isDone");
if (done == null) {
// save the target and redirect to login page
session.putValue("login.target",
HttpUtils.getRequestURL(request).toString());
// response.sendRedirect(re);
response.sendRedirect("http://news.bbc.co.uk");
System.out.println("redirected");
return;
}
System.out.println("logged user");
}
Many thanks for your time!
roy
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html