Storing the data in the session

Hi all,
I want to know how to store some values (which i get from back end - R/3) in session, so that those are available through out the user's session.
If any one has done this earlier, please help me.
Regards,
Narahari

Hi Narahari,
You can try out the following links. It may be helpfull....
EP - problem when store data in session
Storing data across calls
Re: How set a SESSION variable?
Re: http session that's driving me crazy
Regards
gEorgE

Similar Messages

  • How can we reset the session data in SAP ISA B2B application.

    com.sap.isa.isacore.action.IsaCoreInitAction$StartupParameter this action class providing the special feature to store all data passed to it in the request as parameters into the session context and make them available for all other actions.
    1. But in the inner class they had defined private parametrized constructor.
    2. Action class is defined as final.(there is no chance to override the method)
    3. There is no setter method (only getter() is available).
    4. Creating a new Z_ class that is reflecting in entire application.
    5.They had hard coded the Session attribute name in Action class.
    6. Application is expecting a session object with the same attributes.
    Is there any chance to create a new object for this class or any where any chance to reset the session data. Am using the Multiple_SoldTO concept in my application. My back end ECC .Please help me.
    Advanced Thanks
    PC.M
    Edited by: pmudigonda on Jul 6, 2011 1:21 PM

    I am not sure about your requirement, but yet.. Did you check UserSessionData object? It encompasses all the session variables.

  • I need to add the values stored in the session object into the html textbox

    Dear Sir,
    i have been trying to create an edit employee details page
    What i have done till now is as follow:
    1. Got employee id from HTML page.
    2. Compared it with the id stored in the database.
    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.
    4. Dispatched the session values to another servlet EditEmpDetails2.java
    what i need to do now
    5. Now i need to set the session values in the text field of the html form
    6. I also need to be able to edit those vales and store the edited values in the database.
    Please help me as i have tried doing it for 1 week without any clues
    i have tried to create a html page which is something like this:
    <html>
    <head>
    <title>Edit Employee Details Page</title>
    <body BGCOLOR="red" text="black">
    <h1 ><font color="black">Edit Employee Details Page</font></h1>
    <form action = "EditEmpDetails" method="Get">
    <table width="50% align="center"
    <tr><td>Employee ID: </td>
    <td><INPUT TYPE="TEXT" name="employeeid"<br></td></tr>
    <tr><td><center><input type="submit" value="submit"></center></td></tr>
    <tr><td><center><input type="reset" value="reset" ></center></td></tr>
    </table>
    </form>
    </body>
    </html>
    design of my servlet EditEmpDetails.java
    public void EditEmpDetails1 extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    HttpSession session = request.getSession();
    String employeeid;
    String X = request.getParameter("employeeid");
    System.out.println("Employee iD:" + X);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:murphy");
    String query = "Select * from users where employeeid=?";
    PreparedStatement stat = con.prepareStatement(query);
    System.out.println(stat);
    stat.setString(1,X);
    ResultSet rs = stat.executeQuery();
    while(rs.next())
    String Z = rs.getString(password);
    if(Z.equals(X))
    String A = rs.getString(1);
    session.setAttribute("employeeid", A);
    String B = rs.getString(2);
    session.setAttribute("firstname", B);
    String C = rs.getString(3);
    session.setAttribute("lastname", C);
    String D = rs.getString(4);
    session.setAttribute("gender", D);
    String E = rs.getString(5);
    session.setAttribute("dateofbirth", E);
    String F = rs.getString(6);
    session.setAttribute("address", F);
    String G = rs.getString(7);
    session.setAttribute("postalcode", G);
    String H = rs.getString(8);
    session.setAttribute("phone", H);
    String I = rs.getString(9);
    session.setAttribute("mobile", I);
    String J = rs.getString(10);
    String url = "/EditEmpDetao;s.java";
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url)
    dispatcher.forward(request,response);
    catch (Exception e)
    system.out.println(e)
    I do not know how to put the values stored in the session object into the html text box

    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.do you really need to store this in session object?
    5. Now i need to set the session values in the text field of the html form which form? in a new html/jsp page? i suggest go for a JSP
    In your JSP page use JSP expression tags to put the session attributes.
    it's something like : <input type='text' name='employeeid' value='<%= session.getAttribute("employeeid") %>' >and you need to generateanother servlet for saving the details/modifications to the database.
    I think i m clear enough.
    if you need more clarifications. just try it and then post your problem.
    Diablo

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

  • In which table are stored the data of a set created by GS01?

    Hi All,
    could anyone tell me in which table are stored the data of a set created by GS01?
    Thanks

    Hi,
    It's stored in SETHEADER, SETNODE and SETLEAF tables.
    Regards,
    Eli

  • Verify whether the session data is kept in the Coherence caches

    I have successfully combined the MapViewer application with WebLogic and Oracle Coherence*Web.
    How to verify whether the session data of MapViewer application is kept in the Coherence caches or not?
    All out put show that both of MapViewer and WebLogic server as well as Coherence are running well.
    All the following steps are right?
    The procedure is as the following:
    1. Create a WebLogic domain: Map_domain.
    2. Start the WebLogic domain Map_domain by running startWebLogic.sh script.
    3. Install Coherence.jar as a library on WebLogic.
    4. Copy the coherence.jar in the WAR's WEB-INF/lib directory.
    5. Create a reference to the shared library by modifying the weblogic.xml in web applications WEB-INF directory
    and add the following contents:
    <weblogic-web-app>
         <library-ref>
              <library-name>coherence-web-spi</library-name>
              <specification-version>1.0.0.0</specification-version>
              <implementation-version>1.0.0.0</implementation-version>
              <exact-match>false</exact-match>
         </library-ref>
    <weblogic-web-app>6. Install Coherence-web-spi.war as a WebLogic library.
    7. Install the MapViewer as a WebLogic application.
    8. Start a Coherence cache server using the cmd file web-cache-server.cmd and then start MapViewer application.
    The content of web-cache-server.cmd file:
    @echo off
    @rem This will start a cache server
    setlocal
    :config
    @rem specify the Coherence installation directory
    set coherence_home=F:\coherence
    @rem specify the JVM heap size
    set memory=256m
    :start
    if not exist "%coherence_home%\lib\coherence.jar" goto instructions
    if "%java_home%"=="" (set java_exec=java) else (set java_exec=%java_home%\bin\java)
    :launch
    set java_opts="-Xms%memory% -Xmx%memory%"
    "%java_exec%" -server -showversion "%java_opts%" -cp %coherence_home%\lib\coherence.jar;
    %coherence_home%\lib\coherence-web-spi.war
    -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.cacheconfig=WEB-INF/classes/session-cache-config.xml
    -Dtangosol.coherence.session.localstorage=true
    com.tangosol.net.DefaultCacheServer %1
    goto exit
    :instructions
    echo Usage:
    echo   ^<coherence_home^>\bin\cache-server.cmd
    goto exit
    :exit
    endlocal
    @echo onEdited by: jetq on Jan 13, 2010 9:32 AM

    Any opinions are welcome.

  • Save the session data in the database !

    Hello everybody,
    I read an article on JavaWorld website about saving the session data of an application in the database instead of mantaing them in memory.
    In this way, the web application is more scalable and in case the application server crashed the session data can be taken by another application server.
    I was sure that this was a good motivation of writing a class to save the session data of my application in the database, but i read another article where a good methodology to
    create a scalable web application was to save the session data in more application server so if one application server crashed another application server can take the control of the entire application.
    I think that at the moment i have just a bit of confusion in my mind.
    Any suggestion ?
    Cheers.
    Stefano

    What you've read was a method of "load balancing" where "state" is maintained by a backend server instead of the web servers themselves. Yes, if done properly, this would achive true web server independance, and if one crashed, another would pick up where it left off. Of course, you'll still need an HTTP load balancer in front of the web server farm, so it can dynamically shift the load.
    From an architecture standpoint, it's a good way to go, but only IF you really need 7x24 with zero downtime. Reason being twofold. 1) It's a huge performance hit, becase each GET/POST requires a trip to the DB, because it's holding state. 2) It's a lot of work, because you're now taking on the role of "managing" sessions (e.g. when to expire, reading the cookie/URL for session IDs.
    I was once responsible for a 7x24 Intranet that ran core business applications. My service level agreement with my customers was 7x24 alright, but with the risk of a possible "blip" (meaning, if one server crashed, simply reconnect and continue your work). Worst case, one lost just that one page worth of work.
    I hope that helps explain!
    bRi

  • How to get the system date as a session attribute?

    Hi all,
    How can i get the system time and date to a session?
    This is my code:
    String startDate=<How will i get (system date) here?>;
    session.setAttribute("startDate",startDate);
    String startTime=<How will i get (system time + 1hr) here?>;
    session.setAttribute("startTime",startTime);
    Thanks in advance,
    Lakshma

    This is one way:
            Calendar cal = Calendar.getInstance();
            SimpleDateFormat sd1 = new SimpleDateFormat("yyyyMMdd");
            System.out.println(sd1.format(cal.getTime()));
            SimpleDateFormat sd2 = new SimpleDateFormat("hh:mm:ss");
            cal.add(Calendar.HOUR, 1);
            System.out.println(sd2.format(cal.getTime()));

  • Where i will give the date and time of the session background process

    Hi.
    I created a program on XD01 by using Session Method.
    It is executed properly and process in forground also fine.
    What my problem is i want execute process of session in Back ground on that time i want give the Date and Time. I do not know where i will provide date and Time.
    I want Process the BDC Session after 2 days. How it is possbile. Where i will give the date and Time?
    With in these 2 days i want know the status of the Session Process. How i will check the status?
    Any body will explain these things with full flow of sequence.
    I do not want use the BDC Session by using RSBDCSUB. In that program there is no options for giving the Date and Time.
    Thank You.
    B. Krishna.

    Hi,
    While creating session through BDC_OPEN_GROUP function, populate HOLDDATE field to set lock on the created session till that date, say 31.12.2008 and you would like to execute your session on 1.1.2009 at 2:00 AM.
    Once session is created, create a batch job for program RSBDCSUB and schedule it on 1.1.2009 at 2:00 AM (server time).
    I am confident that it solves your problem.
    Regards,
    Prasanth

  • How to reset the data when the session lost?

    When I use response.sendRedirect("http://localhost:82/main.jsp")
    the session lost, because the URL before redirect is using SSL,
    "https://localhost:81/index.jsp", they use the different port,
    so the session lost, what should i do to prevent this? And how
    to reset the data?

    Create a HashMap and store it as an attribute of the servlet context. In the first servlet assign the user a key and store all session data in the HashMap under that key (use a vector, collection or user defined class).
    In the response.sendRedirect call add the key to the url:
    response.sendRedirect(url + "?key=" + userKey);
    In the second servlet get the key (request.getParameter("key")), retrieve the session data from the HashMap in the servletcontext and store in an httpsession.
    Remember to delete the entry from the HashMap so it doesn't become overly large.

  • Where the session id is stored in server/JVM in java

    hi all,
    please tell me where the session id is stored in server or JVM in java.
    regards
    Mohan kumar

    Which session ID are your taking about?
    Are you doing J2EE development?
    -Alexis

  • Where are stored the separated variables data?

    Guys,
    Does anyone here know where are stored the data for separated variables?
    I'm doing some research in my enviroment to know the capacity needed for process demand and I need to count the separated variables usage of my database.
    Any helps are appreciated.
    Regards,
    Luiz

    Hi Luiz,
    Separated instance variables are stored in the Engine's "PDETACHEDFIELD" table.
    Dan

  • Opening a data storage file after the Labview code ends storing the data

    Hi to all,
    In my code, I am storing the data related to the status and quality of the devices like pressure and temperature in TDMS file. I just wanted to know if there is a possibility for the user to view this data in MS Excel automatically when the program stops. Of course this can be done manually by going to the folder which stores the tdms file. But i just had this idea. If it is possible then can you please give me some ideas as to how to make it. I don't want to use a TDMS viewer. I hope my prblm is clear. If not please let me know.
    Thanks a lot for viewing this post.
    Regards,
    KEMLab.

    KEMlab,
    You could use this add-on for excel and activeX to do this.

  • Getting the session data.

    Dear all,
              Is there any mechanism by which I can get the session data (processed data/Error data). I want to capture that data in a file and send it to the specific user in a mail.
             quick replies appreciated.
    Thanks in Advance,
    Suresh

    Hi Suresh,
    Look at Reading session log. These two threads will give all the details you need to know about the sessions.
    Srinivas

  • Store the session data temporary

    Hi
    I'm a beginner in JSP, and I started to design a webpage to ebook store site.
    I have a problem with saving the session data , because i didn't want to use data base in may site. and that data will used in the later pages in the web site.
    as example : if the user needed to add more than one item to his\here cart , then all that items must appeared in the page named view cart .
    so please help me.....

    for u store data in a session u have
    Declare session object
    ---HttpSession session =getSession(true);
    session.setAttribute("key",value);
    if u want to the data added in a different u have to just
    Object obj =session.getAttribute("key",value);
    if(obj != null)
    String str =(String)obj;
    System.out.println("value is ===" + str);
    }

  • Backing up in-app data without storing the entire app on my mac

    Hi there
    Been wondering about this for a long time. When I backup my iPhone through itunes on my Mac, it asks me whether or not I want to backup the Apps as well. When I say yes, what itunes wants to do is store all my third-party apps on my computer, which takes up enormous hard drive space.
    What I want itunes to do is back-up my unique in-app data (for example, Whatsapp's messages, or angry birds progress etc) without storing the actual app on my mac. I can download the app again on a restore through the app store; I just need my unique in-app data to be preserved and reinserted into the app when I download it through the app store.
    Does itunes already do this? Any direction/confirmation would be nice.

    Quit all applications.
    Press and hold the option key and click the "Go" menu in the menu bar.
    From the dropdown select Library.
    Library > Mail > V2 > Mailboxes > Recovered messages
    Drag the file to the Trash. Empty the Trash. Restart the computer.

Maybe you are looking for

  • Will there be a macbool pro with matte display ?

    will there be a macbool pro with matte display ? if not - how to change the exisiting display to a matte display ... ? thx hl

  • OAUG Responds to Oracle Proposal

    An Open Letter to Mark Jarvis and Ron Wohl Mark, Ron Thank you for setting out your proposal to the OAUG on AppsNet. It was useful to see it in writing, although, as you mentioned, it is largely similar to what was proposed and presented to our membe

  • Timestamp field in standard datasources

    Hi All, Can anyone tell me how do we find out the timestamp(delta) field for standard datasources 2LIS_11_V_ITM and 2LIS_11_V_SCL

  • Geinstalleerde plugins in firefox na tweede opstart verdwenen

    When I look by the installed plugins I normaly saw 7 or 8 plugins.At the moment I just see two plugins Google update and Zeon Plus 2.000.When I visit a side,the side asked me to install a plugin b.v. Adobe Flashplayer.These plug in is already install

  • Autodisplay based on interval

    Hi, Often we running a query every 30 / 60 / 90 seconds in sql plus. Every time we used */ & Ente*r button. Is there any command for autodisplay based on interval?