Problem on "Session Handling"

Hi everyone,I write a simple servlet program on Session handling.In this I use invalidate() method to invalidate the session.
invalidate() But the problem is that when i push the back button the session data gets back,means in the previous page session data gets visible.please help me.

All what you can do is to instruct the client not to cache the page. You can do this by adding the following entries to the HTML head:
<meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">If you want to do this programmatically on HttpServletResponse (using a Filter or so):
response.setHeader("cache-control", "max-age=0, must-revalidate, no-cache, no-store, private"); // HTTP 1.1
response.setHeader("pragma", "no-cache"); // HTTP 1.0
response.setDateHeader("expires", -1); // ProxyMake sure that you clears your browser cache before testing.

Similar Messages

  • Session handling missmatch - Integrated ITS

    Hi,
    we use integrated ITS (ERP 2005, Web dispatcher 7.00.11 Patch Number 167) and have problems with the session handling. Sometimes (Probability 1 to 1000) one user receives information of other sessions (other user).
    The problems occurs even with standard services like PZ02.
    Are there any service parameters in SICF to avoid this?
    Who had similar problems with session handling?
    Did anybody solve this problems?
    Best regards
    Thomas

    Hi,
    we use integrated ITS (ERP 2005, Web dispatcher 7.00.11 Patch Number 167) and have problems with the session handling. Sometimes (Probability 1 to 1000) one user receives information of other sessions (other user).
    The problems occurs even with standard services like PZ02.
    Are there any service parameters in SICF to avoid this?
    Who had similar problems with session handling?
    Did anybody solve this problems?
    Best regards
    Thomas

  • Again Session-Handling

    Hi there, one question about session-handling in JSP.
    I'm trying to set attributes in the JSP and afterwards get them back.
    No chance! They always vanish! Here is the code:
    <%@page contentType="text/html"%>
    <%@page import="java.util.*"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <%
    // Output of Session-Attributes
    for (Enumeration enum=session.getAttributeNames();enum.hasMoreElements();)
    String name2 = (String)enum.nextElement();
    String value2 = (String)session.getAttribute(name2);
    out.println(name2+":"+value2);
    // Set Attributes that I get from Form!
    String name = request.getParameter("name");
    String value = request.getParameter("value");
    if (name!=null)
    session.setAttribute(name,value);
    %>
    <form action="SessionTest.jsp" method=get>
    <input type=text name=name>
    <input type=text name=value>
    <input type=submit>
    </form>
    </body>
    </html>
    Really dont have a clue!
    Thx, ToM

    Works ok for me:
    Couple of suggestions: put the setting code, before the display code.
    That way you will see the pair that you just set in session ;-)
    Also try this:
    Session id = <%= session.getId() %> and see if it stays the same.
    If you are getting a different session every time, then its not maintaining the session.
    Common cause of session problem is: cookies are turned off.
    Either turn cookies on, or use URL rewriting:
    <form action="<%= response.encodeURL("SessionTest.jsp") %>">
    <%@page contentType="text/html"%>
    <%@page import="java.util.*"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <%
    // Set Attributes that I get from Form!
    String name = request.getParameter("name");
    String value = request.getParameter("value");
    if (name!=null)
    session.setAttribute(name,value);
    // Output of Session-Attributes
    for (Enumeration enum=session.getAttributeNames();enum.hasMoreElements();)
    String name2 = (String)enum.nextElement();
    String value2 = (String)session.getAttribute(name2);
    out.println(name2+":"+value2 + "<br>");
    %>
    <form action="SessionTest.jsp" method=get>
    <input type=text name=name>
    <input type=text name=value>
    <input type=submit>
    </form>
    </body>
    </html>Cheers,
    evnafets

  • Session handling in Flex

    I am using remote object for the flex and service communication. After multiple time log in and log out , which is done by remote object call also, I am getting different session id for browser and from the client side. Is there any way to restrict this session id conflict

    I think you are getting confused by comparing flex
    development with jsp serverside development, its completely
    different thing,
    1. How to pass hidden variables using flex.(In jsp we pass it
    throuth hidden field, is there any mechanism similar to that one)
    -- honestly, where do you really want to pass hidden field to
    ? (hidden fields is a hack implemented to overcome the way http
    protocol works , in flex you don't need that hack) .
    2) you can implement exception routine same way (even easier
    in flex) if error occures show this and this page(for example error
    canvas. with error mesage thats it,
    3) How to do session handling in Flex.
    -- question is too vague, do you ave concrete problem that
    you think of?

  • Advice for Session Handling

    I'm in the process of constructing a second application, and have once again faced the same problem I've faced in the past.
    Session Handling. One thing That I'm very concerned about is people using the Browser Back Button. Unfortunately when people use the back button the page they see is not coming from the server, but from their browser's cache. This means that the session info that they see is not up to date. In both my applications this would lead to some seriou problems.
    Any suggestions as to how I can either remove the Browser's Back button, or have the servlet refresh when the back button is pushed. Any other suggestions wouls also be greatly appreciated.
    Thanks,
    -Amos

    Hi
    It would be very helpful if you can present a scenario in your application where the back button usage would cause seroius problems.
    Technically speaking you cannot remove the back button. But what you can do is through Java Script open browser windows where the back and front button's tool bar is not visible, but note that the user's can still use the keyboard to move back and forth.
    As far as session handling is concerned you would have to take all the worst case scenarios while designing your web application like the browser crashing, user's closing their browser windows without explicit logout, a database transaction not going through etc.
    Present a scenario of your application so that the session handling mechanism may be discussed.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • 'MAPI Session Handle' of the NGW 'Object Request Broker' could not be accessed (0x80004005) on attempt to get an address book

    Hi!
    When I try to access GW address book by calling
    DIGWAccount6::GetSystemAddressBook, or DIGWAccount6::AddressBooks, or even
    DIGWMessage::Send, I'm getting messagebox with title "Address Book Error"
    and message: "The 'MAPI Session Handle' of the Novell GroupWise 'Object
    Request Broker' could not be accesses. The address book cannot run (error:
    status: 0x80004005)."
    I'm using .NET and I only get this error when I create a console
    application. With windows application everything goes fine.
    I've tried reinstalling GW client, running fixmapi utility, installing
    different versions of MAPI CDO, but still got this problem.
    Any ideas?

    In the Application object.
    >>> On Monday, July 26, 2010 at 4:16 PM,
    shutchinson<[email protected]> wrote:
    > Where would we set this?
    >
    > Thanks!
    >
    > Scott
    >
    > Preston Stephenson;1755943 Wrote:
    >> Do you need to use the MAPI address book providers?
    >> Can you use MultiLogin and set MultiLoginAddressBookSupport = TRUE?
    >>
    >> Preston
    >>
    >> >>> On Tuesday, November 11, 2008 at 4:22 AM, Vladimir
    >> Iofik<[email protected]>
    >> wrote:
    >> > Hi!
    >> > When I try to access GW address book by calling
    >> > DIGWAccount6::GetSystemAddressBook, or DIGWAccount6::AddressBooks, or
    >> even
    >>
    >> > DIGWMessage::Send, I'm getting messagebox with title "Address Book
    >> Error"
    >>
    >> > and message: "The 'MAPI Session Handle' of the Novell GroupWise
    >> 'Object
    >> > Request Broker' could not be accesses. The address book cannot run
    >> (error:
    >>
    >> > status: 0x80004005)."
    >> > I'm using .NET and I only get this error when I create a console
    >> > application. With windows application everything goes fine.
    >> > I've tried reinstalling GW client, running fixmapi utility,
    >> installing
    >> > different versions of MAPI CDO, but still got this problem.
    >> >
    >> > Any ideas?

  • Trouble with session handle???

    Hi everybody, its me again... i solve part of my problem but now i have another problem thats bothers me....my scenario is the follow: i have an app running in a portal, then i have a link in the portal who bring me a pop up of the active page of that app, that is shown on the portal in that moment. when i call the pop up, some class attributes change its values for do something, when i close the pop up, those class attribute refresh and take its initial values (values necessary to run correctly in the portal) BUT, when i minimize the window (no close it) and start to manipulate the app in the portal (the app is statefull), the values stay the same as if i was operating the app in the pop up and obvious do something that it should'nt do. My question is: there is some way...may be with session handler like sap-sessioncmd (i test it but it doesnt work), that help me to manage diferent session for the pop up and the app running in the portal...or may be some parameter (that is pass it via url) that help me to create another object of the class when i calls the pop up

    thanks for the help. I thought Id tell you more about what I
    am doing and see if you have comments - we use google to market our
    company so clicks are costing us big bucks. currently, our sites
    rely on session management to operate, so I realize that folks
    having cookies off is really hurting us. All the references I can
    find tote passing the session.URLToken around the site to make it
    cookie independent. I havent done this yet, first im trying to get
    a handle on how many people have cookies off (like you are), and
    where people are coming from to see if we are having click fraud
    (which we are very suspicious of).
    Is this what you would do (passing the URLToken around)? Any
    other comments you have would be very much appreciated.

  • Error in "niDMM Configure Measurement Digits.vi" - The session handle is not valid.

    I get the error message below, when I run my LabVIEW program as an EXE, but no problem while running under LabVIEW development. Why is there any difference between the build EXE and the development environment (it uses the same VI's) and how can I debug this problem?
    Running LabVIEW 2010 SP1.
    Error message:
    Error -1074130544 occurred at niDMM Configure Measurement Digits.vi
    Possible reason(s):
    The session handle is not valid.
    TIA
    Bent
    Attachments:
    ErrorMessage.png ‏7 KB

    Dear All
    I also got this problem while using GPIB to control my function generator(HP33120A).
    Here's my error message
    Mode.vi<ERR>Driver Status:  (Hex 0xBFFA1190) The session handle is not valid.
    And my code was from the modified example of driver as following:
    please help me to figure it out. Thanks a lot!!

  • Session handle with PXI2503

    Hello
    I have created DLLs with Labwindows 7.0 on windows 2000 operating system. Those DLLs are used by another application developped with Powerbuilder software. I use this application to program PXI materials: MXI3 kit, PXI-1042 chassis, PXI2503, PXI6527 and PXI-GPIB. With my user profile, I can program those materials through the application I have implemented. The other users can't program PXI materials with my application. This application uses niSwitch_init function. When the application encounters this function, it can't establish a session handle. The session value is zero and the returned status code is BFFFA002B. Programming directly the PXI2503 card with NI examples woks with everybody.
    I would like to know if there is a link between user profile and programming PXI materials.
    Is there any solution to my problem?

    Hi,
    I answered a similar question on another thread in french.
    Actually, it is not usefull to duplicate questions (french & english) on the forum.
    Thanks in advance for that,
    Regards,
    David D.

  • Problem with event handling

    Hello all,
    I have a problem with event handling. I have two buttons in my GUI application with the same name.They are instance variables of two different objects of the same class and are put together in the one GUI.And their actionlisteners are registered with the same GUI. How can I differentiate between these two buttons?
    To be more eloborate here is a basic definition of my classes
    class SystemPanel{
             SystemPanel(FTP ftp){ app = ftp};
             FTP app;
             private JButton b = new JButton("ChgDir");
            b.addActionListener(app);
    class FTP extends JFrame implements ActionListener{
               SystemPanel rem = new SystemPanel(this);
               SystemPanel loc = new SystemPanel(this);
               FTP(){
                       add(rem);
                       add(loc);
                       pack();
                       show();
           void actionPerformed(ActionEvent evt){
            /*HOW WILL I BE ABLE TO KNOW WHICH BUTTON WAS PRESSED AS THEY
               BOTH HAVE SAME ID AND getSouce() ?
               In this case..it if was from rem or loc ?
    }  It would be really helpful if anyone could help me in this regard..
    Thanks
    Hari Vigensh

    Hi levi,
    Thankx..
    I solved the problem ..using same concept but in a different way..
    One thing i wanted to make clear is that the two buttons are in the SAME CLASS and i am forming 2 different objects of the SAME class and then putting them in a GUI.THERE IS NO b and C. there is just two instances of b which belong to the SAME CLASS..
    So the code
    private JButton b = new JButton("ChgDir");
    b.setActionCommand ("1");
    wont work as both the instances would have the label "ChgDir" and have setActionCommand set to 1!!!!
    Actually I have an array of buttons..So I solved the prob by writting a function caled setActionCmdRemote that would just set the action commands of one object of the class differently ..here is the code
    public void setActionCommandsRemote()
         for(int i = 0 ; i <cmdButtons.length ; i++)
         cmdButtons.setActionCommand((cmdButtons[i].getText())+"Rem");
    This just adds "rem" to the existing Actioncommand and i check it as folows in my actionperformed method
         if(button.getActionCommand().equals("DeleteRem") )          
                        deleteFileRemote();
          else if(button.getActionCommand().equals("Delete") )
                     deleteFileLocal();Anyway thanx a milion for your help..this was my first posting and I was glad to get a prompt reply!!!

  • Problem with sessions in Kate Editor

    Hey guys!
    I'm using Kate Editor to code and i'm having problems with sessions. If kate is open and I logout KDE, when I come back to KDE all my customizations in Kate's session (activated plugins, font size, etc) are lost.
    If I manually close Kate before logout from KDE, all the customizations are kept when a manually start Kate. I tried a lot of workarounds, but none worked.
    Is this a bug? Someone else with this issue?
    Thanks in advance!

    The Warning errors are simply because you don't have the tablespaces, users, and roles defined in your application system under the DB Admin tab. Unless it is important to you to capture the physical implementation of your tables exactly as well as the table definitions, you can safely ignore these. If the physical implementation IS important to you, then you need to create these tablespaces, roles and users under the database that you created under the DB Admin tab before you start the capture.
    The Error is because in the set of objects you are capturing there is a foreign key that references the table named "PLEASANT". This table must be among the objects that you are capturing, or must already be in a Table Definition in your application system in the repository.

  • Problem with Sessions in JSP

    Hi,
    I am working on a JSP based website, where I am facing problem with sessions. The user is asked to login by providing her id and password. If found correct, a bean is created and populated with all her details and placed in session scope. I plan to use the information stored in the bean on other related pages until she logs out.
    <jsp:useBean id="validUser" scope="session" class="UserBean" >
    <c:set target="${validUser}" property="userId" value="${fn:trim(dbValues.UserId)}" />
    <c:set target="${validUser}" property="userName" value="${fn:trim(dbValues.UserName)}" />
    </jsp:useBean>
    <c:redirect url="userHome.jsp" /> The user is presented her homepage - 'userHome.jsp', where she can find various links, like 'Update Profile', 'Pay Registration Fees', 'Book Room' etc. The information stored in the bean is available on 'userHome.jsp'page.
    <A HREF='userHome.jsp'>Home</A>
    <A HREF='editPersonal.jsp'>Update Profile</A>
    <A HREF='registrationFee.jsp'>Pay Registration Fees</A>
    <A HREF='bookRoom.jsp'>Book Room</A>
    <A HREF='logout.jsp'>Logout</A> The problems are:
    1. Whenever user clicks on any of the above mentioned links and moves to any page, the bean comes out as null.
    <%-- Verify that the user is logged in --%>
    <c:if test="${validUser == null}">
    <jsp:forward page="loginForm.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}" />
    <jsp:param name="errorMsg" value="You must be logged in to access this site." />
    </jsp:forward>
    </c:if> 2. The URL shows an additional jsessionid, which my client doesn't want to see.
    3. On every click on any link, the value of this jsessionid changes.
    What I presume, when I am clicking on different links, my session changes, and so I am seeing a different jsessionid. And since session is changing, therefore the bean is not available in a different session.
    All this works fine with localhost, problem comes into picture, when I upload my pages to the server.
    Puzzled, can anyone help, where am I going wrong? Let me add here, I am new to JSP and hence don't have much resources with me.

    There are several ways sessions can be exchanged between the browser and the server in a j2ee web application.
    1. The default is through cookies. However when the client does not accept cookies, the server appends the session id to the url.
    2. Some servers also facilitate session information exchange using session id in the url even if the client does accept cookies. This is usually ahieved through a setting in some server configuration file.
    You will have to find out why the server in your application is appending the session id to the url.
    Whatever be the case, the server should be able to look up the session from the incoming request (be it from the session id in the url or a session cookie).
    When session information is exchanged through the JSESSIONID in the url, you should ensure that each and every url that goes to the server has this input parameter. To do that all links and form post urls in your servlet/jsp should be treated with a call to encodeURL().
    For example, in a jsp
       <a href = "<%=response.encodeURL("/nextJsp.jsp")%>">Click here </a>
    or
       <form action = "<%=response.encodeURL("/nextJsp.jsp")%>">
       </form>etc.
    ram.

  • Problem with Sessions, Servlets, Netscape and Solaris

    We are experiencing a problem that is confounding and frustrating us (I have
              a felling that it is something exremely minor that we are overlooking).
              Here goes:
              Context:
              The problem only occurs when using a netscape browser against weblogic
              4.51running on our Solaris 7 box (Everything works fine through IE, and
              through both browsers against our development machines which are on NT)
              Problem:
              We have a bunch of JSP pages and servlets that are used togehter throughout
              our site. They both manage session information for the user. What is
              happening is that there is no problem maintaining session information among
              all the JSP pages, but when we hit a servlet that we use to stream graphs
              back to the browser, it gets the session but it has no contents all of a
              sudden. What seems to be even more strange is that the session is not
              tagged as new (by checking isNew()), it is just empty of the contents that
              were placed it by the JSP pages. Again, this is only occurring from
              Netscape browsers against our Solaris server.
              If anyone can provide any help it would be greatly appreciated. I can
              provide more details if need be.
              Jeremy
              

    There is a property in the weblogic.properties file that lets you set
              the cookie name. If this isn't set, the port will be appended as part of
              the name. I've had a similar problem switching between http and https
              and losing sessions.
              Carles
              Jeremy wrote:
              >
              > in the link tothe servlet the URL had a :80 in it. This was because the url
              > was generated by a JSP page so that when it was moved from server to server
              > and port to port the code wouldn't have to be changed. Unfortuneately,
              > Netscape sucks and takes this to mean that x.x.x.x and x.x.x.x:80 are
              > different and won't acknowledge the cookie from the JSP pages (x.x.x.x) to
              > the servlet (x.x.x.x:80). Thanks fpr your help.
              >
              > Jeremy <[email protected]> wrote in message
              > news:[email protected]...
              > > my mistake, it appears to always happen on port 80 regardless of the
              > server
              > > it is on.
              > >
              > > Jeff Martin <[email protected]> wrote in message
              > > news:[email protected]...
              > > > It really sounds like your servlet is making a new session, even though
              > > > isNew() doesn't say so. What you might try to do is use session.getId()
              > > > to print out the session ID from your jsp pages as well as your servlets
              > > > to determine if it really is a new session.
              > > >
              > > > Do your servlets and JSPs both use the same scheme (http or https) or
              > > > cookie.setSecure()? Do your cookies use domains or paths in either
              > > > servlets or jsps (cookies can be restricted to certain subdirectories
              > > > which might be different between jsps and servlets)? Are you testing
              > > > through a proxy or firewall, or does either browser have different proxy
              > > > settings than the others?
              > > >
              > > > Jeff
              > > >
              > > > Jeremy wrote:
              > > > >
              > > > > We are experiencing a problem that is confounding and frustrating us
              > (I
              > > have
              > > > > a felling that it is something exremely minor that we are
              > overlooking).
              > > > > Here goes:
              > > > >
              > > > > Context:
              > > > > The problem only occurs when using a netscape browser against weblogic
              > > > > 4.51running on our Solaris 7 box (Everything works fine through IE,
              > and
              > > > > through both browsers against our development machines which are on
              > NT)
              > > > >
              > > > > Problem:
              > > > > We have a bunch of JSP pages and servlets that are used togehter
              > > throughout
              > > > > our site. They both manage session information for the user. What is
              > > > > happening is that there is no problem maintaining session information
              > > among
              > > > > all the JSP pages, but when we hit a servlet that we use to stream
              > > graphs
              > > > > back to the browser, it gets the session but it has no contents all of
              > a
              > > > > sudden. What seems to be even more strange is that the session is not
              > > > > tagged as new (by checking isNew()), it is just empty of the contents
              > > that
              > > > > were placed it by the JSP pages. Again, this is only occurring from
              > > > > Netscape browsers against our Solaris server.
              > > > >
              > > > > If anyone can provide any help it would be greatly appreciated. I can
              > > > > provide more details if need be.
              > > > >
              > > > > Jeremy
              > >
              > >
              

  • Problem with Intrastat handling (MEIS)

    Dear SCN Members,
    we have a problem with Intrastat handling:
    Our company is in Great Britain (example VAT-No. GB123456789)
    We have a vendor in Switzerland (no EU VAT-No.), who has a fiscal representative in Belgium (example VAT-No. BE1234567890).
    Both have a separate vendor number (swiss vendor: 23176, belgian vendor: 33179).
    We created a partner "WL" (Goods Supplier) in the vendor master data of the swiss vendor and assigend the belgian vendor number. The swiss vendor master data has nothing filled in the "VAT Reg. No." field (LFA1-STCEG) of the vendor master data. The belgian vendor number has the belgian VAT-No. filled in the "VAT Reg. No." field (LFA1-STCEG) of the vendor master data.
    The partner "WL" is automatically taken into the purchase order header partners and is also taken into account for the goods receipt posting.
    After I have posted the vendor invoice, the line is shown in transaction MEIS, but the incompletion log is always showing message no. EIP029:
    The system did not find the VAT registration number of vendor 23176.
    In my opinion, the VAT no. of the fiscal representative (BE1234567890) should be taken into account for the Intrastat reporting, as the swiss vendor has no VAT number. We have not yet managed to get the belgian VAT into the Intrastat report.
    Could you please clarify. Thanks in advance for your help!

    Hi,
       Please refer the KBA: 1988909 - MEIS: Error EIP 029 "The system did not find the VAT registration number of vendor The reason and the solution is well explained in the KBA. You may change the configuration as explained in the KBA and test again.
    Regards,
    AKPT

  • Problem removing session attributes

    I have a problem removing session attributes
    I try w/ mysession.removeAttribute("key");
    but it still lives in memory. I've tried setAttribute("key", null) as the API states that will do the same thing, but it doesn't work.
    I can get mysession.invalidate() to work, but I want to keep some of the attributes there, while removing another.
    I get no exceptions and no errors.
    Help.
    Running Tomcat 4
    jre 1.3.1

    Actually,
    response.addHeader("Expires", "-1");should be enough.
    The browser should then contact the Web server for updates to that page via a conditional If-Modified-Since request. You don't want a cache disabling 'overkill', since you'd still want the page to remain in the disk cache and used in appropriate situations without contacting the remote Web server, such as when the BACK and FORWARD buttons are pressed...
    Anyway, try this first, and if it doesn't solve your problem, add the other cache-disabling headers, as outlined in the previous post.
    If you're using JSP, verify also that your page has
    <%@ page session="true"%>

Maybe you are looking for

  • Mapping issue in quality system

    Hi Experts, I am new to BODS tool. Currently I am working with BODS 4.2 version. I have an issue with mapping of datastores in quality system. Actually I have created a project in Development system ( done all the things I mean to say Jobs, Workflows

  • Outlook 2010 prompting for password each login to Exchange 2013

    We have a new member server w/ Windows Server 2012 and Exchange 2013.  User's mailboxes were migrated from an old Windows Server 2003 server w/ Exchange 2003 by creating new empty mailboxes in Exchange 2013 then we exported/imported .pst files instea

  • Webutil Implementation Errors

    Hi, During implementation of Webutil,i am facing the following problems: a)FRM-13008. This is despite setting the FORMS90_BUILDER_CLASSPATH to d:/ORAHOME1/forms90/webutil/webutil.jar;D:/ORAHOME1//forms90/webutil/jacob.jar;D:\OraHome1\forms90\java\f90

  • Lightbox using smartshape in Quiz question

    Hi, I'm using one question/quiz slide and would like to create a lightbox to display different comments depending on what choice the user selects. In the comment lightbox, I hope to allow the user to click a X image to close the lightbox.   The exisi

  • Server Environment...

    Hello... I'm looking for a strong server environment for my MAC Pro and then jump for a MAC server with the same base software. I've installed and tested the MAMP Pro for a few days but I've experimented problems (even in a new MAC machine). Eg.: The