Logout button

Hi all

I put a logout button in my app and linked to the bean of disconnection with the method following logout (shamelessly stolen at the request of SRDemo)
    public String logoutButton_action() throws IOException{
      FacesContext ctx = FacesContext.getCurrentInstance();
      ExternalContext ectx = ctx.getExternalContext();
      HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
      HttpSession session = (HttpSession)ectx.getSession(false);
      session.invalidate();
      
      response.sendRedirect("login.html");
      // Tell faces that we're handling the navigation from here and that there 
      // is no need for a new context to be created 
      ctx.responseComplete();
      return null;
    }  
  }
And it sorta works. When I click on logout, it takes me to the login page. But when I try to log back in there give me a file not found error and the server connects it says not found index.jsp. I don't have a page index.jsp. My default home page is called LutrijaObjektiCRUD.jspx and as you can see on the code upward there when I redirect I go to login.html. I don't know why the re - open a session would take me to the index.jsp

Anyone know how I can change this?

Normally, the page of connection (in your case login.html) is called by the container when the user tries to access a protected URL resource. The container calls the login page implicitly and if the connection is successful the container then passes automatically to the requested protected resource. If you call the login page explicitly (as it is to disconnect in your example) when you enter the identification information and press the "Login" button, then the login page will submit authentication URLl (usually this is of j_security_check), but after that the container will not know where to redirect them to (because you have not asked any resource). In my opinion, you can correct the problem by redirecting to disconnect not to the login page, but to another page in your application (for example, your default homepage).

Tags: Java

Similar Questions

  • Where is the "Logout" button to emails from Thunderbird?

    Where is the "Logout" button to emails from Thunderbird? It is impossible to "disconnect" as it is with all other emails that I used.
    Thank you

    You do not connect you. You don't sign in then why would disconnect you? You press the red x in the corner and close the program.

  • After you install the update to version 9 of Firefox, I can access some items in my toolbar. Logout button on my GMail is more accessible, which is false.

    None of the toolbar, on the journal online, on my gmail account are no longer active. I also had this problem with my account to find out, I couldn't use the logout button here either. When I called Discover, they told me that their website was not yet updated for version 9 of Firefox.

    The extension of the Yahoo! toolbar and the extension of Babylon have been reported to cause a problem like that. Disable or uninstall the modules.

       * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    
  • cursor not click the logout button in yahoo, rediff etc pages?

    cursor not click the logout button in yahoo, rediff etc pages. For example, once I open my yahoo page, the mouse pointer does not change its appearance to the finger type when I try to click the logout or Inbox. This does not happen with chrome or explorer.

    This problem can be caused by that extended the Yahoo! toolbar or extension of Babylon also well down and covers the top of the browser window and therefore links and buttons in this part of the screen not clickable.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    I a s 6 more and when using the phone, if my face touches the screen it clicks on the logout button and the phone hangs up the call. Is it possible to prevent this without holding the phone away from my face when calling?

    iPhones have a proximity sensor which is supposed to automatically turn off the screen when you hold it in your face. If this is not the case you can take the phone and have it checked.

  • 6.4.0 - T112 (beta 2) no Logout button?

    Hello!

    Just improved 6.3.5 to 6.4.0 T112 (X86_64), and I do not have the 'disconnection' / signout button in the web interface.

    Maybe I'm not...

    It is not a big problem for me, but I just wanted you to know :))

    To log off, you will need to close your web browser, so that the logout button was completely unnecessary.

  • The User_id, User_name and role with Logout Button display

    Dear friends,

    I want to display User_id, User_name and role close link to logout on the top side on the right side.

    These column User_id User_name and role comes from the USER table.

    How and where I can set to display this combination near logout link.

    Thank you

    Published by: Sophie on July 20, 2011 12:20 AM

    OK... got my backups on my laptop and that's what I've done in the past:

    On my models / walk-in Tabs

    &APP_USER. &G_APP_USER_EMP_TYPE. #NAVIGATION_BAR#
    

    & G_APP_USER_EMP_TYPE. is my point of application which I use one on until the process on my login go to home page... Sorry I thought I was using an application process (I have to fix this in the future)

    It apears in my home like this:

    Logout for the user role button
    CAMPMNG_DEV CALL_FARM Logout

  • How the LOGOUT button to reload?

    WHY did you would anchor the reload/stop button. Now we cannot move. I've heard too many users has moved then forgot where she was. I can see how that creates headaches of support for you.

    Anchor it at, less outside the URL field and beside the forward/back arrows. It creates a horrible usability issue. simply not friendly to completely cross the URL field. There must be a better solution than it dumbing down to the level of skill of the lowest user and just docking it.

    And there must be a solution of customization for users who know what they are doing. Please, I beg you. Someone.

    As far as I know, the Restorer of classic theme Add on is the only way to move the button reload outside the address bar.

    1. Classic restaurateur theme installation and restart Firefox when prompted.
    2. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    3. Beside the classical restaurant theme, click on the Options button.
    4. On the main tab, make sure that 'Mobile back-forward button' and 'hide urlbars stop & reload buttons' is checked. You can also check "combine stop & reload buttons.
    5. Right-click on a zone empty of the tab bar and select Customize.
    6. Do slide forward/backward buttons, Stop and reload on the navigation toolbar.
    7. Click the Customize the output at the bottom right button when finished.

    That being said, I must point out that you can reload pages in other ways.

    • Make a right click No matter what tab and choose reload.
    • Right click on a box empty page and choose reload.
    • Press F5.
    • Press Ctrl + R.
  • Tecra A4: suspend/shutdown/logout buttons missing

    Hello
    I am running windows XP on a Tecra A4,
    sometimes and so far I have not found a rule, the buttons associated with the stop/suspension and logoff, on the start menu, are endangered, and the only way to close is the Task Manager.

    Any idea to solve this problem?

    Thank you & best regards
    Federico

    Hello

    I'm a bit confused of Mr. you are not able to see the Start button in the taskbar?
    There you can stop the operating system.
    Have you changed some configuration settings?
    Have you tried to use the System Restore tool that XP offers to roll back the OS in the old days? Select this check box.

    Good bye

  • How has disappeared or the logout button to disable wifi on Win 7?

    Hi is possible to missing or disable the disconnection from the wifi button.

    I met students cell phones they always disconnect the wifi and play the game of Chrome...

    Hello

    It depends on the General configuration of the computer.

    WIFI can be turned off or low can be hidden. Disconnect the WIFI would not play games that don't need Internet.

    If not, please explain how computers are configured.

  • When I opened my gmail account in this browser, then when I click the logout of gmail... button nothing happens. The logout button does not work.

    I can't log out of gmail. By deleting the cookies and empty the cache, it can be done. But I want the NORMAL disconnection process in this browser.

    Many issues of the site can be caused by corrupted cookies or cache.

    • Clear the Cache and
    • Delete Cookies
      Warning! This will save you except websites to which you are connected.

    Type of topic: preferences in the address bar.

    • Cookies; Select confidentiality. Under background, select Firefox will use Custom Settings. Press the button on the right side called Show Cookies. Use the search bar to search the site. Notes; There may be several entries. Delete all the of them.
    • Cache; Select Advanced > network. In front of the caching of Web content, press clear now.

    If there is still a problem, dialog box A Start Firefox in Safe Mode {web link} should appear. Click start in Safe Mode (no refresh). While you are in safe mode;

    Type of topic: preferences #advanced in the address bar.

    Under Advanced, select General. Find and stop using hardware acceleration.

    Search safe sites. Are there problems?

    Then restart.

  • Adding a link to help close Logout button

    Hi friends,

    I want to add a help link in the right side of the close session button in the same position, and when this button is pressed I

    you want to redirect to a page/popup a new page in the application. How is it possible?. Help, please

    Thank you

    NAV

    Published by: user8742092 on September 30, 2009 01:24

    Hi Nav,

    Access your page edit box.
    -> Navigation bar right
    Create a new one with a sequence of 201 (or something superior to the disconnection of the element)
    Give him the text "help".
    You can leave all the other fields empty on the first page
    Specify your location of the page or a popup for the redirect.

    Mike

  • where is the logout button? If she's not here, I think that it is necessary for the application of more people using a Pc...

    I can't get it.

    There is no sign outside because you did not sign.

    Thunderbird opens when you click the Thunderbird icon and closes when you leave by clicking X right top of the page or file > exit.

    If there are multiple users use the same computer, they must each have a user account that you set a password to connect. It is the standard method used when there are multiple users on a computer. Thunderbird keeps the profile folder in this user account. This prevents other users to be able to see other documents, including e-mails from profile folder.

  • Superior 1/4 screen does not respond to the mouse - cannot disconnect sites when Logout button is in this area, IE. Facebook, banks, etc.. This does not happen with IE. I reinstalled Firefox without result.

    Menu bar, tabs, history, research, etc. work fine, but in this area, I am unable to access anything whatsoever. For example, on the Firefox help screen the area on the right side of the screen that shows my user id - Sign Out - Inbox - and other applications will not respond to the mouse. Therefore, I will be unable to sign using Firefox. This is true for every Web site I have access. Fortunately, at least one of the banks that I use has an additional journal on area at the base of the screen that can be used.

    Recently, the extension of the Yahoo! toolbar and the extension of Babylon have been reported to cause a problem like that. Disable or uninstall the modules.

       * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    
  • Apex Mobile app delete button Logout and House

    Hello together,

    I'm a little frustrated. I use Apex 4.2.1 with an Oracle DB 11.2.

    I created a mobile application, and as much, I can see, everything works fine.

    But on every page in this application is on the upper right corner the "Logout" button and on the left side of the key "home". But I want only this kind of buttons only on the first page.
    How can I remove the button on all other pages?
    I already looked in the theme of the page, but I did not find anything.

    Can anyone help?

    Thank you

    See you soon

    Joe

    Published by: Joe_990933 on 28.02.2013 04:29

    They are defined as buttons in page 0 , modify them and make them conditional

    See http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_rndr.htm#HTMDB03004

Maybe you are looking for

  • Twitter: Your account may not perform this action. Please, refresh the page and try again.

    Since the update to Firefox 41.0.2 I couldn't use Twitter.com. When I try to tweet, favorite, or retweet the following error occurs. Your account may be able to perform this action. Please, refresh the page and try again. There are a couple of other

  • U31-70 keyboard problems

    Hello! Since yesterday I can not log on to my laptop. First of all, it starts very slowly and as the starting point to the screen rises, that I can't type my password see the keyboard is unresponsive. It worked perfectly fine two days ago. Is there a

  • Firmware problem

    Hello the nxt brick is connected and recognized by the lab view (2012 version), when you try to download the Firmware "LEGO MINDSTORMS NXT Firmware V.1.31" When you try to download the firmware the progress begins charges and brick (... for the ICT I

  • vertical scale 5152, set up the time

    I use a pxi-5152 in a pxi-1033 chassis. I want to play a trick and change the vertical scale between my measurements to increase the dynamic range of a signal that I'm scanning.  I made a loop and changed the vertical scale property node after each m

  • My firewall windows itself turns off

    original title: firewall Turns off my firewall windows itself. I keep having to check that its on again?