How can i redirect a page to Login screen when sessionis timeout???

I have a problem in my portal development.
I set the "<b>Session timeout= 01</b>" parameter in the<b> Visual Administrator</b>
server_0 > services > Web Container
        Runtime > sap.com/irj  > irj    (view button)
However, when the session is timeout then the page become to be "red"!!! That is, there is an Exception. I'd like to redirect the page to the "Login screen", but I don't know how. <b>Does anybody know how can I do it</b>?
Thanks in advance.

Hi,
    the http session invalidation must be checked at application level  do it DYNPAGE only .you can call the following method.
public void expireSession(IPortalComponentRequest request)
          long lastAccessedTime=request.getServletRequest().getSession().getLastAccessedTime();
          Date currentDate = new Date();
          Calendar currentDateCal = new GregorianCalendar();
          currentDateCal.setTime(currentDate);
          long systemTime = currentDateCal.getTimeInMillis();          
          long sessionExpiryTime = systemTime - lastAccessedTime;
          long sessionExpiryTimeProp = 600000; //dont hard code.get from property file
          if(sessionExpiryTime >= sessionExpiryTimeProp)
               try
                   IPortalComponentResponse response=(IPortalComponentResponse)this.getResponse();                    
                    String sessionExpiryPage ="/irj/servlet/prt/portal/prtroot/com.sap.portal.masthead.LogOutComponent?logout_submit=true";                    
                    response.write ("<script language="javascript">");
                    response.write("parent.window.location.replace('"+sessionExpiryPage+"','','toolbar:No,status: No,location: N0');");
                    response.write("</script>");
               }catch(Exception e)     

Similar Messages

  • How can I set the page that will open, when I open a new tab, to be the same as the homepage?

    How can I set the page that will open, when I open a new tab, to be the same as the homepage?
    An app changed it to some other search engine, before installing the app, I the tab that would open was the homepage I set.
    In my case it is Google, and I want my new tabs to open on Google like they did before the installation.
    thank you,
    Asaf Privman.

    You can middle-click or Ctrl left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • How can I view 2 pages on the screen?

    With old Pages there was an option in Zoom to see One Up or Two Up. But this has now disappeared. How can I see Two Up?

    A temporary work around if you're stuck in the new Pages is to go to File>Print and then open in Preview and select the 2 page view. At least you can see what it looks like but you won't be able to edit anything.
    Make sure you submit a review on the App Store and list this feature as missing. Features that are most in demand will rise to the top of the to-do list unless there is some reason why Apple won't re-instate the feature.

  • How can I convert web page to PDF? When I upgraded to 4, it does not work.

    Since I upgraded to firefox 4 I can not convert web page to PDF, before there was a place in the upper left corner that said convert to PDF. If there is not a way to do this in 4 then how can I go back to the old firefox. If I can't I guess I will just uninstall FireFox.

    Moved to Creating, Editing & Exporting PDFs

  • Where and How can I get the Black Lenovo Login Screen for Windows 7 for X120e?

    Hello,
    I just installed Windows 7 on a SSD on my X120e.  It is a fresh install and I really liked the Black Login Screen that my Lenovo X120e that came on the regular drive.  Is there a way to download this screen and make my login screen back to this screen?  
    Thanks.!

    qubilist wrote:
    I just installed Windows 7 on a SSD on my X120e.  It is a fresh install and I really liked the Black Login Screen that my Lenovo X120e that came on the regular drive.  Is there a way to download this screen and make my login screen back to this screen?
    Create Recovery Discs from your HDD, then load them onto the SSD.
    Hope that helps,
    John
    ThinkPad T450s [ i7-5600U | 8GB | 1TB SSD | Full HD IPS | 802.11ac | BT | Webcam | FR | Win8.1Pro64 ]

  • How can I stop the ripple across the screen when scrolling down since I upgraded my Mac to Firefox 4 ?

    Since I upgraded to Firefox 4 I am getting a horizontal ripple across the data when scrolling down, which is very disruptive and uncomfortable. How can this be corrected. I am using an IMac with Mac OS X 10.6.7 ?

    Same problem on Imac with updated software. Had problem in earlier versions and changed key : <key>CGDisableCoalescedUpdates</key>
    <true/> to false and that resolved the problem. It helps somewhat with Firefox 4, but not enough. Is this just a Mac problem or are PCs having the same problem? This may be enough for me to switch browsers or go back to 3.6.

  • How can I redirect logout page in PS 6.0?

    How or Where can I change http://<portalserver>/amserver/UI/Logout to http://<portalserver>/portal/dt in Portal Server 6.0?
    Thanks a lot for ideas.

    En el identity server -> Services -> Authentication Configuration se puede configurar urls para Login Success o Login Failure por ejemplo. Cuando un usuario hace logout el portal muestra el display profile del usuario authless/annonymous que esta en la organizacion por defecto. Lo que tendria que hacer es modificar ese display profile y hacer alli la redireccion.
    Puedo saber su nombre? seria bueno conocer a alguien en Colombia que maneje el JES.
    Saludos.
    Pedro Solorzano.

  • How can I remove one page from adobe file

    How can I remove one page from adobe file, when I try to remove the page a dialgue box say "some pages are being used, so they can not be ereased"?

    Tools>Pages>Delete pages

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • How can i redirect to another JSP page automatically after some event

    I am developing a Tic-Tac-Toe game which can be played between two players who are on two different machines.
    When the first player comes to the Welcome page he will redirected to a Waiting Page when he clicks on the 'Start' button.
    When the second player comes to the Welcome page he will be redirected directly to the Game page, on clicking the 'Start' button.
    So how can i redirect the first player to the Game page after the second player is available for the game.
    And if i want to manage multiple instances of my game how can i do that//
    I am using JSP, javascript and MySQL for developing my project, and I am new to all these tools, but i would still like to carry on with all these only

    This is a bit of a challenge because of the nature of the web. Generally the web is "pull only" meaning that the browser has to initiate any interactions - the server can't push data to the browser if it wasn't asked to.
    The easiest way to solve this is using AJAX via JavaScript to periodically poll the server for any status changes. There are other ways (the Comet protocol is one) but they start to get a bit difficult and are still a bit new and not completely supported in a standards way. And to be honest they are still basically polling though in a more efficient way.
    Are you using a JavaScript framework? Most of the JavaScript frameworks that I've used have built in support for polling in the background. You'd have to have the JSP/servlet side be able to handle these polling requests from the browser and, when another person joins the game, the server indicates that and sends that back to the browser.
    As far as multiple instances I would have the server automatically pair up users as needed. So when the first player arrives he has to wait for another player. When the second player arrives a new game is created for those two players. Now a third player arrives and waits until a fourth player shows up. When player 4 joins another separate game is created. Presumably the conversation between the browser and the server will need to include a "game number" or other unique number so that the server can keep track of the games.

  • My MacBook Pro won't go beyond a white screen, after I pushed the restart button. How can I get it to a login? I have routinely backed it up, but don't know how to bring that up, nor if I have a boot file on that external disk. Help!

    My MacBook Pro won't go beyond a white screen, after I pushed the restart button. How can I get it to a login? I have routinely backed it up, but don't know how to bring that up, nor if I have a boot file on that external disk. Help!

    Take each of these steps that you haven't already tried. Stop when the problem is resolved.
    To restart an unresponsive computer, press and hold the power button for a few seconds until the power shuts off, then release, wait a few more seconds, and press it again briefly.
    Step 1
    The first step in dealing with a startup failure is to secure the data. If you want to preserve the contents of the startup drive, and you don't already have at least one current backup, you must try to back up now, before you do anything else. It may or may not be possible. If you don't care about the data that has changed since the last backup, you can skip this step.
    There are several ways to back up a Mac that is unable to start. You need an external hard drive to hold the backup data.
    a. Start up from the Recovery partition, or from a local Time Machine backup volume (option key at startup.) When the OS X Utilities screen appears, launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.” The article refers to starting up from a DVD, but the procedure in Recovery mode is the same. You don't need a DVD if you're running OS X 10.7 or later.
    b. If Step 1a fails because of disk errors, and no other Mac is available, then you may be able to salvage some of your files by copying them in the Finder. If you already have an external drive with OS X installed, start up from it. Otherwise, if you have Internet access, follow the instructions on this page to prepare the external drive and install OS X on it. You'll use the Recovery installer, rather than downloading it from the App Store.
    c. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, start the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    d. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.
    Step 2
    If the startup process stops at a blank gray screen with no Apple logo or spinning "daisy wheel," then the startup volume may be full. If you had previously seen warnings of low disk space, this is almost certainly the case. You might be able to start up in safe mode even though you can't start up normally. Otherwise, start up from an external drive, or else use the technique in Step 1b, 1c, or 1d to mount the internal drive and delete some files. According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation.
    Step 3
    Sometimes a startup failure can be resolved by resetting the NVRAM.
    Step 4
    If a desktop Mac hangs at a plain gray screen with a movable cursor, the keyboard may not be recognized. Press and hold the button on the side of an Apple wireless keyboard to make it discoverable. If need be, replace or recharge the batteries. If you're using a USB keyboard connected to a hub, connect it to a built-in port.
    Step 5
    If there's a built-in optical drive, a disc may be stuck in it. Follow these instructions to eject it.
    Step 6
    Press and hold the power button until the power shuts off. Disconnect all wired peripherals except those needed to start up, and remove all aftermarket expansion cards. Use a different keyboard and/or mouse, if those devices are wired. If you can start up now, one of the devices you disconnected, or a combination of them, is causing the problem. Finding out which one is a process of elimination.
    Step 7
    If you've started from an external storage device, make sure that the internal startup volume is selected in the Startup Disk pane of System Preferences.
    Start up in safe mode. Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Post for further instructions.
    Safe mode is much slower to start and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know the login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    When you start up in safe mode, it's normal to see a dark gray progress bar on a light gray background. If the progress bar gets stuck for more than a few minutes, or if the system shuts down automatically while the progress bar is displayed, the startup volume is corrupt and the drive is probably malfunctioning. In that case, go to Step 11. If you ever have another problem with the drive, replace it immediately.
    If you can start and log in in safe mode, empty the Trash, and then open the Finder Info window on the startup volume ("Macintosh HD," unless you gave it a different name.) Check that you have at least 9 GB of available space, as shown in the window. If you don't, copy as many files as necessary to another volume (not another folder on the same volume) and delete the originals. Deletion isn't complete until you empty the Trash again. Do this until the available space is more than 9 GB. Then restart as usual (i.e., not in safe mode.)
    If the startup process hangs again, the problem is likely caused by a third-party system modification that you installed. Post for further instructions.
    Step 8
    Launch Disk Utility in Recovery mode (see Step 1.) Select the startup volume, then run Repair Disk. If any problems are found, repeat until clear. If Disk Utility reports that the volume can't be repaired, the drive has malfunctioned and should be replaced. You might choose to tolerate one such malfunction in the life of the drive. In that case, erase the volume and restore from a backup. If the same thing ever happens again, replace the drive immediately.
    This is one of the rare situations in which you should also run Repair Permissions, ignoring the false warnings it may produce. Look for the line "Permissions repair complete" at the end of the output. Then restart as usual.
    Step 9
    If the startup device is an aftermarket SSD, it may need a firmware update and/or a forced "garbage collection." Instructions for doing this with a Crucial-branded SSD were posted here. Some of those instructions may apply to other brands of SSD, but you should check with the vendor's tech support.  
    Step 10
    Reinstall the OS. If the Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade.
    Step 11
    Do as in Step 9, but this time erase the startup volume in Disk Utility before installing. The system should automatically restart into the Setup Assistant. Follow the prompts to transfer the data from a Time Machine or other backup.
    Step 12
    This step applies only to models that have a logic-board ("PRAM") battery: all Mac Pro's and some others (not current models.) Both desktop and portable Macs used to have such a battery. The logic-board battery, if there is one, is separate from the main battery of a portable. A dead logic-board battery can cause a startup failure. Typically the failure will be preceded by loss of the settings for the startup disk and system clock. See the user manual for replacement instructions. You may have to take the machine to a service provider to have the battery replaced.
    Step 13
    If you get this far, you're probably dealing with a hardware fault. Make a "Genius" appointment at an Apple Store, or go to another authorized service provider.

  • How can i share the pages application with another computer?

    How can U share the pages application with another computer?

    Just make sure it is for you or your family.
    If you purchased Pages through the Mac App Store, then just login on the other computer using the same Apple I.D. and you can install it at no extra charge.
    Peter

  • How can I redirect an URL which variable is included?

    I would like to redirect a page to a URL when user define an option from drop-down list. For example, when user choose "3" in "Month" drop-down list, the URL will be http://adobe/testing/3.html
    The message box is accepted like this:
    xfa.host.messageBox("http://www.adobe/testing/" + Month.rawValue + ".html")
    However, it is not accepted on xfa.host.gotoURL
    Do any know how to solve it?
    Thanks/

    Hi,
    Here is a sample: https://acrobat.com/#d=vnEiKl03M3bd4C2PiXtALQ
    if you use the app.launchURL function you can build up the variable URL as a rawValue of an object or a mixture of a string value and rawValue.
    xfa.host.gotoURL("http://www.adobe.com"); will create a PDF from that URL address, which may not be what you want.
    If you do want to create a PDF, then the approach in the sample will also work.
    Hope that helps,
    Niall

  • I am trying to delete pages I have crated in numbers, but can only see them in print preview. Without print preview I do not see them. How can I delete these pages, but keep others before and after?

    I am trying to delete pages I have crated in numbers, but can only see them in print preview. Without print preview I do not see them. How can I delete these pages, but keep others before and after?

    Hi Crushed,
    Numbers doesn't have pages. It has a canvas that holds objects such as tables and charts.
    Drag the objects from the bottom of the canvas onto the white space above. That will reduce the number of "pages" (sheets of paper) that will print.
    Regards,
    Ian.

  • How can I print a pages document in book format ..order?

    How can I print a pages document in book format ..order?

    This is usually a function of the driver you're using. Have you looked in the various PDEs for black and white or grayscale? What kind of printer are you using?

Maybe you are looking for

  • Create OLE DB Data Source in Sql Server Reporting Services

    Hi, I need to connect to a sap bw cube and when i try to create Data Source everything is going well but i can't see my cubes in the catalog field. any one have experience with it?? Thanks.

  • Document Storage on an iPAD Air

    I have many documents on my iMac that I would like to store on my iPAD Air. What method is recommended to get the documents on the iPAD and in what form (Pages?).

  • Java error

    I am working on the program below, but currently at present I cant get it to compile. At the moment I am getting the error of: import java.util.Scanner; class jets24 public static void main (String[]args) Scanner input= new Scanner (System.in); //var

  • Is there a way to change my laptop to make an old game run?

    I had no idea where to post this sort of inquiry, so I guessed at "General Content". I am sorry to any irritation caused to people who know what they're doing! When clicking on the icon for the CD drive I get the error message - "The version of this

  • Contact sheet print job aborted in snow leopard

    Recently upgraded to snow leopard. When printing a large contact sheet of over 50 raw files the print job is aborted. Printing to a HP Z3100. Nailed it down to amount of data 50 pics at 20mb each seems to be limit. No problem under Leopard. I can con