Results 1 to 3 of 3
Thread: unable to do log out process
- 01-17-2012, 10:46 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 2
- Rep Power
- 0
unable to do log out process
hello every one,
i am trainee in one of the it company.in our academic process we have to do the projects.i am doing project in java jsp/jstl. i have perform the task like login with validation,change admin profile,change admin password.
now the problem came in to the picture i have to perform the log out task means when admin click on the logout button and the page must have to redirect to login.jsp page,when i click on the back button from the browser i will not able to go back to the admin panel again....gif)
please any one help me..??
thanks in advance..
- 01-17-2012, 11:18 AM #2
Member
- Join Date
- Jan 2012
- Posts
- 1
- Rep Power
- 0
Re: unable to do log out process
Hi
Instead of redirecting to your login page you can just redirect to another jsp named logout.jsp and you can try here <%session.invalidate();%> in your jsp which terminates your session. Follow the link which has a complete tutorial on this particularly
How do I log out of an application that uses Form authentication? - Web Tutorials - avajava.com
- 01-17-2012, 01:17 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 2
- Rep Power
- 0
Re: unable to do log out process
Hello
pratydas,
thanks for quick replay to perform the log out task i have specified the code into the logout.jsp just take a look on it and please suggest....:)
<%@ page import="java.sql.*" %>
<jsp:useBean id="Oswift" type="jaimin.soni.Jaimin" scope="session"/>
<%
try
{
Class.forName("oracle.jdbc.driver.OracleDriver").n ewInstance();
Connection conn=DriverManager.getConnection("jdbc:oracle:thin :@localhost:1521:XE","system","imstupid");
String gtu,pass;
gtu=Oswift.getStatus();
PreparedStatement pst=conn.prepareStatement("update register set status=? where username=?");
pst.setString(1,"flase");
pst.setString(2,gtu);
pst.executeQuery();
Oswift.setStatus("false");
session.invalidate();
String redirectURL = "/Soni/index.jsp";
response.sendRedirect(redirectURL);
}
catch(Exception e)
{
System.out.println(e);
}
%>
Thanks in advance
Similar Threads
-
process synchronisation:
By javanewuser in forum Threads and SynchronizationReplies: 0Last Post: 03-10-2011, 10:28 AM -
How to run and exit a process
By cracker in forum New To JavaReplies: 2Last Post: 02-15-2011, 03:11 PM -
Cmd process streams
By helloworld922 in forum Advanced JavaReplies: 0Last Post: 10-20-2010, 08:20 AM -
Process name
By logicbug in forum Threads and SynchronizationReplies: 1Last Post: 03-16-2009, 02:11 PM -
i need help in http process
By sureshjava in forum New To JavaReplies: 0Last Post: 01-29-2008, 04:56 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks