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

Similar Messages

  • How to create a new session by ABAP?

    Good afternoon everyone:
    This is my first question in the forum, can anybody tell me how to create a new session to display report output in a ALV program? Which function or method can used? I'm freshman.
    Thx.
    Edited by: Joshua Lee on Nov 21, 2008 10:04 AM

    Hi Joshua,
    Welcome To SDN.
    I am not clear about your queestion.
    if u r doing an ALV report if u give selection screen inputs if press execute buttom or F8 u wil get the report.
    if u want the out put in the next screen. you can develop the screen in the module pool
    Regards
    Rasheed
    Edited by: Rasheed salman on Nov 21, 2008 10:25 AM

  • How to create an new administrator with ldif files

    I need another administrator as orcladmin for create an new tree in OID 11g which groups and right must this administrator have?

    Although you can create a superuser account that is able to manage entries, it won't be able to do so using ODSM until 11g Patchset 4.
    What this means is that you may use ldapbind/ldapmodify/ldapadd/ldapdelete commands with this new user to do the same operations that you would normally only do using the superuser, but that until a future patchset (currently slated for 11g patchset 4), this user will not be able to login to ODSM.
    Attempts to login to ODSM as this new user will fail with:
    Error:
    ODSM allows only super user to connect to OID.
    Connected user is not a super user.
    Identify the groups that the superuser is in, as follows:
    ldapsearch -p <OID_port> -h <OID_host> -D "cn=orcladmin" -w <pwd> -b "" -s sub "uniquemember=cn=orcladmin" dn
    Create a new user entry, to be used as the second superuser.
    Add this user as a uniquemember to all the same groups returned in. This can either be done manually, or via the ldapmodify/ldapadd command with an LDIF file with the following syntax:
    newadmin.ldif
    dn: cn=odisgroup,cn=odi,cn=oracle internet directory
    changetype: modify
    add: uniquemember
    uniquemember: cn=myadmin,cn=users,dc=myorg,dc=com
    dn: cn=Provisioning Admins,cn=changelog subscriber,cn=oracle internet directory
    changetype: modify
    add: uniquemember
    uniquemember: cn=myadmin,cn=users,dc=myorg,dc=com
    ldapadd -p <OID_port> -h <OID_host> -D "cn=orcladmin" -w <pwd> -f newadmin.ldif
    Thanks,
    ABP

  • 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

  • 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 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
              

  • To create a new session on the clcik of a button in Bsp.

    If have application A.
    On the click of the button i want to create a new session of application B.
    I used the method
    cl_http_ext_webapp=>create_url_for_bsp_application
    for calling the application B.
    but the session is maintained.
    How shall i proceed so that my application creates a new session.

    I am curious.  Both Raja and I suggest the same fix:
    >Now you probably want to add the url parameter sap-sessioncmd. There is the value open that will start a new session
    >'?sap-sessioncmd=open' and use this url for navigating.
    You said that his solution worked and mine did not.  The only difference is that I suggested that you use cl_bsp_runtime=>construct_bsp_url instead of cl_http_ext_webapp=>create_url_for_bsp_application.  This recommendation comes right from the source; cl_bsp_runtime=>construct_bsp_url is the prefered method for constructing URLs.  I am curious the other method somehow produce different results?

  • How to create a new admin user in oracle 9i?.

    Hi I am new to oracle. I want to set up a new database for my application.
    How to create a new admin user in oracle 9i?. I would like to have a new schema. where I can create tables for my application from scratch.

    If I understand your question correctly:
    You need to be connected to the database with the user SYS.
    open a command-line session and do the following to create an Oracle user with DBA option other than SYS.
    C:\>sqlplus /nolog
    SQL*Plus: Release 9.2.0.1.0 - Production on Fri Oct 14 08:46:13 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    SQL> conn  /  as sysdba
    Connected.
    SQL>
    SQL> create user test identified by pass;
    User created.
    SQL> grant create session to test;
    Grant succeeded.
    SQL> alter user test account unlock;
    User altered.
    SQL> grant dba to test with admin option;
    Grant succeeded.
    SQL> conn test/pass
    Connected.
    SQL>
    SQL> sho user
    USER is "TEST"
    SQL>Now you have a user with username 'test' and password 'pass' with DBA role with Admin option
    Tony Garabedian
    From now on you can connect directly with SQL*Plus no need for comman-line. Just provide the username/password and you're logged in.
    Message was edited by:
    Tony Garabedian

  • How  To create a new word document and to serve bookmarks

    how To create a new word document and to serve bookmarks

    there is an example :
    http://www.must.de/default.html?Javactpe.htm
    howerver ,I don't kown how to use in jsp!!

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • How To Create The New VO in Standered Page?

    Hi Gurus,
    Pl z help me how to create the new Custom VO in slandered page,and how to attach that VO in custom RN in all are slandered page only.
    Regards,
    Srini

    Hi Sara,
    <i>1. Could you please tell me how to create the new webservice in XI?</i>
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac1555
    <i>2. What tools we have to use to create it.?</i>
    /people/community.user/blog/2006/09/19/xi-webservice-studio--a-plain-jane-soap-tool
    http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=65a1d4ea-0f7a-41bd-8494-e916ebc4159c
    Altova is also a good option
    <i>3. How to send the SOAP request to XI?</i>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    SAP Note 856597
    An Add-on
    /people/siva.maranani/blog/2005/03/01/testing-xi-exposed-web-services
    Regards,
    Prateek

  • How to create a new connection from SAPGUI to Test drive?

    Hi,
    I have installed Sap Netweaver Test drive on a linux virtual machine (windows host). The installation was successful and I was able to start the instance (application server and the database), yet I don't know how to create a new connection from my SAPGUI client (7.20) to this server. The static IP address of the server is 192.168.1.160.
    I entered the following values for my new connection entry
    Description: SAP Netweaver
    Application server: 192.168.1.160
    Instance number: 01
    System ID: DB2
    SAProuter: /H/192.168.1.160/S/3201/H/
    But it does not work. Any idea about the values needed  for creating a new entry?
    Thanks in advance,
    Dariyoosh

    >
    Dibya R Das wrote:
    > Why are you entering a router string? Can't you reach a box directly from your machine?
    >
    > Doesn't a ping to that host & a "telnet <host/ip address> 3201" work from your machine to the SAP System.
    >
    > Remove the router string you wont need if the above works.
    >
    > - Regards, Dibya
    Hello there,
    Thank you very much for your answer which solved my problem. In fact there was no need of providing router string.
    Kind Regards,
    Dariyoosh

  • How to create a new facebook account in iphoto?

    How to create a new facebook account in iphoto?

    Instructions can be found by selecting iPhoto Help from the Help menu within iPhoto.

  • How to create a new field for Q3 - QM notification in Header and item level

    Dear All,
    l
               Sub: How to create a new field for Q3 - QM notification in Header and item level
    Ref. the link --> Quality Notification
    We want to create a new field in header level and item level.
    As per the thread the solution is given below.
    In the IMG Config: Quality Management -> Quality Notification -> Notification Types -> Define screen areas for notification types Then Choose 'Define screen areas' Then Click on 'New entries' button Now, select the relevant Notification Type and click in 'Enter'. Select the 'Iten Cases' register and remember to setup the Tabstrip Header, Icon, etc. Set the 'Tabstrip active' flag. Then Save.
    Quality Notification -> Notification Types -> Define screen areas for notification types
    WE ARE UNABLE TO FIND IN CUSTOMIZATION PATH --> DEFINE SCREEN AREAS FOR NOTIFICATION TYPES.
    Please help.
    Question No. 2 :
    THE REQUIREMENT IS GIVEN BELOW.
    We want to hide the field in Q3 - QM Notification
    In header --> Reference tab --> Item (sub heading) --> "DEFECT LOCATION" FIELD TO BE ELIMINATED (HIDE)
    Ref the link --> Quality notification
    The solutiion is given below.
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    By double clicking the "DEFECTIVE QUANTITY (EXTERNAL), WE COULD NOT GET --> field TXTCDOT .
    Plese do the needful.
    We are using ECC6.0 Ehp3 and Ehp4.
    With Best Regards,
    Raghu Sharma

    Dear Pushpa,
    Transaction Code :SHD0 is working fine.
    Please accept my sincere thanks for your sharing your Knowledge.
    I am able to fulfill my
    Regarding the enhancement, I have not tried.
    Once I will complete, I will award the fulll marks to you.
    With Best Regards,
    Raghu Sharma

  • How to create a new workspace and change the name of the existing

    Hi,
    can any one help me how to create a new workspace in application express 3.1 on XE DB and how to change the name of a existing workspace.
    thanks
    Jana

    Jana,
    This is discussed at length in the User's Guide. See the section "Creating Workspaces".
    To rename a workspace using the admin application, edit the workspace attributes and type a new name in the field where the old name appears, then Apply Changes.
    Scott

Maybe you are looking for

  • Sending HTML mail using code in workflow

    Hi All I follow somerecomendation to create a program to send the mail out. using a program My code looks as the following.     DATA:   l_docdata TYPE sodocchgi1,             li_content TYPE TABLE OF solisti1,             li_receiver TYPE TABLE OF so

  • Problems Usingt External VGA Monitor Through KVM Switch

    I have my ThinkPad x201 connected to a KVM switch along with three other machines.  The KVM is attached to a monitor with a resolution of 1920x1200.  Does the ThinkPad have to be rebooted with the KVM switch attached to the VGA port and with the swit

  • Modifying DIsplay of Report Painter Report

    Hi All, There is a report designed in Report Painter, for display of balances of Profit Centers. It has options of executing without entering Profit Center value, or entering any values for the Profit Centers. But when the report is executed without

  • Change password without cd or any other information

    please help me changing my admin password for mak 10.6 , without cd

  • Where can I find DBID?----------No.174

    I am connected to RMAN without a recovery catalog. there is no copy of the control file available. I want to restore the control file from an autobackup. What soureces can I find DBID?