[opencms-dev] Redirect in OpenCms

Marc Schlegel my.mailing.lists at gmx.de
Fri Aug 15 19:30:05 CEST 2008


Uwe König schrieb:
> Hey Marc, 
>
>   
>> Lets say I log in at www.mysite.de, then I navigate to the restricted 
>> area www.mysite.de/restricted/ and then I logout. The next page loaded 
>> is again www.mysite.de/restricted.html instead of www.mysite.de and I 
>> get a error 500.
>>     
>
> Error 500 should leave something in the tomcat-log, e.g. a stacktrace. Have you had a look there and what does it say? 
> Best regards, 
>
>
> Uwe König
>
>   
Ok, I am getting a NullPointerException.
I could find the cause, it is the CmsRequestUtil!?

response = 
org.opencms.flex.CmsFlexController.getController(request).getTopResponse();
response.addCookie(c_username);
response.addCookie(c_password);
response.addCookie(c_edit);
CmsRequestUtil.forwardRequest(cms.link("/"), request, response );  // 
<-- Kills it

I have all the includes I need
<%@page import="org.opencms.util.CmsRequestUtil"%>
<%@page import="org.opencms.flex.CmsFlexController" %>

So I removed the CmsRequestUtil and replaced it by 
response.sendRedirect(cms.link("/")) again, but still I have the problem 
when I am in a restricted subpage the logout isnt redirecting to the 
startpage.

The cookies are also driving me nuts. Whatever I do, they are set in the 
browser but they expire-date is the same as the logindate even though I 
am calling cookie.setMaxAge(60*60*24*365)

regards



More information about the opencms-dev mailing list