Checking the session if valid goes to particular resource or request bypass

checking the session and whether user has logged in if logged in goes to particular resource or request bypasses to particular redirected resource in filters can u suggest me the code too ...thanku

Hi,
you can check wether or not a user is authenticated by accessing the request object and calling getUserPrincipal() or getUsername(). If a user is not authenticated then this reqests return NULL
Frank

Similar Messages

  • I am planning to take unlocked  iphone5 which is from USA, let me to know how to check the phone is valid ?

    i am planning to take unlocked  iphone5 which is from USA, let me to know how to check the phone is valid ?.How can i check is that properly unlocked, stolen and service.

    IF you can actually yet purchase an unlocked iPhone4 8GB from the US Retail stores is not clear
    They are certainly available from Apple.com but only if you have a US credit card and a US delivery address
    I suspect you do not fit this requirement
    You also have to be careful as the Apple Retail stores sell no contract iPhones these are NOT unlocked
    However if you are able to purchase an unlocked iPhone4 8GB then it will certainly work with the Approved carriers in India

  • How to stop a pop up window if the session expires

    Hi
    I have a situation wherein i have my jsp page. in that i have a button on clicking it a pop up window will open to take a input parameter.
    Now what we want is that if the session is not valid than the pop up shud not open.
    Currrently what is happening wen the session is not valid the popup gets open and in that popup a login page is coming.
    The logic for pop has been put in a javascript code which gets executed when the page was first loaded . So even if i put a logic for checking the session before the popup opens it wont work. So what can be a possible way i can do it?
    I am writing a scriptlet to check the logic for valid session.
    function changeLimitFunc(count)
         <% if ((request.getSession(false)== null)) {%>      
              return false;
         <%}
         else {%>
    popUp('');
              openedForm.target = 'change_download_limit';
              openedForm.submit();
    <%}%>
    and in the page which geot loaded the same code appears like
    function changeLimitFunc(count)
         popUp('');
                   openedForm.target = 'change_download_limit';
                   openedForm.submit();
    this popUp is amethod where we are createing our popup.
    please help me out to resolve it

    I have written this javascript code to block the popup
    function changeLimitFuncUnopened()
    if (checkIfValidSession()) {
              popUp('');
              unopenedForm.target = 'change_download_limit';
              unopenedForm.submit();
              else {
              return false;
    function checkIfValidSession() {
    <% HttpSession httpSession = request.getSession(); %>
    var lastAccessTime = <%= httpSession.getLastAccessedTime() %> ;
    var maxInactiveTime = <%= httpSession.getMaxInactiveInterval() %> ;
    var date = new Date();
    var time = date.getTime();
    if( (maxInactiveTime > 0) && ((time - lastAccessTime) > (maxInactiveTime * 1000))) {
         alert("Session TimedOut. Please Re-login!!!");
         return false;
    else {
         alert("inside else true shud go");
         return true;
    The code is working fine and blocking the popup. But I am not sure if this will be a correct fix.

  • How to stop a popup if the session has expired??

    Hi
    I have a situation wherein i have my jsp page. in that i have a button on clicking it a pop up window will open to take a input parameter.
    Now what we want is that if the session is not valid than the pop up shud not open.
    Currrently what is happening wen the session is not valid the popup gets open and in that popup a login page is coming.
    The logic for pop has been put in a javascript code which gets executed when the page was first loaded . So even if i put a logic for checking the session before the popup opens it wont work. So what can be a possible way i can do it?
    I am writing a scriptlet to check the logic for valid session.
    function changeLimitFunc(count)
    <% if ((request.getSession(false)== null)) {%>
    return false;
    <%}
    else {%>
    popUp('');
    openedForm.target = 'change_download_limit';
    openedForm.submit();
    <%}%>
    and in the page which geot loaded the same code appears like
    function changeLimitFunc(count)
    popUp('');
    openedForm.target = 'change_download_limit';
    openedForm.submit();
    this popUp is amethod where we are createing our popup.
    please help me out to resolve it

    Doubleposted and already answered: [http://forums.sun.com/thread.jspa?threadID=5342037].
    Please don't doublepost, stick to one topic.

  • Checking for session expiration

    We're using JSPs and Servlets in our application. Looking for a way in code to check if the session has expired. We will need to do this from a jsp as well as a servlet (sometimes a jsp is pointed to by a link and sometimes a servlet). Can someone point me in the right direction?
    Thanks all.
    jl

    I like the idea of a session verifier. We have about 25 jsps, 15 servlets, and at least 80 components (beans) in the app. How would the verifier component work? How could we intagrate it with all the other existing components? Ideally it would be integrated with minimal modifications...
    Is the following what you had in mind with your suggestion to check for session data:
    HttpSession session = request.getSession();
    //or could this be used too: HttpSession session = pageContext.getSession();
    String valid = session.getAttribute( KEY );
    if ( null != valid ) {
    //then the session is still active
    jl
    >
    If the session has expired and you current have a new
    session, then use the isNew() method to check the
    session object. Or, you could check the session
    object for the data you are looking for. If it is
    missing, then the session expired and has been newly
    created. You should build into your design a session
    verifier so that you don't expierence NullPointers or
    missing data.

  • I bought a iphone 3gs 4 months ago had a problem with display service centre replaced me with the phone when i checked the settings of the phone in cellular usage under call time the lifetime usage was 3 days and 18 hours.what sholud be done ?

    i bought a iphone 3gs 4 months ago had a problem with display service centre replaced me with the phone when i checked the settings of the phone in cellular usage under call time the lifetime usage was 3 days and 18 hours.what sholud be done ?

    How is your iPhone's display different?
    You can check the model number by  going to Settings/General/About. These are the model numbers for the various 3 GS models;
    MB715LL/A (16 GB Black), MB716LL/A (16 GB White), MB717LL/A (32 GB Black), MB718LL/A (32 GB White), MC555LL/A (8GB)

  • How to check the load balancing in Oracle 11gR2 2 node RAC

    Dear All,
    Can any one please assist me how to check whether the incoming connections are evenly distributing across the nodes..?
    We have two nodes, when we check the sessions counts in both nodes, Most of the time we could see node -1 has more no of sessions than node-2..? So just wanted to know whether load balancing is happening or not ...? If not how to enable it and distribute the incoming connections evenly..?
    Oracle 11gR2 / RHEL5

    SQL> select inst_id,count(*) from gv$session where username is not null group by inst_id;
    INST_ID COUNT(*)
    1 43
    2 40
    Not sure how to check the users are connecting through scan or not ..? But below are scan setttings...
    SQL> !srvctl config scan_listener
    SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
    SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
    SQL> !srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node za-rac-prd-02
    SCAN Listener LISTENER_SCAN2 is enabled
    SCAN listener LISTENER_SCAN2 is running on node za-rac-prd-01
    SCAN Listener LISTENER_SCAN3 is enabled
    SCAN listener LISTENER_SCAN3 is running on node za-rac-prd-01
    SQL> !srvctl config scan
    SCAN name: rac_prd.abc.local, Network: 1/10.100.130.0/255.255.255.192/eth6.64
    SCAN VIP name: scan1, IP: /rac_prd.abc.local/10.100.130.55
    SCAN VIP name: scan2, IP: /rac_prd.abc.local/10.100.130.54
    SCAN VIP name: scan3, IP: /rac_prd.abc.local/10.100.130.53
    SQL>

  • Tried purchasing iTunes music. Put in my apple id and password then i was directed to a 'Terms and Conditions' page. I checked the box then clicked the 'accept' button next page read 'your Session has timed out '  try again  with a Done button to click on

    Tried purchasing music from the iTunes Store. When the window popped up I put in my apple id and password. Then I was directed to a 'Terms and Conditions' page. I checked the box next to the 'Yes I agree to these terms and conditions' - then clicked the 'accept' button next page read 'Your Session has timed out. Try again.'  with a 'Done' button to click on. Oh the same thing happens when i try to download  free iTunes. Yes I have tried & tried it again I even logged off and singed back in-- no joy 
    After accessing my iTunes account I was not able to change anything like my credit card number when I tried and was sent right to the 'Your session has timed out. Try again.'
    The last time I purchased any anything was on September 25th 2011 and the 'terms & conditions' page was last updated on October 12, 2011
    Does anyone have an idea to what is going on with my iTunes version 9.2.1 (5) and I can not upgrade to a higher version my iMac does not have the intel processor chip.Thank you for your time and help with this matter. You are greatly appreciated 

    I am having the same problem also! I posted on here about it, but no one has responded with ideas. I called technical support and e-mailed them, the only suggestions they gave was for the to turn off my firewall. But I didn't change anything, so it shouldn't suddenly stop working. Maybe this is just an iTunes issue? But it doesn't even recognize my account anymore, and I cannot log in now.
    If you happen to get an answer, will you please let me know what works for you?
    Thanks!

  • Check the Stock of a particular material is available in SAP R/3 from Java

    Hi all,
    We have both SAPR/3 and Java Based Systems and going to integrate with XI.
    For Java user is it possible to check the Stock of a particular material is available in SAP R/3 system or not.
    For this requirement can we create any scenario and get the stock available info from SAPR3?
    If so then which type of adapters we have to use in this case.
    The Java user don't want to store any data here and there but just view the stock is available or not just from his end only.
    bye
    regards
    konala

    You can use synchronous Java Proxy-XI-RFC.
    Code the RFC to get the stock of R/3 material and route the response back to proxy.

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • Help ! Anxious !---The session is not valid; it may have expired.

    Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The session is not valid; it may have expired. Create a
    new session and try the operation again.
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:114)
         at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute
    (AbstractRetrieveLimitedRecordsCommand.java:173)
    i don't know why,if a session can do many command at the meantime! thank you every

    Hi,
    You might have kept your session idle for long time thats why it has got expired. Also check the Inactive Client Time Out in minutes property in MDS.ini and set it some value depending on your requirement.
    Regards,
    Jitesh Talreja

  • Has to check the validity

    hi,
         i have to check the validate aggrements for each material and has to display * if there are more than 1 valid aggrement for a particular material .
    v_count = 1.
          LOOP AT i_ebeln INTO wa_ebeln
                  WHERE matnr = wa_displaylog-matnr and matnr ne space.
              IF v_count > 1.
              wa_displaylog2-mover = '*'.
              EXIT.
            ENDIF.
            wa_displaylog2-mover = space.
            wa_displaylog2-ebeln = wa_ebeln-ebeln.
            wa_displaylog2-netpr = wa_ebeln-netpr.
            v_count = 2.
          ENDLOOP.
    when i used this code and changes the test file it is displaying only one aggrement number(ebeln) and no *   .when i excute again its working .what was the problem
    i used my select stmt as
    SELECT ekpoebeln matnr ekponetpr
         INTO CORRESPONDING FIELDS OF TABLE i_ebeln
         FROM ekpo INNER JOIN ekko
        ON ekkoebeln = ekpoebeln
        WHERE ekkokdate >= sy-datum  AND ekkoloekz NE 'L' AND ekpo~loekz NE 'L' AND
        ( ekkoebeln LIKE '46%' OR ekkoebeln LIKE '56%' ).
    Plz suggest the appropriate answer .
    Thanks
    Edited by: sukruthi raj on Jan 15, 2008 6:54 PM

    LOOP AT i_ebeln INTO wa_ebeln
    WHERE matnr = wa_displaylog-matnr and matnr ne space.
    AT NEW wa_ebeln-ebeln.
    v_count = 1.
    ENDAT.
    wa_displaylog2-mover = space.
    wa_displaylog2-ebeln = wa_ebeln-ebeln.
    wa_displaylog2-netpr = wa_ebeln-netpr.
    IF v_count > 1.
    wa_displaylog2-mover = '*'.
    ENDIF.
    v_count = 2.
    MODIFY i_ebeln FROM wa_ebeln INDEX sy-tabix.
    ENDLOOP
    Try changing like this.
    Regards,
    Sudhir Atluru

  • My Itunes account tells me i need to update it to version 10.6.1, but when I click download and the computer (mac 2007) goes to the "checking for softwares" page it doesn't find the update?

    my Itunes account tells me i need to update it to version 10.6.1, but when I click download and the computer (mac 2007) goes to the "checking for softwares" page it doesn't find the update? Help me please, what do I do?

    Try updating to 10.6.3.25.
    A .dmg installer for iTunes version 10.6.3.25 for Mac OS can be found at the following download page on the Apple website:
    iTunes 10.6.3

  • Is there anyway we can check the validity of dump file in Unix system

    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Your reply is highly appreciated.

    784786 wrote:
    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?No. It is better to take another backup of the same
    >
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Please check the export log backup. If it says that export terminated successfully, then the dump may be fine.

  • How to check the hardware vendor of a particular device

    Hi every one
    in the recent interview i have taken he asked me a question like
    how to check the hardware vendor of a particular device
    ex: hard disk ,nic card ,ram
    Thanks in Advance.......

    hi
    depends on OS version
    in RedHat like distros e.g.:
    lspci, lsusb, ls...
    dmidecode|grep -i manuf
    kudzu -p -s
    on Solaris you can use these :
    dladm show-dev
    dladm show-link
    prtconf -D
    kstat [-P]
    Edited by: g777 on 2011-03-11 07:24

Maybe you are looking for

  • Single ADS for multiple SAP systems ?

    Can a single ADS installed in a JAVA stack possibly along a EP 7.0 serve multiple SAP systems in my landscape. We got ECC 6.0, EP 7.0, BI 7.0, SRM 5 etc in our landscape. I was wondering whether I can install ADS on any of these systems with Java sta

  • How to validate an attribute in an entry from another data source

    Hi, i have a problem.. the users in our system have an address field...now this address field has to be verified against the values of addresses stored in another database,lets call it AddDB... if the address entered in the entry does not match again

  • How do I adjust the macbook pro camera white balance

    My incoming picture using Skype has a purple tint.  I was thinking that if I modify the settings for my camera this may impact the display of incomming video.  Or am I wrong?

  • Repository Creation Utility installation

    Hello, I have downloaded BIPublisher_11.1.1.3_Desktop and want to install it on my machine (windows 32bit). in the tutorial, it is sad that before installing BI Publisher I have to execute the Repository Creation Utility ( RCU) scripts in Oracle Data

  • Dreamweaver Forms Submit button

    I can not get the submit button to work on the Forms page I built. Is it true that some special code is needed from the website server to put this all together and make it work? If so, why doesn't it tell you that somewhere in the Dreamweaver tools.