How to pass session info to applet?

Hi all,
Is it possible to pass a browers' session id to applet in Tomcat server? I've known that an applet can get a session info from brower.
Howserver, since I can't chage a applet code I want to modify Tomcat server to maintain session.
Is there any suggestions?
thanks.

The Servlet will normally communicate the session id with a web client (e.g., browser) via cookies. A random session UID is generated and associated with a given client's session. The id is sent back to the client via the http-header set-cookie. On subsequent requests, the browser will include the cookie http-header containing the UID. Some implementations may opt to store the session UID in a hidden form field, though this is less common.
I'm not sure where the applet is in your architecture. However, if you send and receive HTTP messages, you should be able to store the id and ensure that you send your own requests to the Servlet with the appropriate cookie http-header.
- Saish

Similar Messages

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • Passing session info

    hi all,
    i have lots of jsp pages and these pages use a lot of class files created by me.
    i want to pass session info to class files without having to pass the info through each object that is created in the jsp pages--
    what i want to know is that is there any way through which a class file a mine could fetch the session value.(i dont mind passing session info to one class-- but passing to too many classes would be a headache !!)
    thanks,
    gaurav

    Not sure if this will work but worth a try.
    Create a class called SessionHolder that looks something like:
    public class SessionHolder {
    private static HashMap sessionMap;
    public synchronized static void putSession(Thread thread, HttpSession session) {
         if (sessionMap == null) { sessionMap = new HashMap(); }
         sessionMap.put(thread, session); }
    public synchronized static HttpSession getSession(Thread thread) {
         return (HttpSesion)sessionMap.get(thread); }
    public synchronized static void removeSession(Thread thread) {
          sessionMap.remove(thread); }
    }<P>
    In the servlet you store the session in the SessionHolder via:
    SessionHolder.putSession(Thread.currentThread, request.getSession(true));
    Always remember to remove the session from the SessionHolder when exiting the servlet or the sessions will linger and take up memory:
    SessionHolder.removeSession(Thread.currentThread);
    In your classes you can retrieve the session using:
    HttpSession session = SessionHolder.getSession(Thread.currentThread);
    This should work on the basis that the servlet container will create a new thread for each request to the servlet. As long as your classes do not create new threads they should be able to access the static hashmap to retrieve the session stored by the thread key.
    Of course this is just a theory and I have not tested it out to verify if it actually works.

  • Passing Session info between servlets

    We are running WebLogic 5.1, sp 4 and Apache 1.3 on Solaris 2.6 and we are
              successfully proxying requests to the server. But we are unable to pass
              session information between servlets. We are NOT using URL encoding. We are
              instead using cookies. We believe our configuration is correct because the
              BEA example session servlet works. Does anyone have any recommendations or
              suggestions?
              Thank you,
              Jorge
              Jorge A. Martin
              Systems Analyst
              The Kinetic Group
              1950 Stemmons Freeway, Suite 3040
              Dallas, Texas 75207
              

    This is a basic misunderstanding of how Java Works:
    String name +r = request.getParameter(name +r);1) You can't use a + on the left part of an assignment operation - it must be a plain variable reference. This isn't like JavaScript where you have an eval(...) capability.
    2) Your Strings are being defined inside the For Loop, which means they will leave scope once the loop ends and you won't be able to refer to them anymore.
    3) Is there already a String value named 'name' which you are using in getParameters(name+r)? You should probably use getParameter("name"+r) instead.
    What you want to do is either put the values in an array so they are easy to access:
    String name[] = new String[value1];Then loop through the parameters to assign values:
    for(int r = 0; r< value1; r++) { //Start at 0 to value1-1 because arrays are 0 based.
      String nameParam = "name"+ (r+1);
      name[r] = request.getParameter(nameParam);Now I can access the names in order:
    name1 via name[0]
    name2 via name[1]
    name3 via name[2]
    etc...Before going any further I would stop working on Servlets and go back to some good Basic Java Tutorials and books until you get a better grasp of how the language works.

  • How to passing object to the applet?

    Dear All,
    My project is needed to read the xml file (include the form content) and then parse the xml file to create the related object, so using the applet to display this dynamic form.
    Due to cannot directly open the file object and the applet, the following is my idea:
    1. ) In the servlet, first to new the fileinputstream object , then pass the object into the applet. But this idea is not allowed.
    Only String value can use the param to to pass the parameter value to the applet using <param name = \"cis_auditID\" value = \""+inputsource+"\">.
    2. ) Firstly , read the file and then create specific object before call applet class. I know some people said that using the URLConnection, but i don't know for this. Can only one give more detail description about that.
    So how can i pass the fileinputstream or the own created object into the applet?
    Urgent! Please help!

    Where is the xml file located??
    If it's on the same server that serves the applet or if it's dynamically generated
    by making a http request to a servlet you should use URL and URLConnection.
    URL u = new URL(this.getCodeBase(),"../relativeDir/xmlFile.xml");
    URLConnection uc = u.openConnection();
    InputStream = uc.getInputStream();
    // read the rest of the struff.
    You might want to take a look at this example if you want to send (POST data) to
    the server when you make a http request to a servlet:
    http://forums.java.sun.com/thread.jspa?threadID=645830&tstart=0
    3rd post

  • How to pass session from Java to Perl

    Hi,
    I need to pass a session value from Java to Perl, does anyone knows how can I do it?
    Thanks

    If you want to run java code from Perl, and have it return a single value, that's one thing: but having Perl interact with java code - calling methods, returning values - that may not be possible.
    Look into python to see if it may be what you're looking for. It's a scripting language that allows real interaction with java.
    If all you want to do is run java code and have it return some data, that would be trivial, so I assume that's not what you mean. But in case it is heres an idea:
    Set up a network connection between them with your own protocol, seeing as both languages are good at networking.

  • How to pass session variables via the URL in CF10?

    Hi
    I have a client with some old Flash functionality (AS2). The SWF allows the user to upload an image. However a new session is being started when the upload script is called. I have added the CFID, CFTOKEN and JSESSIONID to the URL as I did in the past to maintain the session but I believe you cannot do this anymore with CF10, if this is correct can anyone point me in the right direction of how I would accomplish maintaining the session for the upload?
    This has a note about CF 10 - http://forums.adobe.com/thread/1178420
    Kind regards
    Shaun

    Hi Shaun
    Are you facing the same issue with all the browsers?
    Thanks
    VJ

  • How to pass session variables as a parameters for the procedure

    hi all gurus
    i have created one procedure,it contains user information (usrname ,password(it is encrypted)) and it returns true or false
    if this value is true i want to allow the user to login other wise i don't want to login the use into dashboard
    how can i achieve this ???
    my procedure name is E_t_A_P it returns true(1) false(0)
    if i get 1 then user can see the dashboard
    other wise not
    what are the steps i have to follow to achieve this task
    please help me out
    thnks
    Sreedhar
    Edited by: 791907 on Sep 24, 2010 3:15 AM

    hi saichand
    what we are doing means
    we are using encrypted passwords in the back end ,so whenever user enter with theirs user name and password ,from initialization box we can call this function
    like select function_Name(':USER',':PASSWORD') from dual from this we can call the back end function ,there decryption and encryption process will be done
    and that function returns 1 or 0 as out put
    based on this result we have to provide the authentication , i mean if it returns 1 then user can login other wise user is not
    can you help me out
    other wise do u have any ideas to full fill this requirement ?
    Thanks
    Sreedhar
    Edited by: 791907 on Sep 24, 2010 5:20 AM

  • How to pass parameter to the method in EJB session bean from Managed Bean

    Hi,
    I need some guidance in accessing the EJB session bean methods from one of my backing Bean. I use EJB 3.0 Entity Beans and EJB Session Beans. I have to get value from my page and pass it thro the backing bean to the respective EJB session bean. I have no clue of how to do this,
    When i click a command link on the page, in its backing bean click method, i am able to get a value and store in a variable under its click action. But from there i am not knowing of how to pass it as a variable to the EJB session bean and hence execute the query(this is where we have to pass the variable as a parameter in its where clause) in the entity bean.
    I wanna know how to make a call to the EJB session bean and from there execute the Enitity bean.
    Guide me regarding this....
    Thanks
    ri

    Unfortunately dependency injection doesn't work for jsf backing beans, so you have to use a normal jndi lookup to find your session bean. The following example shows you how to find a session bean and call a method:
    public void commandButton_actionListener(ActionEvent actionEvent) {
    Context ctx;
    try {
    ctx = new InitialContext();
    helloWorldEjb = (HelloWorldEJB)ctx.lookup("HelloWorldEJB");
    hello = helloWorldEjb.sayHello(name);
    System.out.println(hello);
    } catch (NamingException e) {
    e.printStackTrace();
    }

  • Catch BO Session info in Crystal Report 2008 to pass to Xcelsius 2008

    Hi All.
    I have an Xcelsius 2008 model with data provided by a Live Office connection.
    I've tried to embed this model, as swf file, in a report Crystal 2008.
    I've published this report within BOE Enterprise, but trying to visualize it, the Live Office connection prompts for BO authentication.
    Is there any way in Crystal Report 2008 to catch current BO session info to pass it to the Live Office connection?
    I would really appreciate any suggestion.
    Thanks a million.
    PS: I'm sorry if this is not the right forum. This thread is available also in Crystal Reports Design section.

    No, we haven't found a solution that we would like to have.
    We are putting in place a workaround to update the Xcelsius SWF file outside of Crystal.  We will have the Crystal Report using the BOBJ scheduler to export to Excel on a file share the cross tab table used in Xcelsius and then have Xcelsius updated using the BOBJ scheduler.  Instead of having the Xcelsuis embedded in Crystal, the SWF file will be posted to the same SharePoint site that we will be posting the PDF file from Crystal.  Not ideal, but it should work.

  • How to pass data from one internal session to another internal session

    hi all sap experts ,
    How to pass data from one internal session to another internal session and from oneExternal session to another external session.
    Except : Import and Export parameters and SPA/GPA parameters.
    Tell me the otherWay to pass data ..
    Plz
    Thanks in advance

    hi,
      abap memory management u will understand about this concept.
    the import /export parameter will help u that passing data between two internal sessions by using abap memory.
      for syntax
    Passing Data Between Programs
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens (see below).
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    Message was edited by:
            sunil kumar
    Message was edited by:
            sunil kumar

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • How to pass attendees email info in hotmail calendar add event url

    Hello,
    Could anybody here please help me, how to pass attendees email address information in add event calendar url.
    I Know how to create web calendar event with start date , end date, location and description information by using url like this -
    https://bay03.calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart=20140510T093846Z&dtend=20140511T093846Z&summary=Summary%20of%20the%20event&location=Location%20of%20the%20event&description=Description%20of%20the%20event&uid=
    but I want to know how to add attendees email address to the above url, what is the query string param?
    Any help is greatly appreciated
    Thanks & Regards,
    Narayana Karthik

    Hi Dave,
    I had already posted there, they only asked me to post it here to get answer.
    Please check it - 
    http://answers.microsoft.com/en-us/outlook_com/forum/ocalendar-oaddevent/how-to-pass-attendees-email-info-in-hotmail/f9ceaa8e-8d45-4985-9524-c7625c03e2c9?tm=1414837768577
    Any help is greatly appreciated.
    Thanks & Regards,
    Narayana Karthik

  • How to pass serialized session/usertoken to BO webservice from xcelsius?

    I wonder how to pass serialized session/usertoken to BO webservice from xcelsius. Could anyone help me how to pass the serialized session/user token to BO web service from Xcelsius?
    Xcelsius is working fine when i use the username/password. But i would like to pass serialized session/usertoken from jsp file to Xcelsius as flash variable , then i will use this variable to get the data from webservice.
    Is that possible to send serialized session/usertoken using soap header?
    Thanks in advance...

    Hi Micheal
    Thank you for the reply.  I have already created the CELogonToken Flash Variable and i am able get the logon token and map to the flash variable.
    Now i would like to pass the same to biws as parameter. But the service has only 2 parameters as username and password.
    Is there a way that i can create my custom parameters(CELogonToken/CESerializedSession) in BIWS service?

  • How to pass submitted Data from a servlet to EJB Session Bean in JPA

    How to pass Data User submitted Data from a servlet to EJB Session Bean when using JPA :
    Hi ,
    I have a jsp page in which the user fills up the Data and submits it to the servlet :
    Inside servlets i am getting all the parameters and setting it to the Entity Class .
    Sample Entity class is shown below :
    @Entity
    public class Employee {
    @Id private int id;
    private String name;
    public Employee() {}
    public Employee(int id) { this.id = id; }
    public int getId() { return id; }
    public void setId(int id) { this.id = id; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    }After calling setters of my Entity Class .
    I am using JNDI lookup to call my session Bean method and pass this Entity class to the session Bean to persist data
    Please let me know what will be the right approach :
    1. Passing parameters whole as a Entity Class
    that is
    public void insertData(Employee emp)
    }Or
    2. public void insertData(String Name , int ID)
    }

    they are both right as they both work. Easy huh?
    You might argue that if you have to set a lot of fields, use the entity as otherwise you get a method with a gigantic amount of parameters.

Maybe you are looking for