Unable set session attribute with certain types.

Hello I was surprise that when I execute HttpSession.setAttribute("somekey", new HashMap()), "somekey" will not be stored in the Session. I can replace HashMap with HashSet and it's okay.
          Out of curiosity, I create a Java class like below :
          public class abc implements Serializable {
          public String def = "def";
          And I have the same issue with HashMap and it will not get stored in the Session attribute. Does anyone know what kind of valid object and what makes the object storable into the Session's attribute? Any inputs are appreciated. Thanks.
          yien

Actually never mind. It have something to do with BEA's Portal Ad services. I will post this into the appropriate forum.

Similar Messages

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

  • How to set session attributes in a bean?

    How do I set a session attribute in a server-side bean?
    I'm not sure if I asked the question the right way. What I meant is, while it's easy to set session attributes in a JSP page (session.setAttribute("sessionname", "sessionvalue")), I'd want to set such an attribute within a server-side bean defined in this web application. But what is the syntax for doing it?

    Here a simple bean that stores something in the session and retrieves something from it.
    import javax.servlet.http.HttpSession;
    public class TestBean {
      private String value;
      public void doSomething(HttpSession session, int a, int b) {
        if (a+b > 0) {
          session.setAttribute("ab",Boolean.TRUE);
        } else {
          session.setAttribute("ab",Boolean.FALSE);
      public void init(HttpSession session) {
        if (session != null) {
          Boolean b = (Boolean)session.getAttribute("ab");
          if (b == Boolean.TRUE) {
            value = "a + b is greater than zero";
          } else {
            value = "a + b is not greater than zero";
        } else {
          value = "no session";
      public String getValue() {
        return value;
    }In your JSP, use something along the lines of :
    <%
      TestBean bean = new TestBean();
      bean.init(session);
      bean.doSomething(session,1,2);
    %>If your bean only lives during one request, you can pass the session to the constructor, which stores it in a private variable. This saves passing the session each time.
    Hope this helps,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Playback stuttering with certain types of animations

    We are experiencing heavy stuttering or jerking attempting to play back certain types of animations. The problem persists with several codecs, regardless of pixel size or compression, both in the Quicktime player and within applications that rely upon quicktime for playback, such as Adobe After Effects 7. We have tested rendering out directly into quicktime format with different compressions, and rendering out many types of image sequences. The problem has occurred on both a G5 Dual 2 gig with 3.5 gb of ram (running quicktime 7.1.6), and an octocore with 4 gb of ram (running quicktime 7.1.3). Both machines are running OSX 10.4.9 system software. Another employee here made a DVD of this animation, compressing using apple products and using DVD Studio pro, and the jerkiness translated onto the DVD.
    The jerkiness is completely random, always occurring in a different place, and not tied in any specific way to the motion. When viewed frame by frame the animation is completely smooth. The animation involves panning across a flat, large bitmapped image, so no frame rate or interlacing issues are involved. There is a lot of contrasting detail in the image, so a lot of information is being conveyed pixel to pixel. The stuttering has that look as if the hard drive is too slow, but as the problem persists even with 480x270 highly compressed quicktimes (i.e. sorenson) under 5 mb, hard drive speed should not be an issue.
    Other quicktimes, that don't involve panning, seem to play fine.
    There is no audio tied to these files.
    The problem also persisted in Maya's FCheck application, which makes me unsure if it's quicktime, but for all I know FCheck also utilizes quicktime resources to work.
    The video cards involved are the GE Force FX 5200 (G5) and the Quadro Effects 4500 (Octocore).
    This problem is severe for us as we are unable to see what our designs actually look like, and we are at wits end trying to solve it. Not to mention how clients feel looking at jerky previews and their comfort level with that. Delivery is approaching an no solution is in site. Any help would be appreciated.

    You jest that someone would share with us the file in question. Shame and 100 noodle lashes for asking. I will get out the ouija board and 8-ball and try to make my own assumptions lacking any evidence at all.

  • Set Session State with Shuttle items

    Is it possible to have session state set with each item selected in a shuttle? You have a shuttle with 4 possible options, you select item 2 from the left portion of shuttle and it is moved to the right.. Can you set the session state at that point?
    What I am trying to do is take the session state after change in the control and use it to populate a text field below. The returned values are used in a sql select to populate the text box with a looked up value...
    Thank you,
    Tony Miller
    Ruckersville, VA

    TexasApexDeveloper wrote:
    Won't this just push the last items value in, as apposed to appending the value?
    Tony,
    No. Because for shuttle items the return value is stored as colon delimited string.
    Means after each change you will have a colon delimited string in the session state with selected values(moved to right).
    See this http://apex.oracle.com/pls/apex/f?p=46417:47

  • Setting session attributes at the Role level

    I am running AM7.1 in Legacy mode and I am trying to create a role and assign session attributes at this role level. I followed the instructions for doing this but it does not seem to be working. I created the role and added the session service to it. I then went in an changed the attributes (Max Idle, Max Session, etc.) to the values I need for the role. I then assigned the role to a user. However when I log in as this user and look at the Active Sessions panel all of the values are still saying they are set at the defaults. It is not picking up the new values for the user. Am I missing something? Help! -Jeff

    Reply i was also getting this problem in relam mode but 7.0..........but when i specify in the url?role=rolename..........i see the session info applied but i wanted it to be dyanmically applied(without specifiying the role in the url).......i have raised an SR but that is for 7.0 .........please do it for 7.1 i think you might get some response.

  • Type attribute with Object type or Nested table?

    I have been creating lot many threads around the same problem, however i thought i knew but realized I do not know or else do not know how to..
    I have created object type with an attribute READINGVALUE NUMBER(21,6)...How can i use type attribute on this object while declaring variable.....can we use type attribute on NESTED TABLES, similar to the db tables?
    example
    CREATE TYPE READING AS OBJECT(READINGVALUE NUMBER(21,6));
    CREATE TABLE INTERVALREADINGS OF TYPE READING;

    meghavee wrote:
    Thanks Solomon, however this approach does not preserve precision/scale of number data type.....What you can do is create placeholder tables:
    SQL> create table reading_type_placeholder of reading
      2  /
    Table created.
    SQL> desc reading_type_placeholder
    Name                                      Null?    Type
    READINGVALUE                                       NUMBER(21,6)
    SQL> declare
      2      v_var reading_type_placeholder.readingvalue%type;
      3  begin
      4      v_var := 123456789012345;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2      v_var reading_type_placeholder.readingvalue%type;
      3  begin
      4      v_var := 1234567890123456;
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 4
    SQL>And if you modify type attribute:
    SQL> alter type reading modify attribute readingvalue number(26,6) cascade;
    Type altered.
    SQL> desc reading_type_placeholder
    Name                                      Null?    Type
    READINGVALUE                                       NUMBER(26,6)
    SQL>SY.

  • Setting camera attributes with the PCI-1405

    I have the PCI-1405 Imaq card.  I was wondering how I set camera attributes like gain and exposure time.  Every time I try to use the set camera attribute VI I get an error message saying the attribute is not valid.

    khsay--
          Installing the driver will allow the framegrabber (1405) to communicate with the computer.  I want to verify that you are using Measurement and Automation Explorer (MAX) to test the sanp/grab features of your camera.  This will allow you to directly interact with the hardware.
          If you are, and this is where you are getting the extract image error.  First double-check that you know what kind of communication standard the camera uses (for instance, CCIR or RS170) and make sure that this is selected in MAX. 
          The camera might not be using a known standard, in which case you will need a camera file that tells the computer and framegrabber how to interpret the camera's information and signal.  You can look in MAX and see if the camera is listed, if it is the camera file is   If not, you can try going to www.ni.com/camera and see if you can get a camera file there. If not you will need to try contacting the manufacturer to see if they have one, and if not you will need to create one using the camera file generator from the ni.com/camera. 
         Just let us know if this information helped to solve the issue and if not reply back so that we can help.  Also, in the future if you have a new issue you might consider posting in a new thread.
    Regards,
    John H.
    Applications Engineer
    National Instruments

  • How to find a Sales document with Certain type and having a certain Matnr ?

    How can I find a sales document with a certain type and having a certain materail.
    is there any table to find that ??
    Thanks
    Venkat

    Hi Venkat,
    I found this table interesting. Pls. check with the table VBAP_VAPMA, it has the data of the header along with the items.
    Reward if it helps.
    Regards,
    Sreekanth

  • Attributes with dynamic type

    Hello all,
    I've been writing a set of libraries for a CRUD application, whereby you specify the table and column names in a model class and it will handle the Ajax stuff for you. All well and good.
    I have validation functions that use the signature:
    Func<dynamic, Dictionary<string, object>, ValidationHost, string>
    where the `dynamic` is the value to be validated - it might come from the database, the Ajax form or be explicitly defined (hence why I've made it dynamic).
    What I would like to do now is be able to define a validation function in a custom attribute in the model. Normally that wouldn't be a problem, but with that `dynamic`, not so much.
    I understand the reasons for it not working (dynamic being resolved at run time and attributes being a compile time construct), so I'm wondering if there is any way around it? More generally, I'm wondering if I've made a mistake using `dynamic` for the value
    and should have perhaps used `object`?
    Many thanks,
    Allan

    Certainly!
    In essence I have a model that describes the column names for a database table:
    public class StaffModel
    public string first_name { get; set; }
    public string last_name { get; set; }
    public string position { get; set; }
    The class properties describe the db column names, the JSON structure sent to the client for display and the HTTP variables from the form submission (Ajax). They can be named differently, but for simplicity here...
    The model and db table name are fed to a controller instance that handles the data get (i.e. reading of the db and output of data to JSON) and the create, update, delete aspects based on what is submitted:
    new Editor(db, "staff")
    .Model<StaffModel>()
    Using reflection each model property has a `Field` instance created. Each field has a value. I don't have a value class at the moment, just a `dynamic` variable which has the value dumped into it (be it from the database or form submission).
    The value is passed around and operations performed on it - for example this is a simplified numeric validation function:
    public static string Numeric(dynamic val)
    try
    Convert.ToDecimal(val);
    return null;
    catch (Exception) { }
    return "Not valid numeric data";
    I could change that to pass in an object which has its value set and get by an overloaded method with the data types I want to support, although it seems like a bit of a pain to need to use `val.Val()` to get the value rather than just having the value in
    `val` and potentially a waste of memory.
    Is that what you might suggest?
    Thanks,
    Allan

  • Create attributes with image type

    There is only one image attribute in the Item Type attribute, I need an additional image attribute for the item, is it possible to add ? However I can't find the datatype of "image" when creating an attribute. Thanks !

    hi,
    i tested this and there is no image attribute type. so to render an additional image with your item you need to use a workaround. one solution i can think of is to add an additional custom file attribute to your item type. then use an attached pl/sql procedure that get executed for your item type and render this attribute as icon. i think you should be able to use the content management view wwsbr_all_items to query the name of the icon in the document table. you can pass itemid, pageid and pagegroup id to your procedure. on the region level you need to enable the associated functions attribute to display the result of the procedure.
    find more information here:
    http://www.oracle.com/technology/products/ias/portal/pdf/cm_search_10g_associated_functions_search.pdf
    regards,
    christian

  • How to correctly set puppet attributes with AppD?

    Hello,
    I'm trying to add a value to a puppet attribute within AppD. The value is an array and should look something like this ['ntp1.testlab.local'] for puppet to work. The problem is after AppD processes it, it ends up looking like this '["ntp1.testlab.local"]' in the node's manifest, which doesn't work. I've tried several variations with no joy. Can anyone please show me how to correctly set puppet variables within AppD?
    From the node manifest created by AppD:
    [root@ar-syslog-tlab-01 appd_nodes]# grep "Puppet_ntp_v3_1_2_servers =" /etc/puppetlabs/puppet/manifests/appd_nodes/CentOS-LON4FRQT.pp
      $Puppet_ntp_v3_1_2_servers = '["ntp1.testab.local"]'
    From stdout and stderr log available on VM at /tmp/25/CG_Puppet_ntp_v3.1.2_AI-REMEDIATE_NODE/task.stdlog.
    - !ruby/object:Puppet::Util::Log
          level: !ruby/sym err
          tags:
            - err
          message: "Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Syntax error at '['; expected ']' at /etc/puppetlabs/puppet/manifests/appd_nodes/CentOS-IEU4RJWH.pp:17 on node centos-lon4frqt"
          source: Puppet
    If I edit the node's manifest to read
           $Puppet_ntp_v3_1_2_servers = [ 'ntp1.testab.local' ]
    it works fine.
    Any tips would be greatly appreciated.
    Thanks.

    If it is a bug, you maybe have a workaround by adding a script task in the execution plan the Blueprint as the first task to edit /etc/puppetlabs/puppet/manifests/appd_nodes/CentOS-LON4FRQT.pp to modify the value of $Puppet_ntp_v3_1_2_servers, and then the rest tasks will get the correct value format for $Puppet_ntp_v3_1_2_servers.

  • Preview monitor playback 'sticks' with certain types of footage.

    Hi there, I wonder if anyone could help me with this problem.
    I am going through a Apple certified FCP training book with a DVD of footage for video editing. I a have copied the footage onto my hard drive as recomended. However, some clips will not play back with any motion through my preview T.V, it just sticks and parks wherever your playhead was before the footage began or once stopped. You can watch it back fine in the canvas on FCP obviosly, but the preview monitor is sticking and not playing along with it?
    The training footage is set correctly because it configures your FCP to match the settings that the author was using.
    My settings seem fine for standard DV editing as I loaded up some of my old Mini DV quicktime footage and it runs in FCP and through my T.V monitor in real time with the canvas/timeline. However I have DVCAM video footage to edit soon and when I also try to play it this also sticks on the preview T.V and doesn't follow the canvas until you stop playing and then it lands on the frame that i am parked on.
    I imagine its my settings more than anything, I dont see how playing around with standard mini DV footage in the canvas is fine with the preview T.V and and not the DVCAM footage?
    I am going out the mac via firewire into a Datavideo AD converter which in turn is going to the preview T.V via S-Video, with the audio phono into an amp. Like I say, works a treat with standard DV footage.
    Thanks for your time and hope you can help me!
    G5 Quad Powermac   Mac OS X (10.4.9)  

    #8 External Monitor Viewing.
    Shane's Stock Answer #8:
    A simple path is mac > firewire > camera or deck > rca cables > tv
    Then start up your camera and tv, then open fcp.
    Then go View > External video > all frames
    Video playback should be Apple firewire NTSC (If you are using an NTSC set)
    Audio playback should be Audio follows Video
    Techinially, this should send synched video to your TV
    If for some reason you can't view your timeline on your external monitor, there are a few things to try:
    1) Make sure that the camera/deck is connected and powered on BEFORE you open FCP.
    2) In the Final Cut Pro menu select AUDIO/VIDEO Preferences and make sure your signal is being sent out thru Firewire DV.
    3) Go to the menu and select VIEW>EXTERNAL>ALL FRAMES.
    4) Click in the % box above the image and select FIT TO WINDOW.
    5) Go to VIEW->refresh A/V devices
    6) Make sure the Log & Capture window is closed
    If you want it to play in both the canvas and the external monitor you need to go to the FINAL CUT PRO menu and select AUDIO/VIDIO settings and make sure MIRROR ON DESKTOP is selected under the PLAYBACK OUTPUT section
    Shane

  • Set resource attribute with srvctl instead of crsctl ?

    Hello,
    We're in 11gR2, Grid Infrastructure.
    CMOS note 790189.1 states that "using crs_* or crsctl commands on resources with the prefix ora.* (resources provided
    by Oracle) remains unsupported".
    So do you think there's a way to modify the AUTO_START attribute of a cluster resource through the use of srvctl instead
    of crsctl ?
    (I found no "srvctl modify resource" option likely to do this trick...)
    Thanks.
    Seb

    Is your end goal to stop the service from starting automatically? If so, then use srvctl disable service. You will have to enable it before it can be started.
    Cheers,
    Brian

  • Trying to set dynamic attribute with Image URI

    vo.getCurrentRow().setAttribute("XXStatusLightAttr",<Img Src="/OA_MEDIA/green_circle.gif"/>)
    is not working >please Suggest
    Whats wrong in this
    if(!vo.isPreparedForExecution()){
    vo.executeQuery();
    if (vo != null)
    vo.addDynamicAttribute("XXStatusLightAttr"); //Adding ViewAttribute to VO
    vo.reset();
    vo.next();
    //Starting do-while for setting value in all the table row...
    do
    String str=vo.findAttributeDef("XXStatusLightAttr").toString();
    System.out.println(str);
    vo.getCurrentRow().setAttribute("XXStatusLightAttr",<Img Src="/OA_MEDIA/green_circle.gif"/>);
    vo.next();
    while (vo.hasNext());
    vo.first();
    Please Suggest

    The button calls a procedure which can take several minutes to complete. It calculates and stores values for display. I'd like to open up a modal window so that the user has more concrete feedback that the calculation process is underway. I'd also like to tie it to the refresh of a particular region on the page that shows a list of the stored calculations.

Maybe you are looking for

  • IPhone 4 call quality

    So me and my partner upgraded our o2 contracts yesterday and got the iPhone 4. We had iPhone 3GS' before that. When talking to other people and hearing them through the ear piece, it was crystal clear. (With iPhone 3GS') People used to comment on how

  • Excel file error saving to server because of .TemporaryItems folder

    I am running a standalone Macintosh file server. OS v10.10.1 and Server v4.0.3. All my users are setup with local accounts. The problem is when some users are working on an Excel or Word document and try to save they get an error message " Document s

  • Simple RFC call not returning results

    Hi, I have created a VERY simple Dynpro project to return the results of a simple RFC.  I've created the JCO connections and they test fine but the RFC doesn't return results to my application. Steps: 1. create the project 2. import the RFC Adaptive

  • Document on XML support in Oracle 8i

    Hi. I am looking for a brief document about Oracle 8i's support of XML. I am aware of the whole book on XML under Online Documentation, but want a more concise one. Could anyone help? Regards, Rahul

  • Error while participant.assignToGroup

    When obpm executes this myparticipant.assignToGroup(groupId : "WS_Group"); it give me this error *Object [fuego.directory.DirHumanParticipant:WS_ABC] already exists in the directory. InternalId [OBPMDir.fuego_participant-fuego_in].* The error really