Topic
  • 9 replies
  • Latest Post - ‏2013-02-15T23:26:48Z by bbski
bbski
bbski
26 Posts

Pinned topic Page Caching Issue

‏2013-02-13T22:38:39Z |
Hello,

Environment
Portal 6.1.5.1/WAS 7.0.0.23/WebSphere Portlet Factory Designer Version: 7.0.0.2

We are experiencing a very strange issue with a portlet consisting of sevaral models. The page works as follows. The page is displayed with a drop-down list box where the user selects an action. Once an action is selected, the portlet page is refreshed from 1 of several models.

The issue is on a the page loaded by 1 specific model, the input text boxes (3 of them) are pre-populated with the last values entered for any and all users. It is not browser specific and clearing the browers cache does not help.

Any help/ideas is greatly appreciated.
Updated on 2013-02-15T23:26:48Z at 2013-02-15T23:26:48Z by bbski
  • mburati
    mburati
    2561 Posts

    Re: Page Caching Issue

    ‏2013-02-14T04:17:15Z  
    Look at what that model is basing that Variable on (results of a back end data call or other?) and whether anything's caching that variable or a method that returns that variable across users.

    If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.

    If that doesn't help, then please contact customer support, as that would seem to be a fairly serious issue if it were to happen without a bug in one of the models caching something that it shouldn't across users.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • bbski
    bbski
    26 Posts

    Re: Page Caching Issue

    ‏2013-02-15T00:06:03Z  
    Thanks for the reply.

    This is exactly what I've done, commented out all assignments to/from variables of the text box data posted back to the server.

    We've noticed some very strange behavior. When we restart the server and only a single user accesses the portlet in question, everything is ok. when a 2nd user logs in using different credentials and access the same portlet, then they both start seeing the shared values in the text boxes. There is nothing that is pre-populating these text boxes.

    Additionally, there is some information on the page that is very specific to each user and this is reflected correctly. This indicates that the backing store is NOT sharing user data. It's almost as if the data entry part of the page is being treated as static data that is cached for all users.

    What I'd like to do is display the sessionID or some piece of data from the JSP that can tell me if the JSP is cached. Can you suggest anything?

    thx again!
  • mburati
    mburati
    2561 Posts

    Re: Page Caching Issue

    ‏2013-02-15T02:14:18Z  
    • bbski
    • ‏2013-02-15T00:06:03Z
    Thanks for the reply.

    This is exactly what I've done, commented out all assignments to/from variables of the text box data posted back to the server.

    We've noticed some very strange behavior. When we restart the server and only a single user accesses the portlet in question, everything is ok. when a 2nd user logs in using different credentials and access the same portlet, then they both start seeing the shared values in the text boxes. There is nothing that is pre-populating these text boxes.

    Additionally, there is some information on the page that is very specific to each user and this is reflected correctly. This indicates that the backing store is NOT sharing user data. It's almost as if the data entry part of the page is being treated as static data that is cached for all users.

    What I'd like to do is display the sessionID or some piece of data from the JSP that can tell me if the JSP is cached. Can you suggest anything?

    thx again!
    Are these different users on different systems or at least different browsers or are you using the same browser for the different users?
    If you're using the same browser for the different usres, maybe it's the browser caching inputs that it recognizes are common and not anything to do with the server session?

    If this is across different users on different systems/browsers, then I suggest contacting customer support to work through the issue.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • mburati
    mburati
    2561 Posts

    Re: Page Caching Issue

    ‏2013-02-15T02:15:14Z  
    • mburati
    • ‏2013-02-15T02:14:18Z
    Are these different users on different systems or at least different browsers or are you using the same browser for the different users?
    If you're using the same browser for the different usres, maybe it's the browser caching inputs that it recognizes are common and not anything to do with the server session?

    If this is across different users on different systems/browsers, then I suggest contacting customer support to work through the issue.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Also, to show the session on the page, you could add something like this to the html page:

    
    DEBUG Session ID:  <%=request.getSession().getId()%>
    


    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • bbski
    bbski
    26 Posts

    Re: Page Caching Issue

    ‏2013-02-15T16:17:55Z  
    • mburati
    • ‏2013-02-15T02:15:14Z
    Also, to show the session on the page, you could add something like this to the html page:

    <pre class="jive-pre"> DEBUG Session ID: <%=request.getSession().getId()%> </pre>

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Thanks again Mburati,

    These are different users on different systems using different browsers. also broken with same user using 2 different browsers on the same system.

    thx for the debug sessionID print. The sessionID's are different.

    My next questions are:
    1) If we are not explicitly saving the values from the text boxes on a post back and then setting them on the response, how can they be populated? Why I ask is because this does not happen immediately. It takes a few tries of doing post-back from one of the browers before the text boxes are populated in another browser.

    2) Secondly, if we are not explicity saving the text box values during post-back yet they are being rendered back to multiple browers, where are the values being stored so they are global? Is there a temporary caching location where values are stored during postback?

    3) Is is possible to dump the response object for each session to a log file?
  • bbski
    bbski
    26 Posts

    Re: Page Caching Issue

    ‏2013-02-15T17:04:45Z  
    • bbski
    • ‏2013-02-15T16:17:55Z
    Thanks again Mburati,

    These are different users on different systems using different browsers. also broken with same user using 2 different browsers on the same system.

    thx for the debug sessionID print. The sessionID's are different.

    My next questions are:
    1) If we are not explicitly saving the values from the text boxes on a post back and then setting them on the response, how can they be populated? Why I ask is because this does not happen immediately. It takes a few tries of doing post-back from one of the browers before the text boxes are populated in another browser.

    2) Secondly, if we are not explicity saving the text box values during post-back yet they are being rendered back to multiple browers, where are the values being stored so they are global? Is there a temporary caching location where values are stored during postback?

    3) Is is possible to dump the response object for each session to a log file?
    ok, I did find something that might be of interest. I found that in our DataPage builder, we are specifying:
    Create New Variable From HTML/From Input Elements
    for the Variable. I notice this is different than all our other portlets. In this case, in our HTML page, we actually use HTML input's whereas our other DataPages, we decalre spans and map them to schemas.

    is it possible this is creating some kind of global storage for these values?
  • mburati
    mburati
    2561 Posts

    Re: Page Caching Issue

    ‏2013-02-15T18:18:35Z  
    • bbski
    • ‏2013-02-15T17:04:45Z
    ok, I did find something that might be of interest. I found that in our DataPage builder, we are specifying:
    Create New Variable From HTML/From Input Elements
    for the Variable. I notice this is different than all our other portlets. In this case, in our HTML page, we actually use HTML input's whereas our other DataPages, we decalre spans and map them to schemas.

    is it possible this is creating some kind of global storage for these values?
    While that option (create new variable from html) is not one that I typically use or recommend (most of WEF works off of schema described XML variables, so it's best to go that route), I don't know of any reason why such a variable would be shared across users.

    As I mentioned above, if you can post a sample (w/no confidential info or intellectual property) then someone here might be able to spot what's going on (or you may spot it yourself while building the minimal sample - as often happens in such cases). If you cannot, then you may want to contact customer support.

    Data Page and Page automation associate input and output pages with Variables (best case - with input and output variables defined by service operations, so it automates more of the process for you). Look at the generated page html and JSP code in the design view and at the generated saveData method to see what it's doing - it helps to have a good understanding of what the builders are generating for you when you're trying to diagnose such issues. Look at the Variable(s) in use in the design view - they should be something like "persisted for failover" (session based) and not "readonly" (shared across users via one common reference in the generated webapp). Then look at what your model is doing with that generated variable after the user submits the form - it must be doing something with that data, otherwise it wouldn't be useful. Is the model saving the results of that generated variable somewhere and then getting it back from somewhere at another point in time? If so, what is it doing there and could that be accessing some shared back end store?

    Again, If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.
    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • DGawron
    DGawron
    580 Posts

    Re: Page Caching Issue

    ‏2013-02-15T18:56:56Z  
    • bbski
    • ‏2013-02-15T16:17:55Z
    Thanks again Mburati,

    These are different users on different systems using different browsers. also broken with same user using 2 different browsers on the same system.

    thx for the debug sessionID print. The sessionID's are different.

    My next questions are:
    1) If we are not explicitly saving the values from the text boxes on a post back and then setting them on the response, how can they be populated? Why I ask is because this does not happen immediately. It takes a few tries of doing post-back from one of the browers before the text boxes are populated in another browser.

    2) Secondly, if we are not explicity saving the text box values during post-back yet they are being rendered back to multiple browers, where are the values being stored so they are global? Is there a temporary caching location where values are stored during postback?

    3) Is is possible to dump the response object for each session to a log file?
    It sounds like there is something in the web app that is populating those text boxes. You mentioned disabling all setters, but as I recall you have a lot of non-trivial LJOs that are used by the models to process page data. Maybe one of those LJOs is populating the fields at the wrong time. Another possibility is that the LJOs are using static variables to cache data and that is how the same data appears for multiple users.

    Assuming this has not been a persistent problem, have you made any changes in the models or LJOs recently?
  • bbski
    bbski
    26 Posts

    Re: Page Caching Issue

    ‏2013-02-15T23:26:48Z  
    • mburati
    • ‏2013-02-15T18:18:35Z
    While that option (create new variable from html) is not one that I typically use or recommend (most of WEF works off of schema described XML variables, so it's best to go that route), I don't know of any reason why such a variable would be shared across users.

    As I mentioned above, if you can post a sample (w/no confidential info or intellectual property) then someone here might be able to spot what's going on (or you may spot it yourself while building the minimal sample - as often happens in such cases). If you cannot, then you may want to contact customer support.

    Data Page and Page automation associate input and output pages with Variables (best case - with input and output variables defined by service operations, so it automates more of the process for you). Look at the generated page html and JSP code in the design view and at the generated saveData method to see what it's doing - it helps to have a good understanding of what the builders are generating for you when you're trying to diagnose such issues. Look at the Variable(s) in use in the design view - they should be something like "persisted for failover" (session based) and not "readonly" (shared across users via one common reference in the generated webapp). Then look at what your model is doing with that generated variable after the user submits the form - it must be doing something with that data, otherwise it wouldn't be useful. Is the model saving the results of that generated variable somewhere and then getting it back from somewhere at another point in time? If so, what is it doing there and could that be accessing some shared back end store?

    Again, If you post a sample (with no confidential info or intellectual property) showing what you're having trouble with, it might make it easier for someone to quickly spot what's wrong with it.
    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    we reworked the model to not even use a DataPage and saved the posted text box values into an XML variable that we used to pass around for validation and other business logic. This seems to work!! We came to the same conclusion as you did looking at the other models that used schemas versus the (create new variable from html)

    What I had noticed with the (create new variable from html) is the corresponding JSP code had generated java to populate the HTML <input> text boxes. Now, the big question is why the text boxes were being populated with what appears to be global data. There were no static backing vars or anything else pre-populating those fields, just the generated java.

    I would have supplied a sample, but think we may have nailed this one. It still would be beneficial to create a sample with the (create new variable from html) on the DataPage. I will try to do this if time permits.

    thanks again your assistance. very much appreciated!