Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
add logout button to Birt os?
Arif shah
<p>Hi,</p><p> </p><p>I am using Birt open source for reports. I have used tomcat j_security and form based authentication to login to birt reports. However, currently, there is no logout button. I would like to add a button that takes user to a login page and if the user logs in again, redirect him to a default birt report</p><p> </p><p>Can someone please guide me how to do this. Usually if I wanted to logout from a jsp page, I could use this code but not sure how to do it from birt/javascript</p><pre class="_prettyXprint"><%@ page session="true"%>User '<%=request.getRemoteUser()%>' has been logged out.<% session.invalidate(); %><br/><br/><a href="test">Click here to go to test servlet</a></pre><p>Many Thanks</p><p>Arif</p>
Find more posts tagged with
Comments
Arif shah
<p>ok got it sorted. Just create a jsp page and put the following code in it. Then create a button on birt report and redirect to this jsp page..it will logout the session and redirect user to default report..but before that it takes you to the login page</p><pre class="_prettyXprint"><%@ page session="true"%>User '<%=request.getRemoteUser()%>' has been logged out.<% session.invalidate(); %><% // New location to be redirected String site = new String("default report link"); response.setStatus(response.SC_MOVED_TEMPORARILY); response.setHeader("Location", site); %></pre>