Display a cruve and a table in the same servlet

Hi,
I want to display a curve in a servlet, I can do it, but I can't display the table which is after the curve, the code is the following :
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
       XYDataset dataset = createDataset(pathFile, pathFileTimer);
      JFreeChart chart = createChart(dataset);
      resp.setContentType("image/png");
      OutputStream out1 = resp.getOutputStream();
      ChartUtilities.writeChartAsPNG(out1, chart, 800, 600);
      out1.close();
      PrintWriter out = resp.getWriter();
      out.println("<html>");
      out.println("<body>");
      out.println("<head>");
      out.println("<title>Informations batterie</title>");
      out.println("</head>");
      out.println("<body bgcolor=\"white\">");
      out.println("<TABLE id=\"Table1\" style=\"WIDTH: 864px; HEIGHT: 75px\" cellSpacing=\"1\" cellPadding=\"1\" width=\"864\" border=\"1\">");
...So how can I display the table in the same servlet ? Or perhaps can I display the curve in an another servlet, but it would be better to call this servlet automatically and not manually with a post method.
Thanks for any help.

So how can I display the table in the same servlet ?You can't. You either send HTML or you send PNG. You can't combine the two in the same request.
Or perhaps can I display the curve in an another
servlet, but it would be better to call this servlet
automatically and not manually with a post method.Yes, you would use another servlet to display the curve. Servlet A would generate the HTML, including a link to Servlet B. I don't know what you think the difference between calling a servlet automatically and manually is, but if you use this two-step process:
1. Decide what HTML you want the browser to see.
2. Write code to produce that HTML.
you will find things a lot less confusing.

Similar Messages

  • Can source and target tables be the same

    Hi there,
    I need to restate profit center column in the delivery fact table. Historical Profit Centers need to be populated since today is the first time we brought in Profit Center field from LIPS table. The source for the delivery fact table is SAP LIPS table. so what I did is:
    joined the LIPS and delivery fact table on (LIPS.delivery number = deliveryfacttable.delivery number & LIPS.delivery line item number = deliveryfacttable.delivery line item number) to get the profit center.
    So the source and the target delivery fact table are the same. Is this a good practice becuase Data services warns me that the source and target tables are the same.
    Please let me know a better alternative approach to this OR a better approach to restate fields for historical data. Thanks in advance.
    Regards,
    samqiue

    Arun,
    actually the LIPS resides on another server and in order to fetch data I have to write an R3 ABAP data flow, so I cant use it directly in a lookup.
    Except what Im thinking based on your reply to use a lookup table is: that I will extract 3 colums (delivery number, delivery line item number and profit center) to a table and then use the lookup.
    Thanks.
    Regards,
    samique

  • Urgent! Display lookup value and return value at the same time.

    We are using pop up lov.
    How can we display lookup value and return value at the same time. let me claer..
    Our lov query is like fallowing
    select dname, deptno from dept
    we want to return deptno column into a database bind text item and dname column into a display item (look up)
    can we do it (we need to do)
    thanks for your help.

    We did it .
    But pop up key lov (display description return value ) property doesn't appear for tabular forms item.
    (Report Attributes pages Tabular Form Element section display As property list)
    can we set or not.
    Thank you.

  • Source and Target Table in the Same schema........will that work in ODI

    Hi ,
    Is it possible to have my source and target tables in the Same achema.......will it have any performance issues or some other issues in our ODI.......
    I would like to know whether it works well or not .........
    ( To my understanding it wont have any issues ......But I am not 100 % sure on my judgement)
    Thanks
    AK

    Yes, you're correct.
    Just be sure about you load strategy, it means, if you need only to insert use the KM Control Append, but if need update too, try the IKM Oracle Incremental Update... I believe that will work better for millions of lines.
    Anyway be sure that your database has the necessary tablespaces to manage huge data volume.

  • Is it possible to display list alv and grid alv in the same screen

    Hi
    There are methods to display more than 1 alv grid in the same screen by using block append grid . In the same manner its available for more than 1 list alv report display by REUSE_ALV_BLOCK_LIST_APPEND.
    My question is I want to display 1 alv list and 1 alv grid report in the same output screen .
    Please let me know how to do it ?  I will definetly appreciate the answers.
    Thanks!!

    Hi Anindita,
                                      Previously i ad told v cant display two lists together in same screen. But u can use Block ALV for this. Use FM "REUSE_ALV_BLOCK_LIST_APPEND.
    In OO u can use Cl_GUI_EAST_SPLITTER_CONTAINER for displayin more than two lists in same screen.
    If useful giv points
    Regards
    Vanitha P

  • Simpli Home Artisan : TV Stand and Coffee Table : Not the same color. HELP

    Hello,
    I ordered and received the Simpli Home Artisan TV Stand from the BestBuy website.  We got it a couple weeks ago, put it together and love it.
    We decided to order the matching Simpli Home Artisan Coffee table to go with it.  We just picked it up today and it is not the same color at the TV stand.
    Both item listed on the BestBuy website say they are "Medium auburn brown" in color, as do the boxes we recieved. However they are not the same color, the TV stand is much darker than the coffee table.
    TV Stand: http://www.bestbuy.com/site/simpli-home-artisan-tv-stand-for-most-flat-panel-tvs-up-to-54/1622137.p?...
    Coffe Table: http://www.bestbuy.com/site/simpli-home-artisan-collection-coffee-table/1860306.p?id=1219066204317&s...
    If you go to the Simpli Home manufacturer website you will see that Artisan collection comes in two different color tones, "Available in Auburn or Tobacco Brown".
    Simpli Home Website: http://www.simpli-home.com/#!wood---artisan-coffee-table/cuhk
    The TV stand we got is Tobacco Brown, and though the color does not match the pictures on BestBuy.com, we liked it and decided it was okay, but not if the coffee table doesn't match.
    I really don't care if I get Tobacco Brown or Medium Auburn, I just want them to match.  However since I've already assembled the TV Stand, I would like to return the coffee table and get one that is Tobacco brown.
    I posted this to the forum because I know if I call the store they won't have a clue what I am talking about.
    Please let me know what I should do, and help me if you can.
    Thank you
    Solved!
    Go to Solution.

    Greetings rtb1980,
    I can definitely understand why you would choose both of those pieces of furniture as they look wonderful, but of course it would be a chronic annoyance if the furniture didn’t match. Using the email address you registered with the forum, I was able to take a look at your purchase history and the items on our site as well as the manufacturer’s.
    As we get all of our information about the products directly from the manufacturer, it would seem that you received the wrong color TV stand, and that you would have received the correct color for the coffee table. As these items are special ordered items, meaning the orders are not fulfilled directly by us, it is difficult to say where the mix up may have occurred with your TV stand, for which I am truly sorry.  
    That being said, it does not appear that we carry the coffee table in the tobacco brown color you are looking for. Sadly, this means we would be unable to provide you an exchange for the tobacco color, although you should be able to return the coffee table within the Return & Exchange Policy. However, we should be able to provide you with an exchange of your TV stand for the correct color to match the auburn colored coffee table you received; although, I understand that this may not be the ideal resolution, as it may have been the more complicated piece of furniture to put together.
    I apologize for any inconvenience this experience may have caused you. If you should have any questions, or need any further assistance, please do not hesitate to reach out to me.
    Sincerely,
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

  • How to display current postion and previous position in the same row?

    I need to produce a promotions/transfer report that gives the employee's current position as well as his/her previous position in the same row.
    for example:
    Employee current position current organization current company previous postion previous organization previous company
    Jane Smith Executive PA ZYX ltd Harmony personal assistant ABC ltd Yahoo
    I am using the per_all_people_f, per_all_assignments_f, per_periods_of_service, hr.all_organization_units, per_all_positions tables
    Somehow i cannot manage to display the previous position. I can only get so far to display the current postions
    Any ideas? here is the full code
    --this query gives current info
    select ppf.employee_number, ppf.full_name
    , (DECODE (ppf.sex, 'M', 'Male', 'F', 'Female') ) gender
    , (DECODE (ppf.per_information4
    ,'01', 'Indian'
    ,'02', 'African'
    ,'03', 'Coloured'
    ,'04', 'White') ) race
    , ppf.ORIGINAL_DATE_OF_HIRE
    , paf.EFFECTIVE_START_DATE current_postion_start_date
    , RTRIM (SUBSTR (hpt.NAME, 1, INSTR (hpt.NAME, ';') ),';')Current_Position
    , ho.name Current_Organization
    , xx_return_structures.xx_return_company_name
    (paf.person_id,
    paf.effective_start_date
    ) current_company
    from per_all_assignments_f paf,
    hr_all_positions_f_tl hpt,
    hr_all_organization_units_tl ho,
    per_all_people_f ppf
    --where paf.person_id = 16170
    and paf.POSITION_ID=hpt.POSITION_ID
    and paf.ASSIGNMENT_NUMBER is not null
    and ho.organization_id = paf.organization_id
    and ppf.person_id=paf.person_id
    and paf.EFFECTIVE_START_DATE between ppf.EFFECTIVE_START_DATE and ppf.EFFECTIVE_END_DATE
    order by paf.EFFECTIVE_START_DATE
    --this query gives previous position, organization and company
    select ass.EFFECTIVE_START_DATE
    , RTRIM (SUBSTR (hpt.NAME, 1, INSTR (hpt.NAME, ';') ),';')Previous_Position
    , ho.NAME previous_organization
    , xx_return_structures.xx_return_company_name
    (paf.person_id,
    paf.effective_start_date
    ) previous_company
    from per_all_assignments_f paf, hr_all_positions_f_tl hpt, hr_all_organization_units_tl ho
    where paf.person_id = 16170
    and paf.EFFECTIVE_START_DATE not in (select max(paf.EFFECTIVE_START_DATE)
    f rom per_all_assignments_f paf
    where ass.person_id = 16170)
    and paf.PRIMARY_FLAG ='Y'
    and paf.POSITION_ID=hpt.POSITION_ID
    and paf.ORGANIZATION_ID=ho.ORGANIZATION_ID

    Ok so here is my problem. The current position display 3 times. The rest is correct. it only display once. Any ideas on how to get rid of the 2 extra rows that is being displayed with the current position?? I only need the current position to display once with the previous position info.
    select distinct pvs.person_id,
    peo.EMPLOYEE_NUMBER empno,
    peo.FULL_NAME,
    (DECODE (peo.sex, 'M', 'Male', 'F', 'Female') ) gender,
    (DECODE (peo.per_information4
    ,'01', 'Indian'
    ,'02', 'African'
    ,'03', 'Coloured'
    ,'04', 'White') ) race,
    peo.ORIGINAL_DATE_OF_HIRE,
    pvs.EFFECTIVE_START_DATE curr_start_date,
    RTRIM (SUBSTR (pvs.job, 1, INSTR (pvs.job, ';') ) ,';') current_position,
    pvs.ORGANIZATION current_organization,
    substr(pvs.PAYROLL,5)current_company,
    a1.previous_position,
    a1.previous_organisation,
    a1.previous_company
    from per_periods_of_work_v pv,
    per_assignments_v2 pvs,
    per_all_people_f peo,(select distinct RTRIM (SUBSTR (pvs.job, 1, INSTR (pvs.job, ';') ) ,';') previous_position,
    pvs.ORGANIZATION previous_organisation,
    substr(pvs.PAYROLL,5)previous_company,
    pvs.job_id job_id,
    pvs.organization_id,
    pvs.position_id,
    pvs.location_id,
    pvs.PERSON_ID,
    pvs.PEOPLE_GROUP_ID,
    pvs.EFFECTIVE_END_DATE,
    pvs.EFFECTIVE_START_DATE
    from per_assignments_v2 pvs
    where sysdate > pvs.EFFECTIVE_END_DATE
    and pvs.person_id=4723
    )a1
    where peo.person_id = pvs.person_id
    and pvs.person_id = pv.person_id
    and a1.person_id = pvs.person_id
    and pvs.EFFECTIVE_START_DATE between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
    and pvs.PEOPLE_GROUP_ID <> a1.people_group_id
    and pvs.JOB_ID <> a1.job_id
    and pvs.ORGANIZATION_ID <> a1.organization_id
    and pvs.position_id <> a1.position_id                     activating this elimnates 1-Feb-2008 info
    and pvs.effective_start_date -1 = a1.effective_end_date     activating this eliminates 1-feb-2008, 1-jul-2006, 1-april-1996 info
    and pv.person_id = 4723
    order by pvs.effective_start_date desc

  • Best practice when FACT and DIMENSION table are the same

    Hi,
    In my physical model I have some tables that are both fact and dimension table, i.e. in the BMM they are of course separated into Fact and Dim source (2 different units) and it works fine. But I can see that there will be trouble when having more fact tables and I e.g. have a Period dimension pointing to all the different fact tables (different sources).
    Seems like the best solution to this is to have an alias of the fact/transaction table and have 2 "copies" of the transaction table (one for fact and one for dimension table) in the physical layer. Only bad thing is that there will then allways be 2 lookups in the same table when fetching data from the dimension and the fact table.
    This is not built on a datawarehouse - so the architecture is thereby more complex. Hope this was understandable (trying to make a short story of it).
    Any best practice on this? Or other suggestions.

    Id recommend creation of a view in the database. if its an oracle DB, materialised views would be a huge performance benefit. you just need to make sure that the MVs are updated when the source is updated.
    -Domnic

  • Display entity-attributes and global-attributes in the same screen

    Hi,
    I have a question about entity.
    Is it possible to display in the same screen, entity-attributes and global-attributes?
    thanks
    Rosalia

    Hi Rosalia,
    You can only display attributes from the current entity and the entity or entities that it is contained by (the parent entities).
    So if you had the following data model
    Global
    ..the person
    ...the income
    the person is contained by global.
    the income is contained by the person (which is contained by global).
    If you want to create a person-level question screen, you can display global attributes on that screen by using subsitution like %global_field_1%. You cannot, however, input global attributes on that screen (ONLY attributes belonging to the person)
    If you want to create an income-level question screen, you can display attributes from the person such as "tell us about %person_name%'s income..." as well as global attributes. Again, you cannot input person or global attributes on that screen (ONLY attributes belonging to the income)
    However it only works from child-to-parent containment relationships! You cannot have a global question screen which loops through the person instances and displays attributes from the person, or from the income out-of-the-box.
    We have managed to implement this using custom controls.
    You can map individual attributes back up to the parent level, and then display them,
    such as
    the first person's name = InstanceValueIf(the people, the person's name, the person's id = 1)
    the first person's name is now a global attribute and can be displayed on global question screens.
    Hope this helps!
    Ben

  • Dimension and Fact table have the same grain

    Hi All,
    How can we join a dimension and a fact table if they have the same grain ? In my case it is a contract number.
    Thanks

    Your Impression is right, In terms of Dimensional Modeling. You have to consider this when you are designing your warehouse tables.
    But now if you already have these tables in database, OBIEE does not care how many rows a table have, it just need to know what is fact and what is Dimension and it will generate sql queries based on join conditions.

  • Lookup Table and Target Table are the same

    Hi All,
    I have a requirement in which I have to lookup the target table and based on the records in it, I need to load a new record into the target table.
    Being very specific,
    Suppose I have a key column which when changes I want to generate a new id and then insert this new value.
    The target table record structure looks like this
    list_id list_key list_name
    1 'A' 'NAME1'
    1 'A' 'NAME2'
    1 'A' 'NAME3'
    2 'B' 'NAME4'
    2 'B' 'NAME5'
    As shown the target table list_id changes only when the list key changes. I need to generate the list_id value from within OWB mapping.
    Can anyone throw some light as to how this can be done in OWB???
    regards
    -AP

    Hello, AP
    You underestimate the power of single mapping :) If you could tolerate using additional stage table (with is definitly recomended in case your table from example will account a lot of rows).
    You underestimate the power of single mapping :) It you could tolerate using additional stage table (witch is definitely recommended in case your table from example will account a lot of rows), you could accomplish all you need within one mapping and without using PLSQL function. This is true as far as you could have several targets within one mapping.
    Source ----------------------------------------------------- >| Join2 | ---- > Target 2
    |------------------------ >|Join 1| --> Lookup table -->|
    Target Dedup >|
    Here “Target” – your target table. “Join 1“ – operator covers operations needed to get existing key mapping (from dedup) and find new mappings. Results are stored within Lookup Table target (operation type TRUNCATE/INSERT).
    “Join 2” is used to perform final lookup and load it into the “Target 2” – the same as “Target”
    The approach with lookup table is fast and reliable and could run on Set base mode. Also you could revisit lookup table to find what key mapping are loaded during last load operation.
    Serhit

  • OCI doc says Cursor and Nested table have the same bind type SQLT_RSET but they don't

    5 Binding and Defining in OCI
    PL/SQL REF CURSORs and Nested Tables in OCI
    says SQLT_RSET is passed for the dty parameter.
    If I use SQLT_RSET for the return value of a function that returns a table and pass a statement handle's address for the OCI parameter data pointer, I expected that the statement handle will be instantiated as a result of executing the function on which I can further perform fetch, similar to a cursor. But it throws exception PLS-00382: expression is of wrong type ORA-06550: line 2, column 3. Is the above documentation wrong?
    From the OCI header file I see that for varray and nested table it mentions to use SQLT_NCO. I could find no example in the OCI documentation on how to pass or receive as return value a nested value when using SQLT_NCO.
    Please help before I shoot myself.

    So the Nested table I quoted in the doc is not actually used to mean a table type below?
    create type t_resultsetdata as object (
    i int, d decimal, c varchar(10)
    create type t_nested_resultsetdata as table of t_resultsetdata;
    create function Blah return t_nested_resultsetdata  is . . .
    For this you are saying to use SQL_NTY and not SQL_NCO. Can you tell where this usage is documented, because ocidfn.h says
    #define SQLT_NTY  108                              
    /* named object type */
    #define SQLT_NCO  122 
    /* named collection type (varray or nested table) */
    Another question - Because of the original document I said I followed, I thought I could treat cursor and nested table similarly in the calling application, i.e. I could repeatedly do a fetch on the OCIStmt* which will be bound for nested table. Now from what you say I understand I can't really bind a OCIStmt* for nested table but have an object type. That means it will get all the data of that collection in one go, right? LIke I said, lack of examples is making this tough. I don't want to look into OCI source code, as that will be too much.

  • My display freaks out and gets 4 of the same screen one it

    I have my display (apple cin of course), hooked to my Macbook Pro.  It has worked perfect for about a year and now it is clicking on and off every once in a while.  Then yesterday is went off and came back on with 4 of the same screen on the main screen and it was all jumbled up.  Why is it doing this and is the display failing?

    It sounds like the display or video card could be failing.  Try an smc reset but it probably won't have any affect.

  • The pur.doc numbers are nt displaying in besg and mseg tables

    hi experts!
                   The bseg and mseg tables having the field(ebeln) of  purchasing doc.but is nt having any value.the field is empty in table.pl anyone can tel me wat is the reason,is it configuartion pbm or wat else.wat is the soln for this.
                  Thanks!.

    Hi,
    if FI doc is getting generated ie...while migo and miro, then entry must hit the table....if its not hitting.....then you need to debug it and find out the reason.
    reg
    Arun

  • Selecting from one table and Update another in the same Page

    Could someone help me with this HTMLDB task. In my page design, I am selecting data from two tables (masters: DEPT, EMP) which I want to display on the left column of the page and at the same time a user would be able to update another table (ATTENDANCE:with many children) which would have a radiogroup on the right side for each value of the master such as employee name. The placement of data has to appear in corresponding rows on the page. For instance, employee names of the master table must appear on the same row with its corresponding child value. The page would be grouped by DEPT_NO. The user would click on the department name, a new page with the employee name would apprar. From that page, the user would then update attendance column for each employee in that department. In this operation, it is only the ATTENDANCE table that is being updated. I can send out more information about the structure of the tables if you need more information. I tried many HTMLDB options, forms, reports, etc. I have not been able to get quite right. Your help will be appreciated.

    Raju,
    Thanks for responding to my problem. I have actually tried using the example on how-to you sent me a link to but it did not help as I expected. You see, the page would be updated every meeting date for each employee. I can send you more information about the table structure if you like. However, let me see if this will help you a bit.
    Tables are: 1) Dept [dept_no (pk),dept_name] 2) EMP [emp_no (pk),emp_name, dept_no(fk)] 3) Meetings [meet_key(pk),attended, meeting_date, emp_no(fk)]
    What I want to do is create two pages, one would list the departments, when a user selects a department, the user would be linked to a meeting attandance page. The meeting attendance page would list department name once, Meeting date once, and then list employees in that department. At the right column of every employee would be a checkbox for meeting.attended for update. The meeting_date would be pre-populated so that what the user would do is just check Yes/NO. The second page is the one I'm having the most problem with.
    If I can do a fetch from dept, emp, and meetings and then do an update on the Meetings table on the same page, I think that might solve the problem. That was how I solved it in MS Access three years ago.
    Here is email address in case you want to contact me directly. [email protected]
    Thanks again for your help.

Maybe you are looking for