Web Performance (Static vs Dynamic pages)?

Hello all, I am building a web site like
http://www.bizrate.com/buy/browse__cat_id--402,de_id--300.html
and want to know if I use jsp to generate web pages(e.g. a user browse by Resolution), then each time the server would recompute and get the same result pages. (If my data doesn't change)
So, should I generate theses pages statically, or use jsp to generate these pages dynamically? If static, my server load should be lower.
Tomcat 4.1.24, Redhat 8.0, MySQL
Thanks in advance.

Realistically, how often do you expect your pages to be accessed? How long does the dynamic rendering of a page take to complete? How soon does new data need to appear online?
If you have short rendering times and only a few hundred accesses a day, then there is no reason to worry about static generation of your pages, the dynamic generation of pages will suit your needs.
If, however, you have long rendering times (a complex query returning tens of thousands of rows will do it) or if you are looking at a huge number of accesses (lottery sites can get millions per month) and you don't need new information to appear immediately, the once-daily dynamic generation of static pages (via a cron job or other means) will suit your needs.
Check your needs, check your site with dynamic generation under load, and your question should answer itself.

Similar Messages

  • Perform static and dynamic check together on a customer?

    Hello All,
    Is it possible to perform static and dynamic check together on a customer?
    I believe standard SAP does not allow both options together.
    The scenario is: My client has customer who orders products 1 year in advance and create sales order with a future delivery date. The customer might have balance due on their account which is close to the credit limit. As a result the sale order should be blocked as if the automatic credit check is "Static". This would allow our customer service to call the customer and arrange for the payments.
    Then 11 months later, a dynamic check should be performed on the customer to make sure the past due is under the credit limit. If the past due is over credit limit, the sales order must be blocked for delivery as if the credit check was "Dynamic" with 30 days horizon. This would again give our customer service time to settle the payment with the customer.
    If anyone has implemented such a scenario, can you please give me an overview of how you did it?
    Thanks very much in advance and Text Removed.
    With Regards,
    AM
    Edited by: Lakshmipathi on Nov 13, 2010 9:23 AM
    Please dont include this text

    Static and Dynamic Cannot be Performed together. They are mutually exclusive events.
    Credit check can be performed either at Sale order level or at Delivery / PGI Level.
    FCV3 is a good report to see whether a customer would fail a credit check. ( suitable for your customer service )
    Coming to your Point , Assuming that the customer is eligible for a Credit of 50 Lacs. Now the Customer has placed an order for 60 Lacs. We set the Customer credit checking at  order level . The Customers Sale order would get blocked.
    The Customer service  will follow up for the payment and see to it that it is made. Assume the customer has made a payment for 70 Lacs.
    Now let us have a look at the account statement of the customer.
    Account Statement :     Customer Cr :  70 Lacs.   Dr   :  0.  ( because no delivery and invoice  so far has been made )  
    So we are supposed to deliver the Material worth value of 60 Lacs.
    The First sale order worth 60 Lacs has been unblocked in VKM3. Now at the time of Delivery level why would you want to chekc the Credit limit again ? It has already passed the credit check.
    It is not necessary to check credit limit . Because you have already performed the same at the order level.
    Now the customer has come again and raised another sale order for 80 Lacs. The System would block him.
    The system will never block the Previous delivery which you are, due for delivery  to the customer.
    If we keep on checking the Credits without delivering we would end up only raising in Sale orders and no Delivery to the Customer  at all. The Debit side of his account will always be 0.
    So i donot think Static and dynamic is needed . you can go for either Static or Dynamic.

  • Can Web Performance Test work on AJAX or Javascript Project which will show only one URL for all the pages?

    Hi there,
    I'm working on testing a AJAX and JavaScript Project which has several pages but all in the same URL. I need to test some attribute on the page or parameter past by AJAX or Javascript. Can Web Performance Test work to get what I want?
    Thanks,
    

    Hello,
    Thank you for your post.
    Web performance test is used to test if a server responses correctly and the response is consistent with what we expected. And we test the response speed, the stability and scalability.
    The Web Performance Test Recorder records both AJAX requests and requests that were submitted from JavaScript, but
     web test does not execute JavaScript. I am afraid that you can’t use web test to test parameter past by AJAX or JavaScript.
    Please see:
    Web Performance Test Engine Overview
    About JavaScript and ActiveX Controls in Web Performance Tests
    From the first link, “Client-side scripting that sets parameter values or results in additional HTTP requests, such as AJAX, does affect the load on the server and might require you to manually modify the Web Performance Test to simulate the scripting.”
    If you want to execute the function typically performed by script in web test, you need to accomplish it in coded web performance test or a web performance test plugin. Please see:
     How to: Create a Coded Web Performance Test
    How to: Create a Web Performance Test Plug-In
    I am not sure what the ‘some attribute on the page’ is. If you mean that you want to test those controls on the page, you can do coded UI test, which can test that the user interface for an application functions correctly. The coded UI test performs actions
    on the user interface controls for an application and verifies that the correct controls are displayed with the correct values. You can refer to this article for detailed information about code UI test:
    Verifying Code by Using Coded User Interface Tests
    Best regards,
    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Bad performance dynamic page

    Hi.
    Can anybody tell what the bottleneck is in this script? It is a dynamic page (portal 3.0.9). The select statements are not very complicated.
    ANY HELP IS WELCOME!!
    <HTML>
    <BODY BGCOLOR="#FFFFFF" TEXT="#444444">
    <ORACLE>
    declare
    cursor c_runway is select distinct runway from vem_flights where nvl(:v_runway,runway) = runway;
    v_runway vem_flights.runway%type;
    v_select number;
    v_totaal number;
    v_percentage number;
    v_aantal_jaren number;
    v_aantal_maanden number;
    v_aantal_weken number;
    v_aantal_dagen number;
    v_tijd number;
    teller number;
    kopstring varchar2(500);
    selectstring varchar2(500) := '';
    begin
    v_tijd := :v_tijdvak;
    :v_begindate := :v_begindate;
    :v_enddate := :v_enddate;
    if v_tijd = 3 then
    select round(months_between(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS'),to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'))) into v_aantal_maanden from dual;
    if last_day(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')) > add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),v_aantal_maanden) then
    v_aantal_maanden := v_aantal_maanden + 1;
    for teller in 1 .. v_aantal_maanden loop
    if teller = 1 then
    kopstring := '<td><b><i>Baan\Tijdvak </i></b></td>'||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||' t/m '||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller),'DD-MM-YYYY')||'</i></b></td>';
    elsif teller > 1 and teller < v_aantal_maanden then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1),'DD-MM-YYYY')||' t/m '||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller),'DD-MM-YYYY')||'</b></i></td>';
    elsif teller = v_aantal_maanden then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||'</i></b></td>';
    end if;
    end loop;
    v_aantal_maanden := v_aantal_maanden - 1;
    else
    for teller in 1 .. v_aantal_maanden loop
    if teller = 1 then
    kopstring := '<td><b><i>Baan\Tijdvak </i></b></td>'||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||' t/m '||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller),'DD-MM-YYYY')||'</i></b></td>';
    elsif teller > 1 and teller < v_aantal_maanden then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1),'DD-MM-YYYY')||' t/m '||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller),'DD-MM-YYYY')||'</b></i></td>';
    elsif teller = v_aantal_maanden then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||'</i></b></td>';     
    end if;
    end loop;
    end if;
    htp.p('<font face = "arial" size="3"><b>Verticale afwijkingen overdag van naderende vliegtuigen buiten de TMA</b></font><p>&nbsp<p>');
    htp.p('<table border="1">');
    htp.p('<tr>'||kopstring||'</tr>');
    open c_runway;
    loop
    fetch c_runway into v_runway;
    exit when c_runway%notfound;
    selectstring := '<td><b><i>'||v_runway||'</i></b>';
    if last_day(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')) > add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),v_aantal_maanden) then
    v_aantal_maanden := v_aantal_maanden + 1;
    for teller in 1 .. v_aantal_maanden loop
    if teller = 1 then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    elsif teller > 1 and teller < v_aantal_maanden then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;               
    elsif teller = v_aantal_maanden then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.gs21 = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;               
    end if;
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;
    end loop;
    v_aantal_maanden := v_aantal_maanden - 1;
    else
    for teller in 1 .. v_aantal_maanden loop
    if teller = 1 then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
    and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;     
    elsif teller > 1 and teller < v_aantal_maanden then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
    and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')
    and add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')-1,teller)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;               
    elsif teller = v_aantal_maanden then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
    and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between add_months(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS'),teller-1)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;          
    end if;
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;
    end loop;
    end if;
    htp.p('<tr>'||selectstring||'</tr>');
    end loop;
    close c_runway;
    htp.p('</table>');
    htp.p('</font>');
    elsif v_tijd = 1 then
    select to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS') - to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') into v_aantal_dagen from dual;
    for teller in 0 .. v_aantal_dagen loop
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + teller,'DD-MM-YYYY')||'</b></i></td>';
    end loop;
    htp.p('<font face = "arial" size="3"><b>Verticale afwijkingen overdag van naderende vliegtuigen buiten de TMA</b></font><p>&nbsp<p>');
    htp.p('<table border="1">');
    htp.p('<tr>');
    htp.p('<td><b><i>Baan\Tijdvak </i></b></td>'||kopstring);
    htp.p('</tr>');
    open c_runway;
    loop
    fetch c_runway into v_runway;
    exit when c_runway%notfound;
    selectstring := '<td><b><i>'||v_runway||'</i></b>';
    for teller in 0 .. v_aantal_dagen loop
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time = to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + teller
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
    and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time = to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + teller
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;
    end loop;
    htp.p('<tr>'||selectstring||'</tr>');
    end loop;
    close c_runway;
    htp.p('</table>');
    htp.p('</font>');
    elsif v_tijd = 2 then
    select trunc(to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS') - to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')) / 7) into v_aantal_weken from dual;
    for teller in 0 .. v_aantal_weken loop
    if teller < v_aantal_weken then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1),'DD-MM-YYYY')||'</b></i></td>';
    elsif teller = v_aantal_weken then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1),'DD-MM-YYYY')||'</b></i></td>';
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||'</b></i></td>';                         
    end if;      
    end loop;
    htp.p('<font face = "arial" size="3"><b>Verticale afwijkingen overdag van naderende vliegtuigen buiten de TMA</b></font><p>&nbsp<p>');
    htp.p('<table border="1">');
    htp.p('<tr>');
    htp.p('<td><b><i>Baan\Tijdvak </i></b></td>'||kopstring);
    htp.p('</tr>');
    open c_runway;
    loop
    fetch c_runway into v_runway;
    exit when c_runway%notfound;
    selectstring := '<td><b><i>'||v_runway||'</i></b>';
    for teller in 0 .. v_aantal_weken loop
    if teller < v_aantal_weken then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);           
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    elsif teller = v_aantal_weken then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*14) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;          
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;                    
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.gs21      = 'X'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7)
         and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    end if;
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;
    end loop;
    htp.p('<tr>'||selectstring||'</tr>');
    end loop;
    close c_runway;
    htp.p('</table>');
    htp.p('</font>');
    elsif v_tijd = 4 then
    select trunc(to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS') - to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS')) / 365) into v_aantal_jaren from dual;
    for teller in 0 .. v_aantal_jaren loop
    if teller < v_aantal_jaren then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1),'DD-MM-YYYY')||'</b></i></td>';
    elsif teller = v_aantal_jaren then
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1),'DD-MM-YYYY')||'</b></i></td>';
    kopstring := kopstring||'<td colspan="3"><b><i>'||to_char(to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*7),'DD-MM-YYYY')||' t/m '||to_char(to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS'),'DD-MM-YYYY')||'</b></i></td>';                         
    end if;      
    end loop;
    htp.p('<font face = "arial" size="3"><b>Verticale afwijkingen overdag van naderende vliegtuigen buiten de TMA</b></font><p>&nbsp<p>');
    htp.p('<table border="1">');
    htp.p('<tr>');
    htp.p('<td><b><i>Baan\Tijdvak </i></b></td>'||kopstring);
    htp.p('</tr>');
    open c_runway;
    loop
    fetch c_runway into v_runway;
    exit when c_runway%notfound;
    selectstring := '<td><b><i>'||v_runway||'</i></b>';
    for teller in 0 .. v_aantal_jaren loop
    if teller < v_aantal_jaren then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.gs21      = 'X'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    elsif teller = v_aantal_jaren then
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.gs21      = 'X'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
         and vem.destination = 'EHAM'
         and vem.period = 'DAY'
    and vem.runway = v_runway
         and vem.departure NOT IN ('EHLE','EHRD','EHVB')
         and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
         and to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + ((teller*730) - 1)
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;          
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;                    
    select count(*)
    into v_select
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.gs21      = 'X'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    select count(*)
    into v_totaal
    from vem_flights vem
    where vem.aircrafttype = 'JET'
    and vem.destination = 'EHAM'
    and vem.period = 'DAY'
    and vem.runway = v_runway
    and vem.departure NOT IN ('EHLE','EHRD','EHVB')
    and vem.date_time between to_date(:v_begindate,'DD-MM-YYYY HH24.MI.SS') + (teller*365)
    and to_date(:v_enddate,'DD-MM-YYYY HH24.MI.SS')
    and (rtrim((to_char(vem.date_time,'HH24'))) >= :v_starthour or :v_starthour = '%')
    and (rtrim((to_char(vem.date_time,'HH24'))) < :v_endhour or :v_endhour = '%')
    and rtrim((to_char(vem.date_time,'DAY'))) IN (:v_day);
    if v_totaal != 0 then
    select round((v_select/v_totaal)*100) into v_percentage from dual;
    elsif v_totaal = 0 then
    select 0 into v_percentage from dual;
    end if;
    end if;
    if v_percentage > 5 then
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td><font color="red">'||to_char(v_percentage)||'%</font></td>';
    else
    selectstring := selectstring||'<td>'||to_char(v_select)||'</td><td>'||to_char(v_totaal)||'</td><td>'||to_char(v_percentage)||'%</td>';                    
    end if;
    end loop;
    htp.p('<tr>'||selectstring||'</tr>');
    end loop;
    close c_runway;
    htp.p('</table>');
    htp.p('</font>');
    end if;
    end;
    </ORACLE>
    </BODY>
    </HTML>

    I set up a helper package to return my reference cursors:
    Package SOME_PKG as type t_RefCur is REF CURSOR;
    I added the appropriate function to return the cursors. Here a simple example:
    FUNCTION get_leads(x in NUMBER, y in NUMBER)
    RETURN t_RefCur IS
    v_ReturnCursor t_RefCur;
    v_SQL VARCHAR2(500);
    BEGIN
    v_SQL:= 'select * from SOME_TABLE_OR_VIEW where account = :n and location = :m';
    OPEN v_ReturnCursor FOR v_SQL using x,y;
    RETURN v_ReturnCursor;
    END get_leads;
    Then I make my call from the portlet which goes something like this:
    <oracle>
    declare
    arow SOME_TABLE_OR_VIEW%ROWTYPE;
    invcursor SOME_PKG.t_RefCur;
    X number;
    Y number;
    begin
    invcursor := SOME_PKG.get_leads(get_account_number(X), get_location(Y));
    /*portlet formatting and looping...
    fetch invcursor into arow;
    htp.p(arow.SOME_ROW_FROM_TABLE);
    end;
    </oracle>
    I have gotten very good performance with reference cursors in Oracle.
    Good luck.

  • Static/Dynamic page support - duplex printing

    Hi there,
    Please could we request a "static page" feature for the PLD in B1. Essentially we would like to be able to print out Terms&Conditions on the reverse of our Marketing Documents (we have a duplex printer) on ALL pages. ie: pge1 dynamic, pge2 static, pge3 dynamic, pge4 static etc etc.
    I understand Crystal Reports would be a possible solution, but we are not using this and wouldn't really like to start to just for this feature.
    Thanks
    Raj

    As far as I can tell, using static Text field will allow me to have a single page of terms and conditions at the end of the marketing document. Unfortunately, we need the terms to be on the reverse side of each page of the marketing document. If this is possible with static text, could you outline this for me?
    Thanks,
    Raj

  • Dynamic Page Performance Issues

    Hello,
    We have a number of pl/sql procedures that display information, and are currently implemented as portlets via separate dynamic pages. The dynamic page simply calls the PL/SQL procedure with the appropriate parameters, and overall it works well.
    What I have been noticing though, is analyzing a page using the &_debug=1 parameter, shows an example portlet (dynamic page) being generated - Portlet Timing: 4969 msecs. When running the procedure on its own (/pls/portal/schema.pkg.proc) it runs in about 1.5 - 2.0 seconds.
    Why does the dynamic page implementation add so much overhead? Is there something else that I can or should be tuning to help this? Any ideas?
    Similar results have been proven on other procedures/dynamic pages, so it seems to be an issue across the board.
    Thanks in advance,
    Mike

    Dynamic Page Porltets are expensive because they contact the database to run there associated queries EVERY time they are called.
    There is an inherent overhead with the Portal architecture when contacting the database to generate portlets. The best thing you can do is tune your query to the maximum.
    Thanks
    Peter

  • Mixing static and dynamic content in a single outputText value causes NPEs

    Hi,
    I am having a problem and I'm wondering if it is a result of my error or if this is a bug.
    I am mixing dynamic and static content in the value attribute of tags (e.g., outputText). On initial page load, everything works fine. However, if the same view is reloaded (e.g., after a failed validation) I get an NPE from JSF:
    [#|2006-10-24T08:49:03.756-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NullPointerException
            at com.sun.faces.el.MixedELValueParser.getNextToken(MixedELValueParser.java:140)
            at com.sun.faces.el.MixedELValueParser.parse(MixedELValueParser.java:123)
            at com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:60)
            at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
            at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:201)
            at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:128)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:609)
            at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
            at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
            at org.apache.jsp.registration_jsp._jspx_meth_h_panelGrid_0(registration_jsp.java:324)
            at org.apache.jsp.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:223)
            at org.apache.jsp.registration_jsp._jspx_meth_f_view_0(registration_jsp.java:157)
            at org.apache.jsp.registration_jsp._jspService(registration_jsp.java:118)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
            at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
            at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
            at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)My code looks like this:
    <h:outputText escape="false"
              value='<link href="#{myBean.styleSheet}" rel="stylesheet" type="text/css"  />' />If I replace this with a much more convoluted set of tags, it works:
    <h:outputText escape="false"
              value='<link href="' /><h:outputText escape="false" value="#{myBean.styleSheet}"
              /><h:outputText escape="false" value='" rel="stylesheet" type="text/css" />' />So is the problem that I am mixing dynamic and static content with a single value? If so, why does it work on the first view, and not after?
    If it matters, I'm using the reference implementation version 1.1 (as included with NetBeans 5.5RC2) on SuSE 10.0 w/ JDK 1.5_09.
    Thanks,
    Bill

    Yes, that's how I originally had it, but then changed it to the outputText approach since a single tag could do what I wanted, as long as I was allowed to mix static and dynamic content within a single value.
    I think this is a bug in JSF 1.1, since if what I am doing is illegal, it should throw an exception on the first page view, not work on first view and throw an exception on subsequent views. I'm guessing that this has something to do with the fact that on first page view it only runs the restore view and render response JSF phases, while on subsequent requests all of the phases will be run, and it's in one of those other phases that the exception is thrown.
    For now, multiple tags is the work-around, I guess.
    Thanks,
    Bill

  • Database Driven Dynamic pages

    Hi all,
    I am new to jsp/servlets but I know java. I have been teaching myself jsp for a few weeks now, but i am unclear about a few things. I figure a good exercise would be to make a ecom. website for someone i know, which would help me learn and they would get a site for free. I am just unclear on creating the dynamic pages. Say i have 6 categories. I would like to click on the link and select all the products from that category and display them in a table on the page. I know you need to create a servelet that will query the db then you can create the table adding in the data from the DB and send it back to the client side. Im just not sure what its the best way to do this. I have seen code the looks like product?productCode=123131. and i believe this calls a servelet and passes in the 123131 as a parameter. I have a pretty good idea of how to do this but i am looking for an example or some kind of tutorial to help me along. I have been searching for a while and came up with nothing. I have been using this book while teaching myself.
    Murach's Java Servlets and JSP
    They have a pretty good example of an entire site but i am just getting stuck in this spot.
    TIA
    John

    Sorry i was in rich text mode
    web.xml
    <servlet>
            <servlet-name>DisplayProducts</servlet-name>
            <servlet-class>category.DisplayProducts</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>DisplayProducts</servlet-name>
            <url-pattern>/product</url-pattern>
        </servlet-mapping>Product.java
    package ecom;
         import java.text.NumberFormat;
         import java.io.Serializable;
         public class Product implements Serializable
              private int code;
              private String style;
              private String description;
              private double price;
              private String color;
              private String size;
              private String thumb;
              private String full;
              public Product()
                   code = 0;
                   style = "";
                   description = "";
                   price = 0;
                   color = "";
                   size = "";
                   thumb = "";
                   full = "";
              public void setCode(int code)
                   this.code = code;
              public int getCode()
                   return code;
              public String getStyle() {
                   return style;
              public void setStyle(String style) {
                   this.style = style;
              public void setDescription(String description)
                   this.description = description;
              public String getDescription()
                   return description;
              public void setPrice(double price)
                   this.price = price;
              public double getPrice()
                   return price;
              public String getColor() {
                   return color;
              public void setColor(String color) {
                   this.color = color;
              public String getSize() {
                   return size;
              public void setSize(String size) {
                   this.size = size;
              public String getThumb() {
                   String imageURL = "/images/" + thumb;
                   return imageURL;
              public void setThumb(String thumb) {
                   this.thumb = thumb;
              public String getFull() {
                   String imageURL = "/images/" + full;
                   return imageURL;
              public void setFull(String full) {
                   this.full = full;
              public String getPriceCurrencyFormat()
                   NumberFormat currency = NumberFormat.getCurrencyInstance();
                   return currency.format(price);
         }ProductDB.java
    package data;
    import java.sql.*;
    import java.util.*;
    import ecom.Product;
    public class ProductDB {
        //This method returns null if a product isn't found.
        public static Product selectProduct(int productID)
            ConnectionPool pool = ConnectionPool.getInstance();
            Connection connection = pool.getConnection();
            PreparedStatement ps = null;
            ResultSet rs = null;
            String query = "SELECT A.PROD_SKU_ID, B.STYLE, B.DESCRIPTION, B.PRICE, A.COLOR, A.SIZE, C.THUMB_IMAGE, C.FULL_IMAGE "+
            "FROM TB_PRODUCT_SKU A "+
            "JOIN TB_PRODUCT B ON(A.PRODUCT_ID = B.PRODUCT_ID) "+
            "JOIN TB_WEB_IMAGE C ON(C.WEB_IMAGE_ID = B.WEB_IMAGE_ID) "+
            "WHERE A.PROD_SKU_ID = ? AND A.QUANTITY > 0";
            try
                ps = connection.prepareStatement(query);
                ps.setInt(1, productID);
                rs = ps.executeQuery();
                if (rs.next())
                    Product p = new Product();
                     p.setCode(rs.getInt("PROD_SKU_ID"));
                       p.setStyle(rs.getString("STYLE"));
                       p.setDescription(rs.getString("DESCRIPTION"));
                       p.setPrice(rs.getDouble("PRICE"));
                       p.setColor(rs.getString("COLOR"));
                       p.setSize(rs.getString("SIZE"));
                       p.setThumb(rs.getString("THUMB_IMAGE"));
                       p.setFull(rs.getString("FULL_IMAGE"));
                    return p;
                else
                    return null;
            catch(SQLException e)
                e.printStackTrace();
                return null;
            finally
                 UtilDB.closeResultSet(rs);
                 UtilDB.closePreparedStatement(ps);
                pool.freeConnection(connection);
        //This method returns null if a product isn't found.
        public static ArrayList<Product> selectProducts(String cat_id)
             ConnectionPool pool = ConnectionPool.getInstance();
             Connection connection = pool.getConnection();
             PreparedStatement ps = null;
             ResultSet rs = null;
             String query = "SELECT A.PROD_SKU_ID, B.STYLE, B.DESCRIPTION, B.PRICE, A.COLOR, A.SIZE, C.THUMB_IMAGE, C.FULL_IMAGE "+
                            "FROM TB_PRODUCT_SKU A "+
                            "JOIN TB_PRODUCT B ON(A.PRODUCT_ID = B.PRODUCT_ID) "+
                            "JOIN TB_WEB_IMAGE C ON(C.WEB_IMAGE_ID = B.WEB_IMAGE_ID) "+
                            "WHERE CATEGORY_ID = " +cat_id+ "AND A.QUANTITY > 0";
             try
                  ps = connection.prepareStatement(query);
                  rs = ps.executeQuery();
                  ArrayList<Product> products = new ArrayList<Product>();
                  while (rs.next())
                       Product p = new Product();
                       p.setCode(rs.getInt("PROD_SKU_ID"));
                       p.setStyle(rs.getString("STYLE"));
                       p.setDescription(rs.getString("DESCRIPTION"));
                       p.setPrice(rs.getDouble("PRICE"));
                       p.setColor(rs.getString("COLOR"));
                       p.setSize(rs.getString("SIZE"));
                       p.setThumb(rs.getString("THUMB_IMAGE"));
                       p.setFull(rs.getString("FULL_IMAGE"));
                       products.add(p);
                  return products;
             catch(SQLException e)
                  e.printStackTrace();
                  return null;
             finally
                  UtilDB.closeResultSet(rs);
                  UtilDB.closePreparedStatement(ps);
                  pool.freeConnection(connection);
        public static ArrayList<Product> selectProducts()
             ConnectionPool pool = ConnectionPool.getInstance();
             Connection connection = pool.getConnection();
             PreparedStatement ps = null;
             ResultSet rs = null;
             String query = "SELECT A.PROD_SKU_ID, B.STYLE, B.DESCRIPTION, B.PRICE, A.COLOR, A.SIZE, C.THUMB_IMAGE, C.FULL_IMAGE "+
                            "FROM TB_PRODUCT_SKU A "+
                            "JOIN TB_PRODUCT B ON(A.PRODUCT_ID = B.PRODUCT_ID) "+
                            "JOIN TB_WEB_IMAGE C ON(C.WEB_IMAGE_ID = B.WEB_IMAGE_ID) "+
                            "WHERE A.QUANTITY > 0";
             try
                  ps = connection.prepareStatement(query);
                  rs = ps.executeQuery();
                  ArrayList<Product> products = new ArrayList<Product>();
                  while (rs.next())
                       Product p = new Product();
                       p.setCode(rs.getInt("PROD_SKU_ID"));
                       p.setStyle(rs.getString("STYLE"));
                       p.setDescription(rs.getString("DESCRIPTION"));
                       p.setPrice(rs.getDouble("PRICE"));
                       p.setColor(rs.getString("COLOR"));
                       p.setSize(rs.getString("SIZE"));
                       p.setThumb(rs.getString("THUMB_IMAGE"));
                       p.setFull(rs.getString("FULL_IMAGE"));
                       products.add(p);
                  return products;
             catch(SQLException e)
                  e.printStackTrace();
                  return null;
             finally
                  UtilDB.closeResultSet(rs);
                  UtilDB.closePreparedStatement(ps);
                  pool.freeConnection(connection);
    }Display products.java
    package category;
    import java.io.IOException;
    import java.sql.Connection;
    import java.util.List;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import data.ConnectionPool;
    import data.ProductDB;
    import ecom.Product;
    public class DisplayProducts extends HttpServlet{
         protected void doGet(HttpServletRequest request,
                   HttpServletResponse response)
                 throws ServletException, IOException
              List<Product> products = ProductDB.selectProducts();
              HttpSession session = request.getSession();
              session.setAttribute("products", products);
              String url = "/bracelets.jsp";
              RequestDispatcher dispatcher =
                   getServletContext().getRequestDispatcher(url);
              dispatcher.forward(request, response);
    }bracelets.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <table>
      <thead>
        <tr><th>ID</th><th>Product Name</th><th>Price<th></tr>
      </thead>
      <tbody>
        <c:forEach var="products" items="${products}">
          <!-- formatting probably required for price -->
          <tr>
          <td>${product.code}</td>
          <td>${product.style}</td>
          <td>${product.description}</td>
          <td>${product.price}</td>
          <td>${product.color}</td>
          <td>${product.size}</td>
          <td>${product.thumb}</td>
          <td>${product.full}</td>
          </tr>
        </c:forEach>
      </tbody>
    </table>
    </body>
    </html>index.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <p><a href="product">Bracelets</a></p>
    </body>
    </html>Edited by: jonnyd9191 on Jul 14, 2008 1:49 PM

  • Dynamic Page Layout - Opportunity Product Revenue

    Hi gurus,
    I am trying to setup a dynamic template for "Opportunity Product Revenues"
    I set it up successfully in the object. However, this data is exposed only as a related list of Opportunity and not directly. Now, when I go into the "Opportunity" customization, it only allows me to set up static page layouts, with no option to setup the Dynamic page layouts through the Related list.
    Please help..

    Hi Jonathan,
    Many thanks for your response.
    Our CTE is already on R19. We want to experiment and be ready when our PROD is upgraded to R19.
    Can you help me with the requirement, if you have an idea please? I would really appreciate the help.
    Thanks

  • In a dynamic page how to share variable between PL/SQL and javascript

    For example, my dynamic page contains such PL/SQL codes:
    <ORACLE>
    DECLARE
    info varchar(100);
    rowid urowid;
    procedure doDelete(
    row_id in urowid
    ) IS
    begin
    Delete From xxx
    WHERE rowid = row_id;
    end doDelete;
    BEGIN
    Select name, rowid INTO info, rowid
    From xxx Where xxx;
    HTP.PRN(' <INPUT TYPE="button" VALUE="show value" onClick="alert(info);">');
    HTP.PRN(' <INPUT TYPE="button" VALUE="delete" onClick="doDelete(_row_id);">');
    END;
    </ORACLE>
    The variable 'info' and '_row_id' are correct, however the two HTP. sentence do not work. What's the problem?
    What I want to do is to show all the records in TABLE A in a page. And at the end of each line (record), there' re a 'delete' and a 'update' button to let user operate on this record. Is this possible? I know form can do delete an update, but it can not show all the records in a page like what report does. Besides dynamic page, is there any other better choice? Report can do it?
    One more question. In a report, I employed link on one field to a second report. It works well. But I want to open the second report in a new window when the link is click. Is this possible?
    I was almost driven crazy by these :( I so appreciate if anyone can help.

    The code written by you is insufficient for the funtionality you are trying to achieve. Below is a method to achieve the same.
    Note: Used standard scott.emp table for the example which is located in my db provider schema.
    Do the below modifications as per your local configuration
    xxxxx -> Replace it with your Portal schema
    yyyyy -> Replace it with your db provider schema
    <<module_id_of_form>> -> Replace with the module id of form created in step 1 & 2.
    First and foremost... oracle does not allows variables starting with '_'. So if you want to use it you have to place it in double quotes ("")
    rowid -> illegal
    "_row_id" -> legal.
    However, I will advice you not to use variable names starting with "_".
    Now lets get started...
    1. Create a form on the table you are using in the dynamic page. Just have the update button. Remove the other buttons.
    2. Get the module id of this form. Instruction for getting the module id:
    a) Right-click on the form's run link and copy the shortcut
    b) Get the value of p_moduleid parameter. This is your module id.
    3. Create a procedure "save_action_details" in your db provider schema. This procedure will accomplish the delete operation on the record.
         CREATE OR REPLACE Procedure save_action_details(
         p_rowid IN VARCHAR2,
         p_action IN VARCHAR2,
         p_dyn_ref_path IN VARCHAR2,
         p_dyn_page_url IN VARCHAR2)
         is
         l_sto_session xxxxx.wwsto_api_session;
         begin
         l_sto_session := xxxxx.wwsto_api_session.load_session(
         p_domain => 'DynStore',
         p_sub_domain => 'DynStore_' || p_dyn_ref_path
         l_sto_session.set_attribute(
         p_name => 'rowid',
         p_value => p_rowid
         l_sto_session.set_attribute(
         p_name => 'action',
         p_value => p_action
         l_sto_session.save_session;
         htp.init;
         owa_util.redirect_url(p_dyn_page_url);
         end save_action_details;
    Explaination: The above procedure creates a session and keeps the rowid and action in the session. This information is used by the below dynamic form to perform the necessary action. In our exampl, the action is always going to be delete so you may go ahead and hard code it, else leave it as it is.
    4. Grant execute privilege on the procedure "save_action_details" to public.
    sql> grant execute on save_action_details to public;
    5. Create your Dynamic page.
    a) In HTML code section have the below code. This code shows some columns from the table and "update" and "delete" buttons to perform the respective action.
         <ORACLE>select empno,ename,rowid,
         '<input type="button" value="Update" onClick="doAction(this.form,''UPD'',''xxx'','''
         || xxxxx.wwv_standard_util.url_encode(rowid) || '''); tWin();">
         <input type="button" value="delete" onclick="doAction(this.form,''DEL'',''' || rowid || ''',''xxx'');">' Action
         from yyyyy.emp</ORACLE>
    b) In additional pl/sql code section of dynamic page, have the below pl/sql block "in after displaying the header" section.
         declare
         l_sto_session xxxxx.wwsto_api_session;
         l_del_rowid varchar2(20);
         l_action varchar2(10);
         begin
         htp.comment('User code starts here ...');
         htp.p('<script>');
         htp.p('var winHandle;');
         htp.p('
         function doAction(formObj, action, rowid, erowid)
              if (action == "UPD")
              var formURL = "' || xxxxx.wwctx_api.get_proc_path('wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=<<module_id_of_form>>&p_arg_names=_rowid&p_arg_values=') || '" + erowid;
              winHandle = window.open(formURL, "winDynUpd", "width=750,height=500,resizable=yes");
              else
              formObj.p_rowid.value = rowid;
              formObj.p_action.value = action;
              formObj.submit();
         function tWin() {
              if (winHandle.closed) {
              document.location = document.location;
              else {
              setTimeout("tWin()", 500);
         htp.p('</script>');
         htp.p('<form name="dynRowProcess" method="POST" action="'
         || xxxxx.wwctx_api.get_proc_path('save_action_details','yyyyy')
         || '">');
         htp.p('<input type="hidden" name="p_rowid">');
         htp.p('<input type="hidden" name="p_action">');
         htp.p('<input type="hidden" name="p_dyn_ref_path" value="' || p_reference_path || '">');
         htp.p('<input type="hidden" name="p_dyn_page_url" value="' || p_page_url || '">');
         l_sto_session := xxxxx.wwsto_api_session.load_session(
         p_domain => 'DynStore',
         p_sub_domain => 'DynStore_' || p_reference_path
         l_del_rowid := l_sto_session.get_attribute_as_varchar2('rowid');
         l_action := l_sto_session.get_attribute_as_varchar2('action');
         if l_action = 'DEL' then
         delete from yyyyy.emp
         where rowid = l_del_rowid;
         end if;
         end;
    Explaination: The session information (rowid and action) stored by "save_action_details" procedure is retrieved by the dynamic page and is used to delete the record.
    6. Once you are through with the above steps, test it by placing the above "dynamic page" portlet on a page.
    a) When you click on delete button the record gets deleted and the automatically refreshed page will not show the deleted record.
    b) On clicking update button, a form will appear. do the necessary modifications in data and click update. the data in the form gets updated. Once you close the form the dynamic page gets refreshed automatically and it will show you the updated information.

  • Add Right Side Column and Web Parts to custom Master page in SharePoint Online

    Hello everyone, 
    I hope this is a simple question, however I was fighting the issue it presents for a while. I am in the process of customizing SharePoint Online Look-and-feel with a new layout.
    The site collection was created as a
    Team Site before I got involved with the project, and populated with numerous sub-sites and pages. I activated required
    publishing features, created html with corresponding styles and graphics, and used the Design Manager to convert the html file to the custom Master page. While SharePoint automatically assigned “ContentPlaceHolderMain” div area, I
    also used default Oslo page as example to copy sections of the code for dynamic components (left column and navigation, recent items, the ribbon, etc.) from it and placed them in my new master page, pointed all CSS references to
    my custom style sheets, etc. Everything works great, however I need to make one last addition -
    my task is to make changes to display web parts such as Calendar and Recent Documents in the right column in the Master page.
    My custom layout has a header, footer, main pan and two side columns. Most of the default master templates come with the LEFT column already embedded and populated with several placeholder
    to serve dynamic content (PlaceHolderLeftNavBarTop, PlaceHolderQuickLaunchTop, PlaceHolderLeftNavBarDataSource, PlaceHolderLeftActions, so on).
    My challenge is that I have the RIGHT side column as well, for which I don’t think the default placeholder exists. I need to add a small Calendar box and Recent Documents parts to it, so they
    display across the entire site governed by this master page.
    The issue is –
    even after activating Publishing features (enabled SharePoint Server Publishing Infrastructure under Site Collection Level, and SharePoint Server Publishing under the Site
    Level), there is no Snippet feature (usually available under the generic Publishing Site); this customization of the Team Site allows using Designer and apply custom templates, themes, so on, just like you would under the Publishing collection, but not the
    Snippet utility I could use as the solution to embed the web parts on the master page.
    Recreating the entire site under Publishing Collection is not an option due to the directions I was given, I am to use this existing one, and need to see if
    there is a workaround to either activate the Snippet feature or use another solution to display the web parts inside of the column in the Master page.
    If the only solution is to use Web Part Zone, what are the steps to add it AND populate it with the abovementioned apps?
    Can anyone suggest how to create a workaround and add this feature? The environment is role-based so both elements need to be dynamically rendered based on the user’s role and activities.
    I am more of a front end designer than developer, so if any custom coding and set up required, please kindly provide some basic steps, if possible?..
    I greatly appreciate any help and suggestions!
    Thank You!
    Jeff
    Jeff V.

    Updating your Master Page to also include a right rail should be sraight forward enough with a new div or divs in your master page and then the proper styles to make room for this column as well as position the column.
    I have not seen why you cannot find the snippet gallery link when previewing a HTML Master Page in the browser. Have you tried loading the snippet gallery by its url? As an example, for my tenant on SPO, I can load the Snippet Gallery for the olso.master
    with the following url:
    https://pixelmill.sharepoint.com/_layouts/15/ComponentConfigureControls.aspx?ComponentName=TopNavigationNoFlyoutWithStartNode&Url=%2F_catalogs%2Fmasterpage%2Foslo.master
    Change the domain to match yours as well as update the "Url" querystring var to point to your master page. See if that loads the snippet gallery.
    Eric Overfield - PixelMill -
    ericoverfield.com -
    @EricOverfield

  • HTML POST method in a dynamic page

    Greetings Portalists,
    I have a basic question here. I need to pass the values of an html form (constructed within a dynamic page) to a procedure to process the users' inputs. The form is highly dynamic in terms of numbers of parameters, but we're talking about upwards of 200 text fields that require passing. Now, I realise that this in itself isn't a problem, and I've set this up without too much difficulty using method="POST" - but the called procedure in the form's action=... attribute seems to need to be publicly-executable for this scenario to work. For a production environment, I don't want to keep the PUBLIC grant on the procedure, but whenever I revoke it, the Portal throws me back a 404 Not Found when I submit the form.
    So my question is this -- how can I tighten the security around executing the procedure? Are there any best practices for this sort of situation (which I can't imagine are all that rare)?
    I've searched through many various web toolkit and Portal documents looking for an answer to this but to no avail, so any suggestions really would be highly appreciated.
    Many thanks.
    *.s.*

    Granting execute to public make a procedure accessible to portal_public (the schema) which contains the mappings to all the authenticated light-weight users. You can keep the public or portal_public grant for execution on the procedure and yet have a good control on who would be able to see your form. That would be based on your pl/sql logic.
    For instance, if you wish to keep it for only authenticated users (users who are in registered with your portal) or with any certain group of users, you can always apply a block containing code for checking their group memberships. If a user belongs to your desired group, you can let the desired logic expose to them, otherwise not.
    Please check the portal pl/sql api's that come with portal version you are using, for help.
    AMN

  • Dynamic Page that uses javascript to run an executable on the client's pc

    I have an .exe file on a shared network that has to be called and executed from portal. The below code works as standalone but not from a dynamic page or an HTML portlet. Any ideas?
    <html>
    <script language="javascript" type="text/javascript">
    function runApp()
    var shell = new ActiveXObject("WScript.shell");
    shell.run('"c:/CstatsWeeklyreport.exe"',1,true);
    </script>
    <body>
    <input type="button" name="button1" value="Run Notepad" onClick="runApp()" >
    </INPUT>
    </body>
    </html>

    Thanks D, but that's not what I'm looking for. That changes which application a file opens with when you download it. That's not what I need for this situation. Here's a little more detail.
    The clients will have an application on their hard drive; it can be any application, even a custom application that they developed themselves. Then, they open a web page with a listbox full of items. Depending on which item they select, a query will return a file path to the .exe file itself. The .exe file resides on the client's hard drive, not on the server. So they're not downloading anything. Depending on the filepath returned by the query, the browser needs to start the process and open the .exe file for them.
    So let's say I have developed a simple text editor called Tedit. I have a file on my hard drive - "C:\TextEditor\bin\debug\TEdit.exe". When they click the open button, that file path is returned from the database. Then the javascript is called to start the process and open that program.
    Again, nothing is getting downloaded, the application resides on the user's hard drive and there is no file to associate it with.
    This can be done in IE using an ActiveX control. And it used to be possible in Firefox using the nsIFile or nsIProcess objects. But since FF15 that's not available anymore, so the javascript throws an error telling them that their permission is denied.
    What I need, is a javascript that will launch the .exe file from the user's hard drive without downloading anything.

  • Dynamic Page that calls DB procedure to update data gets PLS222 or PLS306

    This seems a bit odd to me: I'm getting either "procedure no in scope" (when I call a procedure with the right args) or "wrong # or type of arguments" (when I call it with the wrong ones, so it is checking the procedure) in a dynamic page.<P>
    I'm trying to build a dynamic page that will display data and checkboxes (basically to get around the multi-select limitations -- management has told me that the "fake" md form is not acceptable)<P>
    So I build the page, it displays the data just fine exactly as we want it to:<P>
    <HTML><FORM><ORACLE>declare
    p_mdoc_user portal.wwv_utl_api_types.vc_arr;
    p_mdoc_user_seq portal.wwv_utl_api_types.vc_arr;
    p_seg_id portal.wwv_utl_api_types.vc_arr;
    p_cb portal.wwv_utl_api_types.vc_arr;
    p_action varchar2(20):='Save Changes';
    begin
    htp.p('Select your segments');
    htp.p('< p>');
    htp.p('<table border=2 cellpadding=2 cellspacing=0>');
    htp.tablerowopen;
    htp.tableheader('Seg#');
    htp.tableheader('Included');
    htp.tablerowclose;
    for r1 in (select seg_id, build_seg
    from web.mdoc_create_seg
    where mdoc_user = :mdoc_user
    and mdoc_user_seq = :mdoc_user_seq)
    loop
    htp.p('<input_type="hidden" name="p_mdoc_user" value='||:mdoc_user||'>');
    htp.p('<input_type="hidden" name="p_mdoc_user_seq" value='||:mdoc_user_seq||'>');
    htp.p('<input_type="hidden" name="p_seg_id" value='||to_char(r1.seg_id)||'>');
    htp.p('<tr><td>');
    htp.p(r1.seg_id);
    htp.p('</td><td>');
    if r1.build_seg='TRUE' then
    htp.p('<input type="checkbox" name="p_cb" value="Y" checked>');
    else
    htp.p('<input type="checkbox" name="p_cb" value="Y">');
    end if;
    htp.p('</td></tr>');
    end loop;
    htp.p('</table>');
    htp.p('< p>');
    /*note, this is where I'm putting in a procedure call to update*/
    end;
    </ORACLE></FORM></HTML><P>
    so then I try to add the procedure call (where the sql*plus comment is above)<P>
    htp.p('<input type="button" value="Save Changes" onclick='||
    mdoc_seg_create_choice_p(
    p_mdoc_user,
    p_mdoc_user_seq,
    p_seg_id,
    p_cb)
    ||'>');<P>
    When I try to run as portlet, I get pls 222 not in scope. <but>
    When I take a value out (say remove the last ",p_cb") - I get pls 306 wrong number or type of args to call.<P>
    I've granted the procedure and its underlying tables to portal/public/and portal_public, even though I'm building the dynamic page under a DB provider that is the same as the schema I wrote the procedure in.<P>
    I've tried specifying the schema, using a public synonym, and putting it in a package: same thing occurs, either I get pls 00222 not in scope when I call it with the right columns, or if I purposefully leave one out I get PLS 00306 wrong # or type of args.<P>
    Any ideas?
    -Mike

    Hi guys
    Check out the last 2 posts in this thread for ideas on how to implement 1.
    Report on user data from LDAP
    Varad

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

Maybe you are looking for

  • SAP GUI 7.10 - Issue reading files from Solution Manager

    Hi everyone, We have just installed SAP GUI 7.10 on our PC and have tried to open documents from Solution Manager. On both Display and Change mode we are getting "The document cannot be displayed" (SOLAR_DOC021) Can you suggest anything regarding the

  • Need advice on Panasonic AG-HMC150 camera format specs

    We're looking to upgrade to an HD camera and I was wondering if the Panasonic AG-HMC150 would meet the quality format our client is requesting.  I know its highest bitrate is 21 Mbps, so I'm thinking that it can't, but I wanted to check with the pros

  • Can't lock screen in KDE

    Hello guys, Please give me advice - how can i debug problem with screen locking in KDE? I don't find any similar problems in arch forums/mailing lists. This problem appeared after update. Standart Ctrl+Alt+L doesn't work, plasma applet (screen lock)

  • Importing multiple pdf's in infoview at a time.

    Hi , As you know through infoview we can import pdf, word or excel file which are in our local system through infoview. Steps: In infoview --> New -->document from local computer --> pdf We browse and select them into infoview. Is there any possibili

  • PHP to MSSQL

    With Microsoft IIS7 supporting PHP. Will Adobe be looking to support PHP to MSSQL connection and application building via Dreamwaever and ADDT, as currently you can only make a PHP - MYSQL Connection and build the application that way. What would be