Redirection, target and session

Hi,
I'm a french developer, and i'm facing a problem for which i haven't found a solution yet.
Let me explain :
I'm developing a web application in JSP. In this webapp, I try to use sessions, but, when I redirects the user to a new page - in a target frame - using JavaScript, it seems that I loose the session..
In fact, I have noted that the session ID was different in the two pages.
It seems too, that one can not use the response.sendRedirect on a target frame.. but this expression seems to be the one to use with the sessions..
I'm lost..
Is there somebody to help me?

From your first description the session id seems to be lost during the JavaScript-redirect. If you have to use JavaScript, make sure that cookies are enabled for tracking the session id or the redirection url is created using response.encodeURL() in order to enable url rewriting.
Example:
out.println("<a href=\"" + response.encodeURL(request.getContextPath() + "/whatever") + "\">Link Description</a>");Maybe you should print the session id to a server side log file and into the response to compare the session ids and find out at which point the session id changes.
Carsten

Similar Messages

  • Upload file with iframe loos session user and session id in wwv_flow_files

    Hello every one, hope someone could help us with this problem.
    What we are trying to do is to upload a file from a jquery dialog in a appex page by redirecting the POST action of the wwvFlowForm to the iframe.
    *1. In the javascript there is the function call to open my modal window with the input*
    function add_fichier_form(numeroProjet,idCat){
         $("#div_upload_fichier").dialog(
                    modal : true ,
                    autoOpen : false ,
                    resizable: false ,
                    width: 700         
           $('#div_upload_fichier').parent().appendTo('#div_base');
          $('#upload_button').unbind('click').click(function(){           
              if ($('#P4010_FILE_FICHIER').val() != '') {
                   $('#upload_iframe_v2').unbind('load').load(function () {
                        $('#upload_status').html(' déplacement du fichier...');
                        // move the file
                        $('#upload_status').html('Fichier transféré avec succès');
                        //file transfer ok
                        //calling the javascript function to add everything in my own table;
                                     //we see the file in the  wwv_flow_file_objects$ without
                         add_fichier_form_db();
                   // set the form target to the iframe, submit, then remove the target
                   $('#wwvFlowForm').attr('target','upload_iframe_v2').submit().removeAttr('target');
                   $('#upload_status').html(' Téléchargement du fichier...');
              }else {
                   alert('Veuillez sélectionner un fichier');
         $("#div_upload_fichier").dialog("option", "title", "Ajout d'un fichier");
            $("#div_upload_fichier").dialog("open");
           }*2. At this point we see the file in the table but without the user and session credential*
    select *
        from wwv_flow_file_objects$
    The result is that the field security_group_id is assign to 0 AND created_by = APEX_PUBLIC_USER
    *3. add_fichier_form_db(); the javascript function making the ajax call to a procedure plsql*
    function add_fichier_form_db(){
             //alert ('Dasn fichier form db');
         vNumeroProjet = document.getElementById('P4010_CAT_NUMERO_PROJET').value;
         vIdCat = document.getElementById('P4010_CAT_ID').value;
         vFichierNom = document.getElementById('P4010_NOM_FICHIER').value;
         vFichierDesc = document.getElementById('P4010_DESC_FICHIER').value;
         vFichierFile = document.getElementById('P4010_FILE_FICHIER_NAME').value;
         var ajaxRequest = new htmldb_Get(null , 300, 'APPLICATION_PROCESS=ADD_FICHIER_FORM_DB', 4010);
         ajaxRequest.add( "P4010_CAT_NUMERO_PROJET", vNumeroProjet);
         ajaxRequest.add( "P4010_F_CAT_ID", vIdCat);
         ajaxRequest.add( "P4010_FICHIER_NOM", vFichierNom);
         ajaxRequest.add( "P4010_FICHIER_DESC", vFichierDesc);
         ajaxRequest.add( "P4010_FILE_FICHIER_NAME", vFichierFile);
          var gReturn = ajaxRequest.get();
         if (gReturn){
              $x("getlistfichier").innerHTML = gReturn;
              closeForm();
         }else{
              alert ('Problèmes dans le call Ajax ADD_REPERTOIRE_FORM_DB \n La valeur retournée est: \n' + gReturn);
    }*4. PLSQL PROCEDURE *
    h1. WHEN the query is executing it's return ORA-01403: no data found. WHY ????
    PROCEDURE P_ADD_FICHIER_FORM_DB(
                P_NUMERO_PROJET number,
                P_CAT_ID number,
                P_FICHIER_NOM varchar2,
                P_FICHIER_DESC varchar2,
                P_FILE_FICHIER_NAME in varchar2)
    AS
      vNumeroProjet number;
      vFichierNom varchar(255);
      vFichierDesc varchar(2000);
      vCatId number;
      vActif number;
      vDocSize number;
      vNomUsager varchar(10);
      vDateCreation date;
      vFichierTypeId number;
      vNomReel varchar2(1000);
      vNomReel2 varchar2(1000);
      vCurVal number;
      BEGIN
        SELECT FILENAME,DOC_SIZE,CREATED_ON
        INTO
        vNomReel,vDocSize,vDateCreation
        FROM WWV_FLOW_FILES
        WHERE FILENAME = P_FILE_FICHIER_NAME;
    /*GET ERROR sqlerrm:ORA-01403: no data found */
      END P_ADD_FICHIER_FORM_DB;h4. hope someone help us soon
    Thanks in advance
    jocelyn

    Finally we find what was wrong so i give you the solution.
    In the javascript on the function add_fichier_form
    We need to append the div of the form to the default form of apex wwvFlowForm
    so the line*
    $('#div_upload_fichier').parent().appendTo('#div_base');
    should be change to*
    $('#div_upload_fichier').parent().appendTo('#wwvFlowForm');Edited by: jocbed on 2012-01-26 11:08

  • How to decide when to keep backing bean in request and session.Pros/cons

    How to decide when to keep backing bean in request and session.Pros/cons

    Depends on where the bean data must be available. Start with request scope. If you need the data in session scope, then think twice about impacts (memory usage, multiple browser tabs, etc) unless the data is obviously targeted on the session scope (loggedin user, user settings, dropdown data, etc).

  • Cookies, URL-Rewriting, and Sessions

    Hi All,
    I am aware that this is probably a question that has been asked many times in the past. Nonetheless, I have not been able to fully comprehend the differences. Therefore I would appreciate it, if someone could kindly spend some time explaining the differences between the three and when each would be the most preferred solution. ( cookies, url rewriting and sessions )
    So far what I understand is that, cookies can be used to store small amounts of data not more than 4kb, and that most browsers can not accept more than 20 at a time.... but would it be correct to say that the data is stored within the http headers ?
    URL rewriting, on the other hand is a method which can be used if cookies have been disabled by a browser. The 'session id' is appended to the url, and used to remember the data. ( how ? ). Although, it does mean that the programmer has to be very careful and ensure that rewriting occurs everytime it is passed to the browser, including redirection. ( whatever that means ? )
    Http sessions, seem to be the best solution out of the three ( but if this is the case, why are cookies and rewriting still hanging around today ? And even being taught at universities ? ). Also, they work on top of cookies and if these have been disabled sessions will not work !! ....
    As you can see ( from the above ) I do not have a thorough understanding of the three methods, especially if it comes to specifying the differences between the three.
    I would appreciate an explanation.

    HttpSessions use cookies or url rewritting to pass the session id which the server uses to associate a particular session with a particular request. A well developed web application will be written to use url rewriting when a client has cookies disabled. That being said I yet to see such a web application and personally believe that few people still disable cookies.
    Cookies still have uses.
    Persistant cookies are used to store data that needs to persist between sessions. This data is stored by the browser in a text files and passed to the server in the header. An example of this would be a site that offers personalization would store the user's id so that each time the user accesses the site he would see his personalization without being required to log in. Yahoo is a good example.
    In memory cookies are stored in the browser's memory and is used to store temporary data that goes away when the browser closes. Again this data gets passed to the server in the headers. Temporary cookies can be used to pass data between seperate web applications runing on the same host where storing the data in the session will not because each application has it's own session.

  • Rt6_redirect: source isn't a valid nexthop for redirect target

    I create a ipv6 tunnel for my ipv4 network, so I can visit ipv6 websites, such as http://ipv6.google.com, like this:
    # ip tunnel add sit1 mode sit remote $ISATAP_SERVER local $LOCAL_IP ttl 64
    # ip link set dev sit1 up
    # ip addr add 2001:da8:8000:d010:0:5efe:$LOCAL_IP/64 dev sit1
    # ip -6 route add default dev sit1 metric 1
    where $ISATAP_SERVER is the ip address of the remote server, and $LOCAL_IP is my ipv4 address.
    This is the route info for ipv6:
    $ ip -6 route
    2001:da8:8000:d010::/64 via :: dev sit1 proto kernel metric 256
    fe80::/64 dev eth0 proto kernel metric 256
    fe80::/64 via :: dev sit1 proto kernel metric 256
    default dev sit1 metric 1
    Now I can visit ipv6 websites, and everything seems OK.
    But when I check the log file /var/log/everything.log, I get much information like this:
    Mar 4 19:46:29 localhost kernel: [ 8073.183872] rt6_redirect: source isn't a valid nexthop for redirect target
    It seems there‘s something wrong with the route for ipv6, but I can't figure it out.
    I've googled this for a long time, but many is about the source file route.c, nothing helpful.
    Any ideas? Thanks!

    Thanks cor-el, but the problem is solved, as far as the redirect issue.
    Maybe I should have started a new topic.....maybe I will....
    I just thought since the issue I was having because I had reset the referrer header, was explained through this thread, it would be easier than explaining it again in a new topic.
    At least 1 of those programs I listed, as best I can understand, allows for customized referrer header, site by site. I just can't understand the other one though.
    But you know what, I think I'll just start a new topic, and ask if anyone has experience with these, or can explain the one I can't understand.
    Thanks again :-)

  • Targetted LDP Session

    Hi,
    I have scenario on targetted LDP session as follow
    R1-----R2-----R3----R4
    The interfaces of the routers are not enabled with mpls. If I configure targetted ldp on router R1 to R4, and i create the vrf and distributed the vpn routes via MP-BGP on both routers. Can I do vrf ping from each vrf on both routers ? I think it wont work because mpls will be failed to be routed on R2 and R3. is this correct ?
    anyone can advise me ?
    regards
    -santo-

    Hi,
    MPLS must be enabled on forwarding plane for end to end ping, otherwise you can use MPLSoverGRE to make it functional in your scenario.
    Yasir

  • Prefix FEC advertised over targeted LDP session

    I am doing MPLS L2VPN interop testing with foundry XMR, IOS establishes the targeted LDP session with XMR fine and VC FECs are exchanged. However, I noticed that IOS is also advertising prefix-FEC mappings to XMR. This is puzzling me, since there is no directly link between Cisco and XMR, LDP does not have a link neighborship between Cisco and XMR, why would IOS advertise prefix-FEC? IOS should know that the lables it advertises are never going to be used by a targeted peer. The targeted LDP session is meant for VC-FEC mapping exchange only.
    XMR only advertises VC-FEC over this targeted LDP session unless link-hello is also heard from its peer, in which case, both prefix-fec and VC-fec are advertised

    Jian,
    This is the default behavior indeed and shouldn't cause any issue beyond the extra labels installed in the LIB.
    You can easily change that behavior if you desire so by applying label filtering as follow:
    no mpls ldp advertise-labels
    mpls ldp advertise-labels for 1 to 2
    access-list 1 permit any
    access-list 2 deny
    access-list 2 permit any
    Hope this helps,

  • Report  for bom wise target and actual cost as well as qty at line item

    Dear Experts,
    Is there any standard tcode for bom wise target and actual cost as well as qty at line item level for the month.
    there is one tcode s_alr_87013127 but user has to double click in order to get line item details.
    I want to see line item wise breakup/bom wise target and cost cost as well as qty.
    Thanks in advance.
    regards
    RK

    Dear experts,
    I am still looking for a revert.
    regards
    RK

  • Problem with application item and session state

    Okay, let's see if I can explain this problem coherently.
    I have a small app (one page), with an application item, F_WHERE_CLAUSE.
    This page has three regions in which there are items that the users can populate for search conditions. A couple of these items are "select list with submit" (I still need to upgrade to the AJAX method, I know). There is another region which has one hidden field, called P1_WHERE_CLAUSE. This field is defined to "Always, replacing any value in session state..." with source type of "Item (application or page.....", and a source value of F_WHERE_CLAUSE with no default value.
    I have a button called "Search" which submits the page and fires a PL/SQL process which builds a where condition based upon the other page items and stores the value to the application item F_WHERE_CLAUSE (correctly).
    For testing, I've made the P1_WHERE_CLAUSE field visible so that I can see what's going on. I've also clicked the debug and session buttons to help trace this. After I click the "Search" button and the page submits, debug shows:
    0.02: ...Session State: Save "P1_WHERE_CLAUSE" - saving same value: "1=1"
    followed later by:
    0.05: ...Session State: Saved Item "F_WHERE_CLAUSE" New Value="lower(primary_class) = 'rock' and country = 'Spain'"
    The field P1_WHERE_CLAUSE displays with the correct search criteria as signified by F_WHERE_CLAUSE above. However, If I click the "session" button to view the session state values, P1_WHERE_CLAUSE shows up as:
    P1_WHERE_CLAUSE Textarea    1=1    U while F_WHERE_CLAUSE displays the correct value still.
    The reason this "problem" came up, is that this page also has three SQL report regions which use &P1_WHERE_CLAUSE. for the where condition. While they display the correct results on-screen, each report region also has the "Export to csv" enabled, and the export seems to be using the "1=1" condition (from the "session" window) instead of the search criteria that the on-screen region is using (F_WHERE_CLAUSE and the displayed P1_WHERE_CLAUSE), resulting in a retreival of all records.
    Anybody have any idea what's going on and why, and how to get the csv export to use the correct value for the where condition?
    Thanks,
    Bill Ferguson

    It appears the "Export to CSV" functionality requires the item value to be set in session state. The P1_WHERE_CLAUSE item value never gets saved to session state. The page is rendered and the value is put in the item on the page but until you submit the page session state doesn't know what P1_WHERE_CLAUSE is.
    Create a before header computation or process to set the value of P1_WHERE_CLAUSE (which will save it to session state). It is interesting that the report regions didn't need to look at the value in session state but the "export to csv" does.
    --Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get the job logs from sm35 by using the queue id and session name?

    hi all,
    can any one please let me know how to read the job log from sm35 by using the session name and queue id. i have the job name and job count but is it possible to download the job log by using the queue id and session name.
    FYI..
    i want to read this job log and i want to send it to an email id.
    -> i am using the job_open and submitting the zreport via job name and job count and then i am using the function module  job_close.
    but this is not working in my scenario i have the queue id and session name by using this two i want to get the job log is there any function module available or code please provide me some inputs.
    thanks in advance,
    koushik

    Hi Bharath,
    If you want to download it to the local file then you can follow the instructions in the below link.
    How to download Batch Input Session Log?
    Regards,
    Sachin

  • Session.putValue() and session.setAttribute

    do I have to use session.putValue() before using session.setAttribute() and session.getAttribute() ?
    becuase I have one JSP page include one form (action=TheSameJspFile.JSP) several Submit bottuns each Bottun has its Value.
    in the JSP I request the submit value and depends on it doing stuff ...
    each Value I have to get and to set a session Attribute, if I want to putValue it will delete the old value.
    how can I solve this?

    You need to store something in the session before you can retrieve it.
    So, you need to do a setAttribute() to place something in the session. Then you use getAttribute() to retrieve it. DO NOT use putValue as it is deprecated and has been replaced by setAttribute(). DO NOT use getValue() as it is deprecated and has been replaced by getAttribute().

  • How to create bdc for fbs1 using both call transaction and session

    Hi Friends,
    i have one problem with tcode FBS1, i need to create a bdc program for both call transaction and session method using subroutine.
    first call transaction needs to execute if there is an error sesion has to execute. if u have code please forward.
    thanks in advance.
    chandramouli pothugunta

    where as in call transaction we can do error handling explictly.those errors  are stored in one file .this file will send to the error log(session method),i.e session log.
    in the above case we use both call transaction n session method at time in one program.sample code is below ,go through it .
    data : begin of itxk01 occurs 0,
    end of itxk01.
    data : bdcdata like itbdcdata occurs 0 with header line.
    data : itbdcmsgcoll like itbdcmsgcoll occurs 0 with header line,
             itxk01 like itxk01-dup occurs 0 with header line.
    call gui-upload.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call transaction 'xk01' using bdcdata mode 'a' update 's' messages into itbdcmsgcoll.
    if sy-subrc ne 0.
    append itxk01 into  itxk01-dup.
    endif.
    endloop.
    if not itxk01-dup[] is initial.
    refresh itck01.
    call bdc_open_group
    itxk01 = itxk01-dup.
    loop at itxk01.
    refresh itxk01.
    perform bdc-dynpr0 using 'prg' 'scr'
    perform bdc-dynfld using fnam fval
    call bdc-insert.
    endloop.
    call bdc-close-group.
    form bdc-dynpr0 using pr sc
    endform .
    form bdc-field  using fnam faval
    endform.
    this will help u.
    reward points for me
    kiran

  • VI Server in the real time target and Vi client under the local computer

    Hi,
       In my project i want to make a data communication between a vi server which is runnig in the real time target and a vi client runs under the local computer (My Computer target).
    My problem is when i Click the property terminal of the property node function (located on the Functions>>All Functions>>
    Application Control palette) , i don't find the front panel open option from the shortcut menu.
    Thanks.

    The Front Panel options are methods.  Try dropping an Invoke Node down instead of a Property Node.
    Applications Engineer
    National Instruments

  • Adding redirect path and  pattern in Lion server for configuring software update server

    Adding redirect path and  pattern in Lion server for configuring software update server.Any changes

    Ok, after days of browsing on the forum I found the following hint on another discussion related to AFP access:
    "This may be a service ACL issue.
    It turns out one of the latest Apple updates turned on Service ACL's which caused AFP connections to be  blocked. Once I fixed the Service ACL in Server Admin... all connections and Single Sign On worked."
    Well, after allowing access to all services to all users with Server Admin, we were finally able to log in the server with our admin account...
    So, there must have been an update that turned on ACL's which caused even our local access, probably for OD/Kerberos, on the server to be restricted.

  • What is the significance of the Assembly Deployment Target and Feature Scope?

    Hello,
    We have created a project as Farm Solution (not sandbox).
    Under project properties we can see an option for Assembly Deployment Target : GAC or WebApplication.
    I know that GAC will deploy the dll to windows\assemblies and WebApplication will deploy to website/bin folder.
    Now, we add a feature to the project; in here we can see a dropdown for scope with options as: Farm; Web; Site; WebApplication. I know that depending upon what option is chosen; the feature can then be activated by going to the respective manage features
    option via SharePoint front end UI.
    Can you tell me what is the significance of the Assembly Deployment Target and Feature Scope?

    >>Can you tell me what is the significance of the Assembly Deployment Target and Feature Scope?
    Feature scope can be decided based on the type of artifacts you will be building
    Check the below link for what type of artifacts can be build at different levels of scopes
    http://msdn.microsoft.com/en-us/library/ms454835(v=office.14).aspx
     wrt to Assembly Deployment Target depends on what type of components you are deploying through your solution which will be specified in manifest.xml. There are advantages
    if you deploy the components to web application rather GAC like all Apppools will not get recycled, avoiding IIS reset etc. But if you have 3rd party dlls and feature receivers which need to deployed along with the solution then its advisable to deploy to
    GAC
    http://trentacular.com/2009/06/sharepoint-differences-between-global-and-web-application-targeted-solution-deployment/
    https://www.captechconsulting.com/blog/james-brocato/sharepoint-without-the-gac
    Hope this helps.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Maybe you are looking for

  • One account connects, one doesn't

    Daughters new MacBook, she has a managed account, I have administrator account. Transferred her account from home iMac. Have previously seen issues with keychain on home machine, seem to be resolved now. We're at a hotel on vacation, I can connect ea

  • Aperture 3 not in Media Browser - Non-Default Library Location Issue

    Hi Everyone, My Aperture Library cannot be viewed in the media browser. I created a new Aperture library in the default location which resolved the issue; however, I have my library on an external hard drive and it is too big to put on my internal HD

  • SAP HCM- Evaluation Path

    Hi, under the organisation management evaluation path, the system has specified the path as : O-S-P whereby its from organisational unit to position. In the entry profile for employee selection, the evaluation path the system uses was O-S-P, the prob

  • I can't open the RAW files from my new Nikon D610 in PSE10. Any help for this?

    I recently purchased a Nikon D610.  I have PSE 10.  I can't open my RAW files now and I always shoot in RAW.  I've tried everything, but still can't open m,y files in the RAW format.  Any help??????

  • HT1977 opening an application with a computer

    how can one open face book application through a computer