Shared Session

Hello
we need a session-store (maintaining state) which is shared between several WebDynpros.
The WebDynpros are embedded into the Portal as iViews, any hint how to get such a shared session-store?
Thanks! Kai

Thank you very much for your ongoing effort, Anton.
Neither
Component Interfaces -> SharedContextIface -> Interface Controller
nor
Components -> SharedContextComp -> Local Component Interface -> Interface Controller
have any option to set required controllers. Only "normal" Component Controllers do have the "Required Controllers" Table under Tab Properties.
Anyone here having experience with EHP1?
Thanks!

Similar Messages

  • Safari Sharing Session Info With Air

    Hi Guys,
    I'm having issues with safari sharing session information
    with my air application. What i'm doing is using a URLLoader to
    send a URLRequest to a web server. When I send the request in my
    app, AIR is applying its own header vars to the request. When i try
    to prevent this by setting URLRequest.manageCookies to false, I
    lose some of the custom header variables that are sent by the
    server in the response. Is there any way of preventing air from
    cookie sharing and still retrieve all the header variables
    including cusom vars?

    This crash seems to be caused by a bug in iCloud. The only workaround that I know of at the moment is to disable Safari synchronization in the iCloud preference pane. Sync bookmarks with iOS devices in iTunes instead. You may also need to do as follows.
    Back up all data.
    Triple-click the text on the line below to the clipboard, then copy it to the Clipboard (command-C):
    ~/Library/Safari/Bookmarks.plist
    Quit Safari.
    Select
    Go ▹ Go to Folder
    from the Finder menu bar. Paste into the text box that opens (command-V), then press return.
    A folder window should open with a file named "Bookmarks.plist" selected. Move the selected file to the Desktop, leaving the folder open.
    Relaunch Safari. It will open with the default set of bookmarks. Delete them all. Select
    File ▹ Import Bookmarks
    from the Safari menu bar. Import from the bookmarks file you moved to the Desktop. Arrange the bookmarks as you wish.
    If Safari now performs normally, you can delete the old bookmarks file. Otherwise, quit Safari again and put back the file you moved, replacing the newer one with the same name. Close the Finder window and post again.

  • Session backing beans and multiple navigator windows sharing session

    Hi let's suppose i have a web and page1, page2 and page3 that should share the backingbean. Normal navigation goes from page 1 to page 2 to page 3.
    I do not want a backing bean per page because i need to share data between my pages. The immediate solution is to put this bean in session context and use it in each page. But this has severe drawbacks:
    - The backing bean is the same each time I access any page, and I want a new bb to be used each time the user requests for page 1
    - When a user has more than one navigator window sharing session, and on each window he is navigating through pages 1 to 3, there can be a big mess because he is accessing to the same bb from both windows.
    So I would like to find a solution that permit the user to navigate from both windows as if the windows had its own session.
    Any hint?
    Thnx

    I have a similar problem as described .
    I hava one window with enterable fields and when you click on a button it opens another window .Both forms are backed by the same bean .since both forms are nearly the same .
    The bean is a managed bean in request scope .
    when I fill in the first window with values and click on the link it opens the second but the first windows elements and now empty .
    Even though it is in Request scope when the second window is being loaded the bean is re-initialized . I would expect a new intance of this bean to be created for the second window .
    This is how I am calling the second window .
    <h:commandButton id="newRequestItem" action="#{requestItem.createNewRequestItem}" rendered="#{createActivationRequest.displayCreateLinks}" onclick="openNewPage('NewRequestItem.jsp');"
    image="images/show_all.gif" title="new request">
    <h:outputText value="new request" styleClass="toolbar-command"></h:outputText>
    </h:commandButton>
    function openNewPage(url)
         aqcbwin= window.open(url, "newRequestItem","toolbar=no, scrollbars=1");
    aqcbwin.moveTo(50, 50);
    target="_new";
    //target="_blank";
    aqcbwin.focus();
    any ideas to what is wrong and how I can correct this .
    Thanks for your help .
    Mark

  • JBoss cluster shared session not working always

    Hi all,
    I am using JBoss AS 4.0 for my Application, recently we need to scale the application, so we added another JBoss AS 4.0 in cluster. It is working fine with sticky session.
    But we need to share the session state so we made the changes in JBoss service .xml and the Appache for shared session, as described in the Jboss administration documentation, but the session shareing is not working always, some time it is working, suddenly the session in the clustered server gone out,
    please advice me what if i am missing, i cannot figure out
    thanks in advance

    Hello. I actually raised a support request to Microsoft about this. It seems from my testing that when using user profile disks in 2012 r2 that shared activation doesn't work. Last update this was with engineering team at MS. Will update when they have
    confirmed this is an actual bug.

  • Closing Application Sharing Session leads to Exception

    Hi everybody,
    I have successfully configured the application sharing on a EP 7.0 (SP10). We have testet it and it works just fine.
    However, when the initiator closes the session, he gets an exception:
    com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component
    Component : com.sap.netweaver.coll.appl.sync.SaveAsSession
    Component class : com.sap.ip.collaboration.sync.impl.scf.client.SaveAsSession
    User : jschroeder
         at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.component.PortalComponentException: Exception during PageProcessorComponent.doContent()
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:142)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         ... 29 more
    Caused by: com.sapportals.htmlb.page.PageException
         at com.sap.ip.collaboration.sync.impl.scf.client.SaveAsSessionPage.doProcessBeforeOutput(SaveAsSessionPage.java:99)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:123)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
         ... 32 more
    I don't see a starting point - any suggestions?
    Thx a lot,
      Jörg

    Yes, I can see how that could happen, and what the probable solution is.
    Now, normally I'd just hand over the answer, but this is one of the occasions when it seems to me that I'd be making a free gift of valuable consultancy to a company that's probably fully capable of paying for it.
    Convince me you're a non-profit organisation, and I'll spill the beans. Otherwise, how much is this worth?
    My email address can be found on my web page, at http://www.cryogenic.net/sylvia/index.html
    Sylvia.

  • Dedicated or Shared Sessions?

    I have a 10g SE1 + ASM running in Windows 2003 ES with 4GB RAM with /3GB switch and 7TB JBOD storage. Our custom data mining applications access this database from a grid of 15 servers. Application architecture uses a mixture of hibernate, roll-your-own connection pooling in Java, and daemons with dedicated sessions. In all, we typically have 200 sessions but only 3 to 9 are active at any given moment. Individual queries and transactions range from sub-second to 3 hours in duration.
    I’ve run the system with MTS and in dedicated server mode; it runs either way. I have never tried tweaking multiple shared_servers, dispatchers or circuits.
    Right now it seems to run fine with 200 dedicated sessions, but it does gobble up a lot of unused PGA memory for the inactive sessions.
    In our situation, what is the best configuration, MTS, or shared, or dedicated, and why?

    Mark, I think that physically a shared server process is no different than a dedicated server process in Oracle on Windows - both are threads in the oracle.exe process image.
    The only real difference is that one deals directly with the client, and the other with a virtual circuit.
    This then raises the question about the PGA and UGA. As the thread runs in the oracle.exe space, it has direct access to, and uses, the data segment (DS) of oracle. The PGA is likely a dynamic memory allocation - so too the UGA for a dedicated thread, while a shared thread will use the SGA instead (for the UGA).
    Now assuming that my speculation is not far of, there are very little overheads between dedicated and shared server threads on Oracle in Windows - except for the dedicated servers being more and thus more PGAs given the nature of these threads versus shared server threads.
    This is unlike Unix where there is a large physical difference as each process (dedicated or shared) has data segment and code segment. The resource footprint for a process is a lot bigger.
    A concern of mine... Windows is excellent at running threads.. it really strains running lots of physical processes (unlike Unix/Linux). But as threads share the same code and data segments, a single thread running into a severe bug can potentially corrupt the entire physical process image, crashing all other threads in it. At least, this has been my experience doing Windows server development.
    Would be nice to read a technical paper on just how Oracle implements their shared and dedicated server models on the Win32 API.

  • Sharing sessions/Single login

    There are several web applications, running on the same server. How can sessions be shared across the whole server, or, in other words, how should I implement single login for multiple appilcations on the same server ?

    I would recommend using a cookie to store the login state, as well as some sort of checksum so people can't manufacture their own cookies. The cookies are site-specific, not virtual server specific, so as long as all your web apps are from www.yoursite.com, the cookie for www.yoursite.com will be accessible from all of the different web apps.
    You can xor an arbitrary number, along with the time and date to get a login that expires after a certain amount of time - just extract the "encoded" date from the cookie, and figure out how long it's been since the person last logged in.
    I did a similar setup with my own application. I had an apache server and IIS on the same machine, and one login for both web apps.
    Good luck!
    David

  • IE7 shared session across tabs problem

    Hi guys. I am contributing to the development of a system that uses J2EE technologies (struts, hibernate). We have noticed a problem with the recent IE version (IE7) and tabbed browsing. An http session is shared accross the opened tabs, so if a website is accessed through different tabs of the browser, the http session is prone to concurrency issues.
    e.g. a shopping cart will be shared across tabs
    I dont want that. I would prefer each tab to function as a different client (or browser window). Is there any way to overcome this issue? I know struts is prone to this problem, how about other frameworks? thx in advance

    No there is no easy solution in this case. Its not just a struts problem.
    In fact it would affect any application using the servlet "session" scope to store attributes in.
    The session is distinguished by means of a browser session cookie. This cookie is issued to the browser to retain your J2EE session id. It lasts as long as the browser does.
    Maintenance of session cookies is purely the role of the browser. We can't affect it.
    Basically all windows in the same process will use the same "session cookies". ie - popup windows (via links or window.open) share the same session as their parent. This is useful sometimes, and a complete pain at other times.
    If you open a completely seperate IE instance/process it will get its own session cookie and thus maintain a different 'session' than the other window, but tabs all share the same session.
    The only way to do this would be to NOT use cookies to maintain your J2EE session, and instead use urlEncoding to keep track of the J2EE sessionid. ie add ;jsessionid=[sessionid] onto every link (as done by response.encodeURL())
    hope this helps,
    evnafets

  • JSP sharing session among users

    Hey all,
    I got a simple but important problem to pass by you all.
    :-) I wrote an intranet application using jsp and servlets. The issue I found is at login, the userid displayed is from a prior session. For example, I login in the morning and then leave. Another user logs in in the afternoon and sees the userid field with my userid.
    I thought I would keep the value of the userid for each user, but it seems the server is keeping the session. I store the userid in a hash table and then store it in a HttpSession and pass the hash table around (much like a context). I thought HttpSession was unique for every user, so I figured GC would take out the prior session along with the data contained in it. Any ideas?
    I am in QA now and hope to be implemented by Tuesday. What I did to clear out the userid field was to remove the code that preloads that field from the session. It works, but it concerns me that maybe other data might be shared.
    Thanks,
    Patrick

    Session's are not shared across users. Actually
    sessions are mainitained by a variety of ways and one
    of the ways is cookies in the browser.
    If i understand you right , this problems occurs in
    the same machine and may be same instance of the
    browser.
    You might need to do the following...........
    1) Make the settings in your app server so that the
    session expires after some time. The session should
    not be active for ever.=== The session does time out after 30 minutes.
    2) Second is that have a login page and in that page
    always clean the session variable.=== I get the session from request.getSession(). Do === you call invalidate() on the HttPSession object to === initialize it or just session = null?
    3) Further make sure that none of the variable you use
    in the JSP is in application scope ie
    <%!
    int session_id
    %>
    In this example this variable is in application scope
    outside the jspservice function. And since the
    servlet(ie jsp) is called in multiple threads , you
    will get into the whole issue of synchronization and
    stuff. So be care about this scope ...
    === I know I don't use session ids. I see the need for === them, but not in the scope of this app.
    I think this would solve the problem.Thanks,
    Patrick

  • Sharing sessions between web applications (WAR files)

    I am using weblogic 6.1. The opinion I have read indicates that
              sessions cannot be shared between WAR files. That is, I cannot put an
              attribute on the session from a servlet/JSP in one WAR file and read
              it out from the other. The only justification I've seen is "security".
              Now, I find this rather difficult to accept for several reasons:
              1. I cannot fathom what kind of "security" would prevent me from
              sharing the session between two web applications that I wrote myself.
              Let's say I want to write a system that I divide up, for
              modularity/separate deployment purposes, into 5 different WAR files.
              Why should I not be able to just sign on once and pass that logon
              information in the session from one to the other? (I know, I can use
              cookies or URL rewriting - but that doesn't seem to be to be a good
              solution. And if you can share information through cookies, why not
              through sessions?) What about other user information like currently
              selected language?
              2. Several app servers (iPlanet and I have heard two others) allow you
              to share sessions between WARs. Why not weblogic?
              Thanks for any information you can give me. I have not been able to
              find anything in weblogic documentation about this. If I am
              misunderstanding the server capabilities, please enlighten me.
              Thanks,
              <>< gary
              

    http://www.weblogic.com/docs51/classdocs/webappguide.html
              --kumar allamraju
              Grant Lewis wrote:
              > I'm currently evaluating weblogic and I can't find any references in
              > their documentation set stating they support web applications or war
              > files. They explicitly state in their docs the Servlet 2.2 specification
              > has been supported since version 4.5. I'm evaluating version 5.1. Can
              > anybody clear up the confusion for me.
              >
              > Grant
              

  • Sharing sessions between Ear

    Is it possable to share sessions object between two ear projects.

    as far as I know - out of the box the answer is , NO.
    You can achieve this by using third party cache or implementing your own shared memory (e.g. a database)
    I believe you can with do it with webapps of the same EAR in BEA 10 but ive never verified and I cant trace it in the docs right now..
    Edit : The parameter is called sharing-enabled in weblogic-application.xml , http://tedorgwp.free.fr/?p=163 for a single EAR
    Edited by: deepshet on Sep 3, 2009 9:27 AM
    Edited by: deepshet on Sep 3, 2009 9:29 AM

  • Problem: Sharing session between two different Web browser & Web Appn'

    I�m facing a strange scenario here and would appreciate any inputs which could resolve this issue.
    I have two webapplications (EAR�s) on two different machine and different WebSphere application server. I have �WebAppA� [on machine A, WAS A] which opens in parent window and expects to pass some info in the FORM submission with request parameter to �WebAppB� [on machine B, WAS B] which opens in a child window browser on clicking submit button from �WebAppA�.
    Now the WebAppA is required to wait till the response come from WebAppB after certain functionality and once the function of retrieval is over by WebAppB, it sent back the response data back to WebAppA FORM, which finally submits this form after getting the response data from WebAppB. Now the response to WebAppA [which is in machine A, WAS A] from WebAppB is a pure POST request on complete URL and set of request parameters with values.
    Now what is happening is that, when a User A fills the form on WebAppA and submits the data to WebAppB, on response it gets the data of some other User request, for example day of UserB or UserC.
    Now when I do the test on my development environment, where its just me or some other 2-3 users accessing it I don�t face any problem. I get the response for the request I have submitted�.PERFECT. On production I have issue where users are getting data as response of other users.
    I suspect since the response is submitted to the form page of WebAppA its unable to synchronize to which user it belongs to. May be that�s the reason when I test it on development with single or 2-3 users its behaving fine. I hope I could put my question properly to you. I don�t know what can resolve this or what is the actual cause? Is there a proper way to implement this? Please any suggestion or inputs are appreciated.

    Thanks Amittev,
    That's the problem for me. Actually this is a part of integration with third party application (which is loaded in child window - WebAppB). So as per the functionality there is no reference or trace of the user in the parent window at first instance. Anyone can come to parent window and initiatate a process. Its only when the data comes back from child window (which is the WebAppB), that parent window application (WebAppA) take the response and proceed further. Now here is what I'm facing problem. the user who initiated the process by clicking on the submit buttom of Parent window is not getting his response, but of some other user. This is not happening with every user and at all time. But were sparingly and rarely, but enough to bring headache to our department now.
    Now I suspect that, since there is a parent/child browser functionality here the session which is started by parent is not synced with child where the WebAppB is loaded and responds the response to WebAppA. The WebAppB makes a POST request submission to the WebAppA thru the child window and the session here is missing synchronization, I believe. I will appreciate some inputs and resolution to this problem. Thanks.

  • Shared Session Data

    Hello Everyone,
    I have a problem that I could not seem to find a solution or best methods and practices for.
    I have session level data abstracted by a package API and accessed query-inline via a table function. All this works fine; however, there is one caveat that does not. The query SQL is passed to a jobs table and executed by a scheduled job. So the job session can not see the user session data.
    Is there a way to:
    1) Share Session data?
    2) define a table as containing Session temporary data, but public scope?
    3) Group Sessions or grant session privileges (to share scope)?
    4) Run a process/job under a different Session ID, or with specific Session privileges?
    5) Call a procedure or function from one session, but have it Execute under a different session?
    As it stands, I can either copy the data out to a permanent table (and manually implement Session ID, and Session level cleanup), change the current API and underlying global temporary table to a permanent table (and again manually implement Session ID, and Session level cleanup), or before job scheduling parse the SQL, and expand the function table data into the SQL statically.
    None of these are solutions I like. I am looking for something more elegant. Any suggestions would be appreciated.
    *EDIT: sorry, I forgot to add; I'm using Oracle 10g.
    Thank you for your time.
    Edited by: user10921261 on Mar 20, 2009 11:57 AM

    Aequitas wrote:
    I have session level data abstracted by a package API and accessed query-inline via a table function. All this works fine; however, there is one caveat that does not. The query SQL is passed to a jobs table and executed by a scheduled job. So the job session can not see the user session data.Correct. As a job is a brand new session that is created to execute the supplied PL/SQL code. This process does not create the session by inheriting the environment (name space details, temp tables, transactions) of the session that submitted the job.
    Imagine the complexities of this when the session that created the job, terminated 24 hours ago.... would it session state (if kept persistent) still apply? And what about the complexities dealing with the overheads to somehow and somewhere store this session data for the job to re-use.
    Nope.. this is not a workable solution (and nor a sensible one), so Oracle does not support it. When a job is executed, a brand new session is created for that job. (not entirely correct at a technical level as the job queue process may already exist and already have a session - but conceptually, think of a brand new session for a job).
    Is there a way to:
    1) Share Session data?What session data specifically? And what about a session that long since ceased to exist? What about session data that is dynamic and changing? Should then job see the version of that data at the time it was submiited? At the time is started execution? Or the data as it is currently within that session?
    2) define a table as containing Session temporary data, but public scope?Does not need to have a "public scope". It can be managed via an API (PL/SQL), using the job number as unique reference number. It is even possible to create low level access control on such a table that only the job and no-one else can even see the data in that table, except for the job.
    3) Group Sessions or grant session privileges (to share scope)?Nope.
    4) Run a process/job under a different Session ID, or with specific Session privileges?Which session privileges? Remember that each session has two basic memory areas - the PGA (Process Global Area) and UGA (User Global Area). Both are private and non-sharable.
    5) Call a procedure or function from one session, but have it Execute under a different session?Nope.
    As it stands, I can either copy the data out to a permanent table (and manually implement Session ID, and Session level cleanup), change the current API and underlying global temporary table to a permanent table (and again manually implement Session ID, and Session level cleanup), or before job scheduling parse the SQL, and expand the function table data into the SQL statically.Still not sure what you imply with session data.
    In my case I have a process API (running on top of DBMS_JOB ) that developers use to schedule jobs (it manages external processes, mostly used for collecting data from other non-db servers). In some cases, the caller is a Virtual Private Database (VPDB) session - with a name space that contains the keys and tokens and what not that is required for access control and security. The name space cannot be copied across to the job.
    So as part of the process API that creates the job, a logon/authentication/authorisation call is added. With the calling session username. This is the same call that would have been made when the user session was created at logon time. And this call creates the name space that contains the keys and tokens required. Thus creating that batch (job) session in the background, uses the same initialisation processing that an interactive session (created from the app server) would use. The code running in that job is oblivious to the fact that the session was not created via an interactive logon from the app server.
    None of these are solutions I like. I am looking for something more elegant. Any suggestions would be appreciated.If you truly want an IPC mechanism between two sessions in Oracle, two methods come to mind. Database pipes. Advance Queuing.
    This is not really that complex to implement. IPC itself is not difficult. The difficult part is designing the code around cross-session communication and have that work effectively and efficiently. And within the database session context, this can be not only quite difficult to do, but also not always the very sensible thing to do.

  • Sharing session data ....

    Hi,
    Is there a way to share the same session data between Portal Pages and PHP ( hosted in same IAS) ?
    Thanks,

    ?

  • Problem in sharing session

    Hi
    I am creating session in one of my servlet and removing in another servlet bu using
    HttpSession sess=request.getSession(false);
    sess.removeAttribute("aa");
    but it still present
    why

    i am creating session in servlet suppose servlet1 with
    HttpSession session=reques.getSession(true);
    session.setAttribute("aa",ob);
    and removing attribute in Servlet2 like
    HttpSession ss=request.getSession(false);
    ss.removeAttribute("aa");
    but still present when i directly run servlet2 next time without running servlet 1

Maybe you are looking for