New session in JSP?

I'm currently working in a project that's basically a search-engine. The
          application is running on BEA's WebLogic server and the logic is placed in
          JavaBeans and EnterpriseJavaBeans. The JavaBeans that I access from my
          JSP-pages has the scope set to 'session'.
          As long as every user runs the application in different webbrowsers
          everything is fine, but if I open a second window (pressing Ctrl+N in IE) it
          seems like I'm stuck in the same session which means that I've got two
          references to the same object of my JavaBean.
          The outcome is that I either get the same result from two different querys,
          or that my application crashes. The server executes the querys in different
          threads, but since the EJB that holds the result is a stateful sessionbean
          the result is dependet on the last query.
          Are there any way of detecting that a request is made from a new window in
          the same browser (http-headers?), and creating a new session? Are there any
          way at all to force a client into a new session?
          /Johan
          

          "Johan Kindgren" <[email protected]> wrote in message
          news:[email protected]...
          > The database that we searching in contains about one million rows in
          several
          > tables, and the design-specification we've got demands that 90% of the
          > querys should return a result within three seconds, from anywhere in the
          > world.
          > Our idea to solve this is to divide the application into three layers,
          where
          > the first one is the JSP and JavaBeans. The middle layer is our stateful
          > sessionbean and the last is an stateless entitybean that executes the
          > querys to the database. When a query is made, the entitybean returns an
          > array of id's to the stateful sessionbean that match the query, and
          > sessionbean then retreives details from the database in batches of 15
          > records.
          > With this design it takes less than half a second to retreive the next
          batch
          > by making a query from id's, instead of making a query from a name (which
          in
          > worst case can take up to a minute right now, we have not optimized the
          > database yet).
          >
          > The JavaBean that I use in the JSP-pages creates a connection to the
          > sessionbean, and this connection is kept throughout the session.
          To fix your initial problem, you should assoicate your stateful session
          beans with a HTTP request rather than a HTTP session. This will get around
          your current problems (crashes & synchronisation). Or a more complex
          approach could be to remove the EJB from the HTTP session before you use it
          (so that no other request can use it at the same time).
          Browsers can and will make multiple concurrent requests with what appears to
          be (from the Servlet engines perspective) the same HTTP session - so don't
          associate a stateful session bean with a HTTP session. Associate it with a
          request instead. (In fact this is true of any EJB).
          >
          > If I understand your suggestion correct, we would have to skip the middle
          > layer. I suspect that we would have significant loss of performance in
          that
          > case. Are there any way to work around this? Any ideas in another design
          > that would eliminate this problem?
          Layering is often useful. The trick is to layer things correctly. I don't
          really have the bandwidth to understand your use cases correctly to
          formulate the correct architecture to follow. I'll give you a brief 30,000
          foot view of how I tend to do things...
          Briefly, I've never been terribly convinced of the value of entity beans at
          all. I personally think they are a bit of a mistake because they are remote.
          I far prefer the JDO idea which will hopefully replace entity beans one
          day.(http://access1.sun.com/jdo/) Generally the current thinking is that
          whether you use JDBC, JDO or Entity Beans - they should be wrapped inside
          session beans anyway. So from your layering perspective, entity beans are
          implementation detail inside the session beans layer.
          Mostly the client side wants go get 'data objects' back from queries which
          can then be used to do other navigations / queries / operations. It also
          helps to have client side helper beans to abstract the complications of
          using session beans (handling lookups, pooling, timeouts etc.).
          So the layers I prefer to focus on are
          Server side: Session beans - implementation I don't care - maybe internally
          using entity beans or JDBC or JDO. These should be stateless wherever
          possible. Should return Java beans to clients.
          Client side: Java beans - wrap use of session beans
          (timeout/pooling/creation stuff and sesion bean API). These client side Java
          beans often pass client side state (e.g. user id) into sesssion bean methods
          to allow the session beans to be stateless. Usually the client side will
          include Servlets, JSP, custom JSP tags here too.
          The Session beans on the server side may be split into the main stateless
          session beans that do most of the work with some small stateful session
          beans for doing things like query paging etc - though I've often found its
          easy to do this in stateless beans with a clever caching model.
          > The application will serve about 30 concurrent users, but there are a tota
          l
          > of 400 users.
          Though the same user may use multiple web browser windows on a desktop, so 1
          real user can become several concurrent users.
          J.
          James Strachan
          =============
          email: [email protected]
          web: http://www.metastuff.com
          

Similar Messages

  • How to create a new session in JSP file

    Usually a child IE window uses same session with parent window. Dose someone know how to create a new session when creating a new IE window by clicking a URL in parent window? The web page is writen by jsp file.

    I am not sure of your question. Are you wanting to have 2 Session objects (one for the parent window and another for the child)?
    A session is usually created once per client and is stored on the server the session id is carried around in a cookie or a URL rewrite so that everytime the user submits a page you will be able to store/access information.
    // this will create a new session object if one doesn't already exist.
    HttpServletRequest.getSession( true );
    Hope this helps

  • Create new session for each window opening

    From a jsp page i open a page called student.jsp by clicking on students admision no.Therefore lots of pages can be opend in new windows with relevent student details.
    but when i click on the link i called a servlet, get relevent details and redirect to student.jsp. The problem is ,all opened windows have same session id and there are session conflicts.
    How can i create new sessions for each page thru the servlet or is there any other alternatives

    I actually was working on a problem that was similar to this, and the problem is with how each web-browser works with sessions...
    Each browser window (Except in one case with IE) will use the same session in each window.
    However, you might be able to use URL-Rewritting to manage your sessions and get around using cookies for for session tracking. I personally haven't tried this, but I'm betting that it will work.
    Best of Luck,
    Nate

  • How to open a new SESSION in another SESSION

    Hi!
    I would like to start a transaction in the current session (session 1); I want to open a new session (session 2), execute some updates, do the COMMIT (without commiting the data of the session 1) and close the session 2.
    I'm using JSPs and Data Web Beans.
    How can I open and close a new session?
    I would appreciate an answer?
    Thank you.

    hi,
    You can try to create another properties file only for that session. Then you instantiate the bean, that you want to create the new session, with that new properties file and i think a new session will be created. But im not sure .....
    Bye,
    RB
    P.S.: by the way, what does APAF stands for???
    null

  • How to keep old session id when a new session is created in web site

    Hi,
    I have a question about HttpSession in a Struts framework based project development.
    I have a web page "a.jsp" in public site (no need login) which can navigate to other pages/links. There is a button on "a.jsp" to popup a new window "pop.jsp" and create a session (session1). Usually, when I navigate to other pages/links from "a.jsp", it doesn't affect this "pop.jsp" and its session1. However, if I try to goto a secure site - a login page "login.jsp" from "a.jsp", since the "login.jsp" needs to kill current session before the login, the current session1 within the "pop.jsp" is killed at that time. When I go back to "pop.jsp", it will create a new session2 and the original session1 attributes does not exist any more. Therefore, I need to save the session1 id in somewhere to compare it with new session2 id when session is changed, and display some message in "pop.jsp".
    Do anyone know how/where to keep session1 id? Any sample/suggestion would be appreciated.
    Hanna

    check reply 2 of [http://forum.java.sun.com/thread.jspa?threadID=5279453&tstart=0|http://forum.java.sun.com/thread.jspa?threadID=5279453&tstart=0]
    like that you can comapre

  • New Session getting created(!)

              Hi All,
              I am facing a wierd behavior. I have an application with a
              login page(jsp). User submits his authentication details,
              is authenticated in a servlet, and some of his information is
              put in the session. Later he gets "redirected" to another
              jsp(just like any other app).
              This is working fine most of the times. But randomly it is
              so happening that the jsp being redirected to does not get the
              values put in the session.
              Some more debugging showed that from login jsp to servlet, same
              session continued till the very last step(just before
              redirection). Just after
              response.sendRedirect(response.encodeRedirectURL(url));
              a new session gets created(!!). Any pointers?
              Please note I am testing all this out in a browser which is
              accepting cookies.
              

    Urgent!!
              We have the same problem on WLS5.1.
              Any suggestions would be fine
              Regards
              Osman
              "Bijay Kumar" <[email protected]> schrieb im Newsbeitrag
              news:3d0ed20f$[email protected]..
              >
              > Hi All,
              > I am facing a wierd behavior. I have an application with a
              > login page(jsp). User submits his authentication details,
              > is authenticated in a servlet, and some of his information is
              > put in the session. Later he gets "redirected" to another
              > jsp(just like any other app).
              >
              > This is working fine most of the times. But randomly it is
              > so happening that the jsp being redirected to does not get the
              > values put in the session.
              >
              > Some more debugging showed that from login jsp to servlet, same
              > session continued till the very last step(just before
              > redirection). Just after
              > response.sendRedirect(response.encodeRedirectURL(url));
              > a new session gets created(!!). Any pointers?
              >
              > Please note I am testing all this out in a browser which is
              > accepting cookies.
              >
              

  • New session created with every request

    Hi there,
    I have an web application that we used to deploy on tomcat, websphere and bea without any trouble. We are trying to move to support OAS and the application gives this peculiar behavior:
    A new session is created with every single request by the client browser. I have searched these forums for the better part of today and read some interesting similar cases but none of the fixes seem to have any effect on my problem.
    Is there a different way I need to request the session object from the request in the app for OAS? Or is there a configuration that I should have? I am deploying the app as a .war file. Is there a better way to deploy on OAS, should I stick the war in a .ear?
    Any help on this would be most greatly appreciated!
    Thanks,
    -Adam

    I have a problem that matches with this subject line but its somewhat different. This original posting wants to create new session and invalidate the existing one but my problem is to keep the session invalide if it has expired for the browser.
    Anyways, here is my problem. I have JSP named entity_actions.jsp which has 3 pop-up links that opens up with code like:
    window.open('restaurantentry.do?entityName=restaurant')
    window.open('districtentry.do?entityName=district')
    window.open('baseentry.do?entityName=base')
    My web.xml has this tag:
    <session-config>
    <session-timeout>5</session-timeout>
    </session-config>
    And the way forward the response for each request is:
    context.getRequestDispatcher(urlString).forward(request, response);
    The code I check for session timeout is:
    private void checkForSessionTimeOut(HttpServletRequest request)
    throws SessionTimeoutException
    HttpSession current_session = request.getSession(false);
    logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
    if (current_session == null)
    logger.error(CLASS_OBJECT, "SessionTimeOutException has thrown.");
    throw new SessionTimeoutException("sessionTimeOut");
    Now lets say I want to show the end user session expiry page after 5 mins of idle time. Now from entity_actions.jsp when I click/open any one popup first time after 5 mins of idle time/session expire,
    logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
    this loggers shows current_session as 'null' and I can display session exp mesg on the popup page. But when I click/open any other popup or any other link on the page it DOES WORK instead of having current_session = null, it creates new one. And I can see the sessionid which is different than fist session created on the same base page/browser.
    The same pattern of code used to work on Tomcat and JRun before for showing consistant session expiry on all the clicks being made on the same browswer after session gets expire.
    Why OC4J / JDev 10.1.3 is creating new session on the same browser even after session has expired?
    How can I fix this?
    Thanks

  • Sessions in JSP

    Hello.
    I have a problem working on one project.
    I have created a concordance search engine. My problem is: For e.g. now in real time one user is searching for a word and at the same time I'm or anybody else is searching for a word too.
    I put results (String lines) in ArrayList<String> object and put it into a session so that it can be passed to JSP page. When it is displayed in JSP page, the user and I see results of my search and his search. This means that the ArrayList<String> object which has results doubled somehow. The user's results and mine ar in the same Arraylist and displayed in JSP page.
    I know that I'm doing something wrong with the sessions.
    How can I fix my problem? I need to create a new session and initialize ArrayList object for every different user? Or I'm wrong?

    are you by any chance testing two concurrent users on the same system?
    If so: try with two different browsers. If you use the same browser each instance will share the same session. Thats expected behavior.

  • Httprequest.getSession(false) creating a NEW Session

    I am working on a web application which uses STRUTS. All the client requests are directed to loginaction class.
    Any resource in the application, is accessed thru the action class.
    Overview: In the action class, i am checking if there is any session associated with the new user using
    session = request.getSession(false);
                      if (session != null) {
          if (session.isNew()) {
          logger.info("New Session Created [" + session.getId() + "]");
          } else {
          logger.info("Session EXIST'S ["+ session.getId()
         + "], Retreiving user from session");
                       }According to the Servlets 2.2 API:
    public HttpSession getSession(boolean create) Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.
    If create is false and the request has no valid HttpSession, this method returns null.
    if (session.isNew()) ,
    this if statement should return false and be skipped, as session = request.getSession(false);wont create a new session. When i parse the logs, I see the log statement, "New Session Created ". Which makes me wonder, that a new session is being created
    Problem: When i debug, i see that container is creating a new session if the session doesnt exist. According to API mentioned above, it should not create a new session. It should return null.
    Did anyone had a similar issue? While researching i found this article that using struts, the container creates a default session.
    I found this article: http://www.theserverside.com/discussions/thread.tss?thread_id=21643
    Environment: IDE:WSAD5.1, Appserver:Websphere, Browser:IE 6.0, Struts, JSP, JSTL

    Hi,
    We have two appliactions. Our application say B is uses authentication mechanism provided by say A.
    So the user, is presented a login page by application A. Once they are authenticated, without the knowledge of user, its being forwarded to our application say B.
    Once he is in our application, he can navigate in our application, say,
    he goes from page1 to page2. page1 is the main page. Now browser caching is enabled. When he hits the back button to access page1, browser is sending a new request to our applicaiton insted of furnising form local cache( this is another issue). Even though a new request is sent, all the requests are routed thru a struts controller action class. Now in the action class, we check if its a new session or not.
    request.getSession(false). Since the user is an old user, it shouldnt create any new session.
    As per your suggestion, where should i put the directive in the jsp to not to create a default session?. In page1 which is the main page?.
    How should i implemnt the session listener interface. Do u have any templates or code snippets?.
    Any suggestions?

  • New session created with every page request

    Hi,
    I have an application running in portal framset. A user logins into a portal and has access to several applications, that are displayed in a frameset. My application is creating a new session for every page in the application. Of course, I can't keep session variables and a large amount of sessions are being created. What could be the reason for this, and is there a work around?
    Thanks.

    There is a chance the you have cookies turned off. Sessions are maintained via a jsessionid which is stored in a user cookie. If you (or another user) don't use cookies, then the session will be lost.
    To fix this, every URL you use must be encoded, such that, if cookies are not used, the jsessionid is attached to the end of the URL. If you are using JSTL, the easiest way to do this is like this:
    <c:url var="formAction" value="someOtherPage.jsp"/>
    <form action="<c:out value="${formAction}"/>" method="GET">
    <c:url var="nextPage" value="nextInLine.jsp"/>
    <a href="<c:out value="${nextPage}"/>">Next</a> Or if you are not using JSTL, you can use scriptlets:
    <%
      String formAction = response.encodeURL("someOtherPage.jsp");
    %>
    <form action="<%= formAction %>" method="GET">
    <%
      String nextPage = response.encodeURL("nextInLine.jsp");
    %>
    <a href="<%= nextPage %>">Next</a>

  • New Session on click of link

    I m having a scenario in which a Admin logins , and searches for other users of the website, the admin can modify the profile of the user, when he clicks the link a new window should open with user login , i have tired out URL rewriting using response.encodeURL but that's not working i beleive. Is there any way i can acheive ?
    The current scenario is like this
    1. Admin logins - forwarded to next JSP with jsession id inthe URL
    2. Searches for the Users srch reults displayed in 6 pages , same jsession Id available
    3. When he clicks on the results pages then jsession id is not coming in the URL
    4. i didnt use the encoded url for link to open a new window in which the user details should be shown
    in the 3rd step if i can get the jsession id also for the srch page links then i beleive when i click the link of new window it will open in a new session .
    help needed..........

    Scott,
    Ya think we're here 7 days a week? Well we are.I can't stop bragging about you guys at work. I get so much accomplished because of the forums and your feedback (both present and past)..and you work the same hours I do!!!
    Regarding the problem, I can definitely say that the Export was not modified by hand (though I have some experience making corrections/changes this way).
    I will try and go back through my notes and piece together the chain of events leading to this failure. Until then, there were three "strange" things going on which may have contributed:
    1) The data is located in another schema over a database link, so in my local copy I am accessing a view.
    2) When I originally created the application, the primary key was named "APP_ID" which caused no end of problems for APEX, but it took several iterations of debugging for it to dawn on me that the APP_ID was coming from the system value, not my table.
    3) To correct for this, I altered the view to translate APP_ID to ID. I believe I was in one of the form edit screens when I was doing this and so it may have attempted to reconcile and gotten confused when I left the screen.
    I'll try and be more precise from my notes, and may attempt to reproduce it as soon as I have extra time.
    Thanks again, as always,
    Barney

  • URGENT: New sessions created as increasing hits/second! BUG in WL5.1 sp10?

              Hello,
              I am experiencing the same problem as mr. Rajesh Rajagopalan, only he had it with
              WL 6.0:
              http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=8925&utag=
              So when the number of hits increases, it looks like new sessions are created when
              the number of hits increases!
              Is that a bug in WL 5.1 service pack 10? I would like an answer from a BEA Weblogic
              official!
              

    Hello,
              I think that the best way is to open a case to the BEA support.
              "\"Bogdan Barzu\" Bogdan.Barzu" wrote:
              > Hello,
              >
              > I am experiencing the same problem as mr. Rajesh Rajagopalan, only he had it with
              > WL 6.0:
              > http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=8925&utag=
              >
              > So when the number of hits increases, it looks like new sessions are created when
              > the number of hits increases!
              >
              > Is that a bug in WL 5.1 service pack 10? I would like an answer from a BEA Weblogic
              > official!
              

  • Fail Over - Back up, create a new session

              Two WLS 5.1 SP10 clustering, iPlanet4.1 w/wlproxy plugin, Solaris Box. Everything
              works except the following senario:
              1. Two servers up, user browses the site. ok!
              2. shutdown one server, user continues to browse without losing sessions. ok!
              3. down server back up, new session is created in this server and replicated to
              the other server, in the mean time the old session still there. Every click cause
              the session swithing back and forth. WRONG!
              4. close the brower and restart a new session, back to normal. ok!
              Any idea?
              

              Only one cookie is created in the whole process. But in step3, when clicking on
              the browser, plugin directs the request to app1, app2 back and forth for each
              click. I can also see the there are two session ids. one's primary is in app1,
              the other's prirmay is in app2.
              The other interesting thing is the wlproxy.log, where one app server is down (166.200.148.10
              is still up, 166.200.148.11 is down), plugin log shows connecting to 166.200.148.10
              fails and finally throught static list connecting to 166.200.148.11 which is down,
              and in fact, 166.200.148.10 got hit, browser has the display.
              Tue Oct 9 13:40:52 2001 getPref(): primary h=166.200.148.10 p=7008
              Tue Oct 9 13:40:52 2001 ===== New Request [main/formdata.jsp?] ====
              Tue Oct 9 13:40:52 2001 ....relFile.../main/formdata.jsp?...
              Tue Oct 9 13:40:52 2001 trying connect to PRIMARY '166.200.148.10'/7008 at line
              611 for '/main/formdata.jsp?'
              Tue Oct 9 13:40:52 2001 failed to connect to host 166.200.148.10 port 7008
              Tue Oct 9 13:40:52 2001 No good servers left in the general list, reverting back
              to the static list
              Tue Oct 9 13:40:52 2001 Initializing lastIndex=0 for a list of length=2
              Tue Oct 9 13:40:52 2001 general list: trying connect to '166.200.148.10'/7008
              at line 679 for '/main/formdata.jsp?'
              Tue Oct 9 13:40:52 2001 failed to connect to host 166.200.148.10 port 7008
              Tue Oct 9 13:40:52 2001 general list: trying connect to '166.200.148.11'/7008
              at line 679 for '/main/formdata.jsp?'
              Tue Oct 9 13:40:52 2001 Header from client [accept]=[*/*]
              Tue Oct 9 13:40:52 2001 Header from client [accept-language]=[en-us]
              Tue Oct 9 13:40:52 2001 Header from client [accept-encoding]=[gzip, deflate]
              Tue Oct 9 13:40:52 2001 Header from client [user-agent]=[Mozilla/4.0 (compatible;
              MSIE 5.5; Windows NT 4.0)]
              Tue Oct 9 13:40:52 2001 Header from client [host]=[167.206.148.202]
              Tue Oct 9 13:40:52 2001 Header from client [cookie]=[cookieID=4773; bmTzOff=240;
              bmScrRes=1024x768; bmClrDpt=16; bmJava=Yes; WebLo]
              Tue Oct 9 13:40:52 2001 WLS info before parseHeaders : 166.200.148.11:7008
              Tue Oct 9 13:40:52 2001 Sending header to WLS [accept]=[*/*]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [accept-language]=[en-us]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [accept-encoding]=[gzip, deflate]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [user-agent]=[Mozilla/4.0 (compatible;
              MSIE 5.5; Windows NT 4.0)]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [host]=[167.206.148.202]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [cookie]=[cookieID=4773; bmTzOff=240;
              bmScrRes=1024x768; bmClrDpt=16; bmJava=Yes; We]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [X-WebLogic-Force-Cookie]=[true]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [Proxy-Client-IP]=[166.200.148.21]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [X-Forwarded-For]=[166.200.148.21]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [Proxy-Path-Translated]=[opt/netscape/server4/docs/main/formdata.jsp]
              Tue Oct 9 13:40:52 2001 Sending header to WLS [Proxy-Path-Translated-Base]=[opt/netscape/server4/docs]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [HTTP/1.1 200 OK] = []
              Tue Oct 9 13:40:52 2001 Header received from WLS : [Server] = [WebLogic 5.1.0
              Service Pack 10 07/11/2001 21:04:48 #126882]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [Content-Length] = [612]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [Content-Type] = [text/html;
              charset=ISO-8859-1]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [X-WebLogic-Load] = [0]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [X-WebLogic-Cluster-List]
              = [-3524818015807611228/bungan/6/7008/7008/7002/7002]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [X-WebLogic-Cluster-Hash]
              = [a0NT9MOQPES4vbUg1fb3g3C6j7U]
              Tue Oct 9 13:40:52 2001 Header received from WLS : [Connection] = [Close]
              Tue Oct 9 13:40:52 2001 Header to Client [Server]=[WebLogic 5.1.0 Service Pack
              10 07/11/2001 21:04:48 #126882]
              Tue Oct 9 13:40:52 2001 add content-length to srvhdrs, [Content-Length]=[612]
              Tue Oct 9 13:40:52 2001 Header to Client [Content-Length]=[612]
              Tue Oct 9 13:40:52 2001 Header to Client [Content-Type]=[text/html; charset=ISO-8859-1]
              Tue Oct 9 13:40:52 2001 Initializing lastIndex=0 for a list of length=1
              Tue Oct 9 13:40:52 2001 ### Got a new Server List of length 1 ###
              Tue Oct 9 13:40:52 2001 ###Response### : Srvr# [1] = [166.200.148.10:7008]
              Tue Oct 9 13:40:52 2001 request [main/formdata.jsp?] processed ......
              "Mike Reiche" <[email protected]> wrote:
              >
              >
              >A new session should not be created when the down server comes backup.
              >The requests
              >should continue to be sent to the server that was originally the secondary
              >( and
              >now the primary ).
              >
              >In IE, turn on 'prompt for cookies' and note the value of the WebLogicSession
              >cookie whenever one is written to the browser. The number in between
              >the the first
              >and second '/' is the IP address of the WL instance that wlproxy will
              >send the
              >request to. If there is no WL running there, it will round-robin requests
              >to the
              >instances that do exist.
              >
              >You should make sure that both the WebLogic Server and the wlproxy are
              >using the
              >same cookie name. (sounds like they are).
              >
              >
              >Mike
              >
              >
              >"Rong" <[email protected]> wrote:
              >>
              >>Two WLS 5.1 SP10 clustering, iPlanet4.1 w/wlproxy plugin, Solaris Box.
              >> Everything
              >>works except the following senario:
              >>
              >>1. Two servers up, user browses the site. ok!
              >>2. shutdown one server, user continues to browse without losing sessions.
              >>ok!
              >>3. down server back up, new session is created in this server and replicated
              >>to
              >>the other server, in the mean time the old session still there. Every
              >>click cause
              >>the session swithing back and forth. WRONG!
              >>4. close the brower and restart a new session, back to normal. ok!
              >>
              >>Any idea?
              >
              

  • New session id from tomcat

    I have .jsp page.I use tomcat server .When session is valid and i print sessionid in jsp using function session.getId() it print session id but when session is expire then new session id is printed .I didn't understand why this behavior.I set session timeout to 5 sec fro debugging perpose .what i expect is
    that session becomes null.My code is
    <%     
         UserData ud=null;
         if(session == null){
         }else{
              if(session != null){
                   out.println("BEFORE :" + session.getId() + "<BR>");
                   //ud=(UserData) session.getAttribute("ClientObject");
                   out.println("AFTER :" + session.getId() + "<BR>");
              if(ud == null){
                   //response.sendRedirect("../ServletLogout");
                   //response.sendRedirect("www.google.com");
                   out.println("UD==NULL" + session.getId() + "<BR>");
         out.println("Welcome to tracking page");
    %>
    Thanks
    Vijay

    I imagine that /test and /TestSession/test/test.jsp fall under different web app context paths.
    When the Servlet container creates a JSESSIONID cookie to track the session, it includes a path attribute. The path attribute controls in which requests the browser will send the cookie. By default, the path attribute is set to the web app context path. If the context path is /TestSession, the path attribute will be set to /TestSession and the browser won't include the cookie when it makes requests to /test.
    You can override the cookie path with a sun-web.xml deployment descriptor:
    <sun-web-app>
      <session-config>
        <cookie-properties>
          <property name="cookiePath" value="/"/>
        </cookie-properties>
      </session-config>
    </sun-web-app>You could also rewrite the outbound Set-cookie: header with an Output directive in obj.conf.
    A simpler, less brittle solution would be to redirect requests for /test instead of restarting them.

  • Want to start new session in same browser instance when user ReTypes URL

    HI All,
    I am facing one problem in my sturts application.Its giving me problem that values in the session persists in the my JSP form.
    I entered Userid and password and logged in and gone forward now when I retype Url and give request in same Browser instance a values in my JSP form are visible to me.
    actualy this should be considered as new request and JSP form should appear blank.

    I think Struts is not JSF ....

Maybe you are looking for

  • Convert string to integer

    package onjava; import java.io.*; import java.net.*; import java.util.*; import org.apache.soap.*; import org.apache.soap.rpc.*; import java.lang.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class CalcClient exten

  • I need to put a web page in its own folder

    I'm designing a site in Muse and a couple of pages have to be stand-alone and accessed by the user typing the address directly like, www.site.com/info So, I need to put a page names index.htm in the folder info. How can I do this with? The stand-alon

  • Podcasts not being Removed from my Ipod

    I have several old podcasts that I have deleted from my ITUNES that for some reason, are not being deleted from my ipod...? The podcasts are not showing up in my itunes, so not sure how to clear them out from my ipod?? Thanks in advance for your help

  • Disk Utility says "Error: The underlying task reported failure on exit"

    So I decide to play around with Bootcamp for the first time, and I go through the install but it kicks me out, telling me there was some kind of HDD error. It points me to Disk Utility, and I click on Verify Disk, and then I get the following error:

  • McAfee download blocked

    When the original McAfee anti-virus installed on the computer expired I tried to download the program provided free with my Comcast service and it was blocked with the following message: "Download blocked by your Security Zone Policy."