How can i get session object based on session id?

I have tried searching in forum but i can't find any solution that i can get session object based on session id and i also would like to know how to check whether the session is still active? My company currently using weblogic 5.1. I really hope that some one or anyone can help. I am new in using Servlet. I hope that i can find some answer here. Thank you.

I have a need to get a Session object from a session id, so I don't think that the above should be deprecated. Here is my use case:
0. I am displaying files in a file list
1. I am downloading files.
2. I am downloading files through a Servlet
3. I am displaying the files as images in an applet
4. The applet is ImageJ, and it apparently uses a full URL to download the file.
5. I use request.getRequestURL() in the applet .jsp to get the full URL (the hostname and port)
6. My app server is OC4J and it's behind an apache server and is host aliased.
7. Thus the hostname is different between my applet .jsp and the Servlet URLs
8. Thus I have 2 different sessions
9. Thus I need to pass the session id (or some other unique identifier).
10. I could stored the unique identifier in the application object, but then I would need to clean it up
11. I cannot pass the the full path to the image due to security problems (what if someone downloads my password file?)
12. I would like this to work in a clustered environment
13. I think that WebDAV would solve my problems, since I could pass a full URL of webDAV to ImageJ for download. However, I am unsure how the security of WebDAV would work with ImageJ/URLConnection. I will have to research this feature in ImageJ.

Similar Messages

  • How can I get a flash based plugin to load in CC 10.x

    Hello
    How can i get a flash based creative suite plugin to load in Indesign CC 10.x?
    I can get It to load in CC, but not In CC 10.x. Im using Flashbuilder 4.5. Do I need a newer version of flash builder/extension builder?
    Best regards
    / Pontus

    Yes, you can!
    You need to make sure that you are using: "Adobe CSAW Indesign" and not "Adobe CWSAW".
    Also you need to hack the manifest.xml and write someting like this:
    <HostList>
                <Host Name="IDSN" Version="[7.0,10.9]" />
    </HostList>
    To get it to load in CC 14.
    / Best regards
    Pontus

  • How can I get schema object in entityImpl class?

    Hi everybody,
    I want to get schema object name (name of DB table behind of entity) in my entityImpl class from ADF API. I tried this But I can't.
    please help me.
    with my best regards.

    try String s = this.getEntityDef().getSource();Timo

  • How can i get caller object by MethodEntryEvent

    Hi ,
    I have problem that I want to get the caller object when the program call any method. I use com.sun.jdi.MethodEntryEvent to catch the calling event but I don't know how to get the caller.
    thanks for any answers.

    I use
    com.sun.jdi.MethodEntryEvent to catch the calling
    event but I don't know how to get the caller. You have to go from the MethodEntryEvent to the Thread
    and from the Thread to the active stack frame on that
    thread. Then you can query the stack frame for 'this',
    or for other information.
    Given:
    com.sun.jdi.event.MethodEntryEvent mee;
    then the following will return the ObjectReference
    of 'this' for the current frame:
    mee.thread().frame(0).thisObject();
    References:
    MethodEntryEvent:
    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/jdi/event/MethodEntryEvent.html
    LocatableEvent
    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/jdi/event/LocatableEvent.html
    ThreadReference:
    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/jdi/ThreadReference.html
    StackFrame:
    http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jdi/com/sun/jdi/StackFrame.html

  • How can I get the object (button) that I right clicked on?

    If I have several buttons and the user right-clicks on one of them I would like to change the color of that button. With a left click I can use evt.getSource in the actionPerformed() method but I don't see how to do that in mouseClicked().
    Thank you!

    Maybe:
    public interface MouseListener
    extends EventListener
    The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component. (To track mouse moves and mouse drags, use the MouseMotionListener.)
    The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract MouseAdapter class (overriding only the methods of interest).
    The listener object created from that class is then registered with a component using the component's addMouseListener method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs, the relevant method in the listener object is invoked, and the MouseEvent is passed to it.
    Hope this helps - Bart

  • How can I get an object to rotate around another object in Motion 5? Also, can I export on a transparent background to FCPX?

    Attempting to make one .png (its and arrow) rotate around a circlular logo which is also a .png. I need to them come out of Motion 5 for FCPX on a transpartent background. Anyone have any help for me. Stuck on this for hours now.

    Thanks Russ...
    I spend severale hours (new to Motion) trying to figure out how to set the orbit around the cicular logo. I was able to finally get it. I was missing the square under the orbit behavior that I could plug in the circular logo. lol... Once I got that set, I added to the align to motion behavior and set the drag to that behavior to get it all to rotate and work right. I then published as a generator to FCPX. After setting the background to transparent.
    Works like a charm. Just took most of my day trying to figure it out. lol.. But thats how you learn I guess.
    Thanks for the reply!

  • How can I get an object from a vector, modify it and store it back ?

    Hello all,
    I have created the clase "node", this class has a "name" property and and "counter" property, and the associated method to set the name and make the couter increase value.
    In a different class I have a vector, and I add "node" objects to this vector.
    Once I've added a few objects "nodes" I need to get one, modify the value and the store it back in. Better if it is in the same position. ..
    Thanks, alot guys. I could not copy an paste the code because I have a whole bunch of things mixed in the same code. I'd not be understanble.
    Thanks again !!

    Never mind, thanks anyway ..

  • How can I get objects of multiple instances of InDesignServer

    Hello,
    We need to have InDesignServer running in more than one configuration. And we need to script them. So to keep easy let's pretend there are 2 instances of InDesignServer running. One startet with 'indesignserver -configuration conf0' and the other started with 'indesignserver -configuration conf1'.
    So we try (Visual Basic):
    dim myIndApp0 as InDesign.Application
    dim myIndApp1 as InDesign.Application
    myIndApps0 = CreateObject("InDesignServer.Application.CS2")
    myIndApps1 = CreateObject("InDesignServer.Application.CS2")
    But both objects referring to the instance with conf0. How can we get an object of the second instance?
    We tried to solve this using System.Diagnostics.Process.GetProcesses(). So we got both processes. But did not find a way to get an object of class InDesignServer.Application by using an object of System.Diagnostics.Process. Any ideas about that way?

    Hi Ian,
    The problem is not to start different instances. In the Windows Task Manager and the console output of InDesign Server I can see, that both instances are running with different configurations. When I use Systems.Diagnostics.Processes.GetProcess() I get both processes too.
    But I don't know how to get objects of both instances using the Interop Assembly or (as a runaround) how to cast an object of System.Diagnostics.Process into an object of InDesignServer.Application.
    When you talking about SOAP, do you know how to start InDesignServer twice with diffrent ports from inside VB and getting the InDesignServer.Application objects of it?
    This should be solve our problem too.

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

  • How can I get the elapse time for execution of a Query for a session

    Hi ,
    How can I get the elapse time for execution of a Query for a session?
    Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
    Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
    Thanks in advance.

    Hi
    You can use the dbms_utility.get_time tool (gives binary_integer type value).
    1/ Initialize you time and date of beginning :
    v_beginTime := dbms_utility.get_time ;
    2/ Run you procedure...
    3/ Get end-time with :
    v_endTime := dbms_utility.get_time ;
    4/ Thus, calculate elapsed time by difference :
    v_elapsTime := v_endTime - v_beginTime ;
    This will give you time elapsed in of 100th of seconds...
    Then you can format you result to give correct print time.
    Hope it will help you.
    AL

  • How can i get the unitOfWork or the persisting object in to my listener???.

    hi,
    i have a listener class which extends SessionEventAdapter ....as shown below
    public class MyLister extends SessionEventAdapter{
    public void postCommitUnitOfWork(SessionEvent event) {
    System.out.println("POST COMMIT OF WORK");
    // How can i get the unitOfWork or the persisting object in to my listener???
    Another class makes use of this listener by adding the listener into a getEventManager() of a session ....
    public final class AetbProcessStatusClient {
    public static final void main(String[] args)
    {  Project project =   
    XMLProjectReader.read("META- INF/AetbProcessStatus.xml",
    Thread.currentThread().getContextClassLoader());
    DatabaseSession session = project.createDatabaseSession();
    MyLister myListener = new MyLister();
    session.getEventManager().addListener(myListener);
    session.login();
    UnitOfWork uow = session.acquireUnitOfWork();
    uow = session.acquireUnitOfWork();
    Vector vec =
    (Vector)uow.executeQuery("SQFunctionIdProcessStatus", AetbProcessStatus.class);
    AetbProcessStatus processStatus = new AetbProcessStatus();
    processStatus = (AetbProcessStatus)vec.get(0);
    processStatus.setRunStat('E');
    processStatus.setProgramSeqNo(10);
    uow.commit();
    now my question --> How can i get the unitOfWork or the persisting object in to my listener???....
    ie the object "processStatus" into my listener

    The SessionEvent's session (getSession()), should be the UnitOfWork. You can access the UnitOfWork or UnitOfWorkImpl methods to access the objects in the unit of work. getUnitOfWorkChangeSet() will return the changes made in the UnitOfWork.
    -- James : http://www.eclipselink.org

  • How can I get a count of objects in the near cache? (Extend client)

    Hi,
    I'm trying to figure out how to get the count of objects in my near cache (from c++ client). Knowing the size of the near cache is a key factor when optimizing configurations for performance.
    However if I call size() on the cache handle I get the count of objects in the cache (ie the cluster). How can I get a count of objects in the near cache?
    Thanks
    Rich Carless

    H Rich,
    It may not be ideal, but I think you may be able to infer the size by using the HeapAnalyzer (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_heap_analyzer.html) facility, specifically the "class" based HeapAnalyzer. Its Snapshot representation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_snapshot.html provides a mapping between class name and ClassStats (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_class_stats.html) which provides information on how many instances of a given class type are in memory. Note the reported counts are process wide but if your key or value type are distinct you may be able to infer your answer. I realize this is rather complex, my only other suggestion would be to just make some guesses on size and see how they effect performance.
    Mark
    Oracle Coherence

  • How can we restrict EQL result based on session value

    How can we restrict EQL result based on session value or by checking with EBS secured function?
    Example: I create a Item Search Dashboard but I have more than one inventory organizations and I want to restrict dashboard to bring inventory org respective data by validating responsibility/profile option.
    Can anyone help me on this or if my concept is wrong so can anyone please guide me?

    Hi Bob,
    Thank you. Sorry for the late reply but I was busy in other stuff. I did the jar file and copied that Jar file into .ear/APP-INF/lib and copied on server and updated the df.securitymanager property under framework settings on Endeca Studio and restarted Endeca Server and Studio but seems like my class didn't get read. Kindly suggest and find below snippet of code;
        public void applySecurity(PortletRequest request, MDEXState mdexState, Query query)
                throws MDEXSecurityException
      init(request);
      String remoteUser = request.getRemoteUser();
      String recordFilterExpression = "XX";
      if(recordFilterExpression != null) {
      DataSource ds;
      try {
      ds = new DataSource(request, mdexState.getId());
      try {
      ExpressionBase expression = ds.parseLQLExpression("FND_USER_NAME='" + remoteUser + "'");
      DataSourceFilter dataSourceFilter = new DataSourceFilter(expression); 
      } catch (Exception f) {
      throw new MDEXSecurityException("Unable to apply Expression", f);
      } catch (DataSourceException e) {
      throw new MDEXSecurityException("Unable to create DataSource", e);

  • How can I get the underlying object from the ObjectReference

    Dear friends,
    I think this question has been asked a couple of times. But, I am still wondering if anybody has found an answer to it. Maybe this is some common need ...
    I would like to get the underlying object for which the ObjectReference is
    a mirror For example, I have a class Customer in my application, and I can get an ObjectReference through JDI during runtime. But how can I get the target VM's object which is a real instance of Customer, by which I can invoke methods defined in Customer?
    Thank you so much for any input!
    SunnyDay

    I'll preface this response by admitting this far from an elegant solution, but I did write a function addressing this question, mostly as an exercise.
    If passed an object with an InTextFrame property (Pgf, AFrame, Cell, Fn) that resides in an open document, the function will return the Doc object. Otherwise, it returns undefined.
    function getParentDoc(testObj) {
        //Get object for current page
        try { var curPage = testObj.InTextFrame.FrameParent.PageFramePage; }
        catch(er) {return;}
        //Step backwards to first page in document
        var prevPage = curPage.PagePrev;
        while (prevPage.ObjectValid())
            curPage = prevPage;
            prevPage = prevPage.PagePrev;
        //Compare with first pages of open documents
        var testDoc = app.FirstOpenDoc;
        while (testDoc.ObjectValid())
            if (curPage.id==testDoc.FirstBodyPageInDoc.id) return testDoc;
            testDoc = testDoc.NextOpenDocInSession;    
        return;
    To your PPS: Rather than seeing the native framework grow bloated to address additional features, I would love to see Adobe and other developers publish libraries of useful functions and class extensions.

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

Maybe you are looking for

  • I tried to move my calculator out of the utilities and folder and it has now disappeared.  How can I get it back?

    I had tried to move my calculator out of my utilities folder and it has now disappeard.  How can I get it back?

  • IMac won't see my iPod video - help!

    It's been working fine for ages and all of sudden froze while it was syncing ... and I disconnected it even though it said "do not disconnect". Clearly the beginning of the end ... I have tried everything .... my iTunes is up-to-date, as is all of th

  • How to I reset start up chime

    Hello I am using my macbook in clamshell mode and my start up chime is not working. Is there anyway I can reset it?

  • Diff btwn STANDARD and SORTED tbls??

    Hi Experts, Just curious to know that, In Wht scenarios/requiremets, we need to create a internal table, like fillowing(or How they differ from TYPE STANDARD TABLE OF)?? <i><b>it_a504 TYPE SORTED TABLE OF a504 WITH UNIQUE KEY kunnr prodh.       wa_a5

  • Bing loads in new Tabs

    Previously I had an issue with the Bing website loading every time I opened Firefox, even though my homepage was Google. I was able to fix that by changing the Target Line. However, it still loads Bing when I open new tabs. I've checked Add-Ons and E