New session creation

I have a servlet filter that checks the session for every incoming request.
The session validation is done for every request except the login request. If a request with a new session, which is not a login request is sent, then unauthorised user is sent in the response.
If the http request for login is sent in the form of : http://ipaddress:portnumber/myApp/login.do, and after successful login, if the subsequent requests are sent in the form of
http://mymachinename.domain.com/myApp/processotherrequests.do (since Apache server is configured on my machine), then these requests are treated as new sessions and hence unauthorised user response is sent back.
what could be the problem?

The session is maintained as a cookie on the browser with the name JSESSIONID. The browser only sends cookies back to the domain that set the cookie. The browser does not know that the ipaddress and the domain name are the same so does not send the cookie.
As an example the ip address 127.0.0.1 is equivalent to the domain name 'localhost' but the browser does not know this so a cookie created for 127.0.0.1 will not be send to in a call to 'localhost'

Similar Messages

  • SSLException: New session creation is disabled

    Hi All,
    I am writting a javaclient to talk to my back-end SSL IBMHTTP server.
    With my codeing, I can successfully go through the handshake part, and also get the inputStream, outputStream, and even try to print sth out through the outputstrem without any exception.
    However, when I tried to read from the inputStrem with command in.readLine, it gaves the following exception (at the bottom)
    Does anyone have any idea??
    (My big devil boss is grabbing my neck now... )
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: New session creation is disabled
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA12275)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)

    i happened to call createSocket twice... fixed now, thanks

  • New session creation in struts Application

    I succeed to access my J2EE struts application from the Portal (using the intigrator)
    The problem is that I create a new HttpSession in the first action called by the portal url by:
    session = pRequest.getSession(true);
    I set attributes into this session.
    When I navigate to the next page (using struts actions)
    and try to get this same session -
    pRequest.getSession(false)
    I see that the ID of the session has changed from the first one and it containes none of the attributes I set.
    Does this have to do with IViews in any way ?

    Hi Gidi,
    I am not sure about your qn. but try this link it will give u some idea about getting J2EE application in a portal component.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access an ejb from a portal component.mht
    Regards
    gEorgE

  • Asynchronous SUBMIT or CALL WITH creation of NEW SESSION

    I'm doing monotonous comparisons between systems, but I do need to see the SAP standard comparison for each. So I have an ALV list that I'd like to double click a line entry that will spawn 3 NEW SESSIONS and I'll automatically populate the parameters.
    So, has anyone been able to SUBMIT or CALL WITH THE KEY BEING THAT IT MUST CREATE 3 NEW ASYNCHRONOUS SESSIONS. I'd be grateful if you'd share your experience in this regard. Thank you, Adrian

    Hi,
    You can try in this way.
    Create a new FM and place your code there. Call this FM using addition STARTING NEW TASK. It should work fine.
    Check out F1 help on CALL FUNCTION for more details and additions.
    Thanks,
    Vinod.

  • Why does a new desktop creation unexpectedly initiate with a background differing from the originating desktop? How can I control or eliminate this behavior?

    Why does a new desktop creation unexpectedly initiate with a background differing from the originating desktop? How can I control or eliminate this behavior?

    CT, I suspect that I either mistated the question or don't understand how to set the default back ground.  In any case, with the background that I have set in system settings, and this is the background to which my sessions consistantly boot, new desktops come up for the second or up to the third background with this initially set background. Then in the third or fourth desktop creation (I seldom go beyond four), the background for the new desktop, is one that I was using one or two months ago...

  • 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
              

  • NEW SESSION - Firefox, IE and GLASSFISH

    Hi all,
    Here is my issue:
    I have One application on Glassfish using EJB3,JPA and JSF.
    Users can log to this application and have severals sessions opened simultanoulsy as each session is having a connection to its own database
    How do I force a new session (particularly in Firefox as IE<=8 has no issue) and have the user using the same application but different databases in different tabs or windows of Firefox.
    I tried almost all and get blocked
    Many thanks in advance for your answers
    Nicog

    Hi BalusC
    Great Blog by the way...
    Let me explain.
    My architecture is as follows: using JSF, Glassfish and ...SQL Server!! (! i know but this is mandatory requirement as our application is full web version of an existing ERP application already sold and installed by more than 1000 of our customers...
    I am using
    JSF-->JSF Managed Bean (Session for some and Request for almost all when logged )-->EJB Interface-->EJB Impl-->Entity-->Database
    I have a persistence Unit (using JTA and CMP) per database , each using a connection pool managed by Glassfish.
    At the begining of my application, the user (when logging), choose a database, ...enter logging info and connect.
    All databases have the schema but not the same data
    You have to see in our case, a database as a company with particular configuration, customers, orders, invoices, contacts....
    Our application is ERP that our customers uses to managed several companies simultanously .
    Also, I need Session Scope as there is configuration data that I need to keep over all pages.
    This configuration data is depending on the database connected to.
    When selecting the database (company) for combo in logging form, The only way I found is fisrt to check is database(company) exists and can be connect to using at first begining Persistence.CreateEntityMangerFactory.. (i know that this is not J2EE and CMP but merly used in Java SE environments..).
    This step is only used for checking database
    Then, if creation did not generate a Persistence Exception , I can the use CMP and an EnityManger in EJB by JNDI lookup (as DI is not possible because you need constant in unitName)
    ex :
    @PersistenceContexts({
       @PersistenceContext(name="pu/SOCIETE1", unitName="SOCIETE1"),
       @PersistenceContext(name="pu/SOCIETE2", unitName="SOCIETE2"),
       @PersistenceContext(name="pu/SOCIETE3", unitName="SOCIETE3"),
       @PersistenceContext(name="pu/SOCIETE4", unitName="SOCIETE4"),
       @PersistenceContext(name="pu/SOCIETE5", unitName="SOCIETE5"),
       @PersistenceContext(name="pu/GENESYS_EXEMPLE", unitName="GENESYS_EXEMPLE")
    @Stateless
    public class SomeEJB extends CommonEjbImpl implements SomeEJBLocal  {
        private EntityManager em;
        @PostConstruct
        public void init() {
             String puName = (String) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("database"));
             em = (EntityManager) new InitialContext().lookup("java:comp/env/pu/"+puName);
        @PreDestroy
        public void cleanup() {
            if (em != null && em.isOpen()) {
                em.close();
    }All works perfectly under IE6,IE7 and IE8 (forcing some parameter at launch of IE8).
    But due to session management of Firefox (sharing session cookie among all exe or tabs)...session data is kept when opening a new tab.
    What I did to avoid confilcts, is to clear FacesContext SessionMap when redirecting to Login page ...but i still can NOT log to multiple PU simultanously....
    I do not see where DAO pattern could help me ...
    Am I missing something here?
    Many thanks in advance for your quick answer
    Regards,
    Nicog

  • Session creation issues with DS3.2

    We are using BODS 3.2 for development. We are aware that a newer version of DS has been released quite a long time ago but due to some reasons we are still using DS 3.2.
    We are facing some session creation issues. We are using Teradata and Oracle as source and extracting\updating data using some SQLs in script tasks. SQLs are targeting huge amount of data. We executed a job and checked on the servers, sessions were created on the databases. Job kept on executing for long time and was not getting completed, there was no error also. After waiting so long, I checked on Database server and found that session was lost for these SQLs on Database servers. We are able to create a successful connection using Data Stores.
    Please suggest something, Why the sessions are not getting lost on the database servers?.
    Thanks & Regards,
    Gaurav Bansal

    ginger_11 wrote:
    Hi...I'm new to the forum.
    2 of the same phones in my household having similar issues since OS upgrade. 
    -Text automatically going to MMS when sending pics and the pics won't send.  1 phone freezes, the other acts like its sent but not sent-this phone won't load emailed pics either.
    -Keep getting notifications that passwords need updated for email accounts.
    -Facebook app won't load on 1 phone-tried deleting, pulling battery and re-installing.  Still getting "session re log-in required" but there is nowhere to load the log-in info under accounts. Getting the same message on the other phone but the app is still listed under accounts so am able to log in.
    -Both phones are randomly re-starting. Multiple times over past 3 days. 
    Any known issues like these?
    There must be some common factor why both phones are having the same problem.
    With the 10.2.1.537, the only problem I had was a few contacts merged and surnames were repeated.
    I haven't noticed any difference with the latest upgrade.
    Maybe a security wipe and restore contacts and email then one app at a time.

  • Session creation failed

    I recently received a phone from ebay, Casio G'zon Commando. I am not yet eligible for a phone upgrade. Works great, as a phone. Eventhough I am connected to a wireless network, when I try to set up facebook or news and weather, I get the same response. Session creation failed, Data connection unavailable. Please find better signal and try launching the app again. My former phone (with a cracked screen) was 4G and this phone is 3G. COuld that have anything to do with it?

        scot76ker, that does seem a little odd. I want to make sure we kepe you connected to the data. Let's check this out. Go into Settings,  Wireless & Networks, tap on Mobile Networks, please make sure that Data Enabled is checked green. If it is, please uncheck it and re-check the box. Then try to go back out and use the data on the phone. Please keep us posted.

  • Open new session on submitting a program thru FM call

    Hi expertz...need your help up here.
    Have a situation where we need to trigger another program(say zabc : PO History) when the user selects a line in the ALV list and then clicks a button (to call zabc), the new program should run in the background and open up or display the results in a New Session.
    Have tried to use FM 'SUBMIT_REPORT' with STARTING NEW TASK but it dosnt work.  Please see the call below.
    CALL FUNCTION 'SUBMIT_REPORT' "STARTING NEW TASK 'TEST1'
      EXPORTING
      RDIR                   = TRDIR
        report                 = 'ZPRPP_WORKORDERPURCHASING'
       RET_VIA_LEAVE          = ' '
      VARIANT                = ' '
       VARIPROG               = 'ZPRPP_WORKORDERPURCHASING'
       SKIP_SELSCREEN         = 'X'
      EXPRESSIONS            =
    IMPORTING
      VARIANT                =
    TABLES
       SELECTION_TABLE        = i_rspar
    EXCEPTIONS
       JUST_VIA_VARIANT       = 1
       NO_SUBMIT_AUTH         = 2
       OTHERS                 = 3
    Any Idea!.
    Thanks
      Jaif

    Hi,
    copy your function module SUBMIT_REPORT to ZSUBMIT_REPORT and make it remote enabled.
    Now, where ever you want to call this FM, call as below,
    CALL FUNCTION 'ZSUBMIT_REPORT' STARTING NEW TASK 'T'
    EXPORTING
    * RDIR = TRDIR
    report = 'ZPRPP_WORKORDERPURCHASING'
    RET_VIA_LEAVE = ' '
    * VARIANT = ' '
    VARIPROG = 'ZPRPP_WORKORDERPURCHASING'
    SKIP_SELSCREEN = 'X'
    * EXPRESSIONS =
    * IMPORTING
    * VARIANT =
    TABLES
    SELECTION_TABLE = i_rspar
    EXCEPTIONS
    JUST_VIA_VARIANT = 1
    NO_SUBMIT_AUTH = 2
    OTHERS = 3.
    Check it out, it works for me.

  • Session Timeout/Session creation error.

    Hi There,
              ( posted in JSP newsgroup as well. Thought it might be relevent here as
              well )
              My environment is Windows 2000 Workstation sp1 with Weblogic Server 6.1 sp3.
              My IE browser is 6.02800.
              When I login thru a JSP, I create a new session. But when I hit a different
              JSP page after the login, it is somehow creating a new session id..
              I checked for the SessionInactiveInterval time and it is correctly set to
              300 secs.
              Is there something wrong with the above environment, as I saw someone's
              posting stating the same...?
              Thanks in advance.
              -Vivek
              

    Never mind..Figured out the problem. I have a wrong Domain name in the
              WEblogic.xml file instead of the Server on which the components were
              deployed.
              Thanks,
              -Vivek
              "Vivek Raikanti" <[email protected]> wrote in message
              news:[email protected]..
              > Hi There,
              > ( posted in JSP newsgroup as well. Thought it might be relevent here as
              > well )
              > My environment is Windows 2000 Workstation sp1 with Weblogic Server 6.1
              sp3.
              > My IE browser is 6.02800.
              >
              > When I login thru a JSP, I create a new session. But when I hit a
              different
              > JSP page after the login, it is somehow creating a new session id..
              > I checked for the SessionInactiveInterval time and it is correctly set to
              > 300 secs.
              >
              > Is there something wrong with the above environment, as I saw someone's
              > posting stating the same...?
              >
              >
              > Thanks in advance.
              >
              > -Vivek
              >
              >
              

  • 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

  • ADFDi Excel upload failed in a new session

    ADFDi Excel upload failed when a change was made in a locally saved ADFDi Excel file.  This should be a very common disconnected scenario.  I must miss something.  Here are high-level steps that I have done.
    1. Open a ADFDi Excel from a ADF page.
    2. Download data to Excel
    3. Modify a row in ADF table component in the Excel, then save the Excel file locally.  (If I clicked the 'Save' button instead of saving the file locally, the change was uploaded to the server correctly).
    4. Open the locally saved Excel, and accept the option to connect to the server and login.  A new session should be created in the ADF web application.
    5. Click 'No' in the popup window of "Do you want to discard the pending change?"
    6. The 'changed' indicator is shown on the changed row in the Excel.  Click 'Save' button, which has two actions - Upsync and ADFTable.upload
    7. On the server, a 'Row not found' exception is thrown from DCJboDataControl.setCurrentRowInRSI().  In this method, it tries to find the row in the ViewObject instance using the uploaded row's key.  The code is rsi.findByKey(key, 1).  I checked the value of key.  It looks correct. But no row is return from findByKey() call.  Then 'No row found' exception is thrown.
    My JDev version 11.1.1.7
    Greatly appreciate any suggestion on what could be wrong?

    HI
    I am facing the same issue. Are you able to resolve this issue or any solution around ?
    Thanks

  • How to call a screen in a new session -- Urgent

    Hi all,
    I need to call a screen from another program in a new session, is it possible or not? if possible, please help me. After that when clicked on one button, session should automatically closed. waiting for valuable replies....
    Thanks in Advance.
    Siva Sankar.

    Hi Gourav,
    Thanks for ur quick reply. Actually i'm calling a module pool program from one screen when clicked on one button. My requirement is that module pool program should be opened in seperate session. when clicked on exit button in new session, that session should be closed. is it possible?
    Thanks,
    Siva Sankar.

  • Calling a Program in a New Session

    Hi gurus,
    I have a custom report which has a button that links to another custom report. When this button is clicked, I perform a SUBMIT xxx WITH xxx and RETURN to another ABAP Report.
    Is it possible to open up a new Session (so that I don't lose my original report) and call the new report in there (sort of like how the System->User Profile->Own Data menu path works - I have tried to debug this but SAP does not let me debug this!).
    Any help would be appreciated.
    Cheers,
    Pat.

    Hello,
    If you want a seperate session and run a program using a transaction use this function module. ABAP4_CALL_TRANSACTION
    You can either use a bdctab table or can use the param id for the same.
    FORM f_call_lt27 USING    p_temp_nlenr TYPE y1mm_imac010_alv-nlenr.
      DATA : lt_spagpa TYPE TABLE OF rfc_spagpa WITH HEADER LINE.
      MOVE 'LGN' TO lt_spagpa-parid.
      MOVE t2_lgnum TO lt_spagpa-parval.
      APPEND lt_spagpa.
      MOVE 'LEN' TO lt_spagpa-parid.
      MOVE  p_temp_nlenr TO lt_spagpa-parval.
      APPEND lt_spagpa.
      CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
       STARTING NEW TASK 'MSC3N'
       EXPORTING
         tcode                         = 'LT27'
         skip_screen                   = 'X'
       TABLES
         spagpa_tab                    = lt_spagpa.
    ENDFORM.                    " f_call_lt27
    Regards,
    Shekhar KUlkarni

Maybe you are looking for

  • Open File button AND Continue button

    Hello, I try to accomplish the following. Having a kind of "Jump" button that forwards the user to another file. Once clicked, it should open that other video in the very same html window. On that same slide, there is also another button ("Continue")

  • Importing/Converting video?

    'Morning, I have a video I can't seem to import to Itunes. I have it saved as ".smv" and also ".AVI" When I try to add it from the Itunes menu item "add to library" I tunes sees them, and when I click on it, the hard drive goes to it, but it's not im

  • HT2589 Won't let me sign in to my account on iTunes

    I type in my username and password on the 'Sign in to your account' pop up, hit enter and then it just reloads the pop up again to re-enter it. Has done this over 10 times now. Very frustrating as I have gift vouchers I want to redeem I  am certain a

  • File Explorer Application?

    What is a file Explorer application? Because i cannot access this c:\system\apps\symcs when im opening my phone in the pc-- Nokia phone Browser---.

  • HT201210 iPhone Recovery

    Will restoring my iPhone delete photos on the phone? In recovery mode and won't do anything.