Dynamic HTML includes

Hello everyone,
          I have what should be a fairly simple problem, but I can't seem to find
          a simple solution. I have a JSP page which is supposed to include an HTML
          page. The problem is that the address of the HTML page is dynamic (it is
          stored in a database). I would like to to something like the following :
          <%
          String productHTMLPage = myProduct.getHTMLDescription();
          %>
          <%@ include page=<%=productHTMLPage%>%>
          Any ideas on how to get it to work ?
          John Ferguson Smart
          Project Manager
          AACom
          [John Ferguson Smart.vcf]
          

Albert could you post the error stack. If the stack repeats itself then what is the
          content of test2.jsp is it calling test.jsp or test2.jsp coz it looks like a cyclic
          reference if it repeats.
          Thanks
          Albert Chan wrote:
          > I come across a similar problem. when I try
          >
          > test.jsp:
          > <% String p="test2.html"; %>
          > <jsp:include page="<%= p %>" />
          >
          > it will works, however if I change to <% String p="test2.jsp"; %>
          > the server will just hang. and got a long error message on the server which is
          > going on and on and the stack trace just repeat itself. and I am using weblogic
          > 4.5.1 w/ SP4.
          >
          > Vishwanath Salelkar wrote:
          >
          > > John can you try out this
          > >
          > > <jsp:include page="<%= productPage %>"/>
          > >
          > > This should work just let us know if it doesn't so we can try out something
          > > else.
          > >
          > > Salelkar
          > >
          > > John Ferguson Smart wrote:
          > >
          > > > I've tried the following code in my JSP page (productPage =
          > > > "/produits/grandbleu/grandbleu.html", the HTML description page read from
          > > > the database) :
          > > >
          > > > 1) <%=response.encodeRedirectURL(productPage) %>
          > > > <p>
          > > > 2) <%@ include file="<%=response.encodeRedirectURL(productPage)%>"%>
          > > > <p>
          > > > 3) <%@ include file=<%=productPage%>%>
          > > > <p>
          > > > 4) <%@ include file="/produits/grandbleu/grandbleu.html"%>
          > > >
          > > > I get the following HTML result :
          > > >
          > > > 1) /produits/grandbleu/grandbleu.html
          > > >
          > > > 2)
          > > >
          > > > 3) <%@ include file=/produits/grandbleu/grandbleu.html%>
          > > >
          > > > 4) (the correct HTML page)
          > > >
          > > > As you can see, I can get it to work with static includes, but dynamic
          > > > includes don't seem to work at all !
          > > > Any other ideas ?
          > > > --
          > > > John Ferguson Smart
          > > > Project Manager
          > > > AACom
          

Similar Messages

  • Display Dynamic HTML beside Flash Chart in Chart Region

    Hello,
    I have a vertical 3D flash chart with some categories I,II,IV... on x-axix. I have to show a legend beside the chart dynamically depending on the categories displayed like (I - PC, II - TV, IV-Laptop....) First I tried to do this with static data. I modified, Region Source of Chart region to include the legend. I am successful to create a table & put some static html code. Now I want this to be dynamic.
    I found that with shotcuts I can put dynamic HTML code. I created shortcut with PL/SQL & successfully displayed them in a 'HTML REGION WITH SHORTCUTS', but I want that in Chart Region, not as a separate region. Shortcut is not working in Chart region.
    How can I achieve this? Is there a way to call a process or substitution string or some thing from Chart Region to display my legend dynamically beside the chart.
    Experts any hint is appreciated.
    Sowji.

    Experts,
    Can you please give any hint how this can be achieved? If I keep the dynamic legend as HTML with Shortcut region, the width & height are not matching with the chart region as it is dynamic. Also, I am unable to combine both 'chart' & 'html with shortcut' region to look like one region. So I am looking for options to insert the dynamic html in to chart region.
    Sowji.

  • Dynamic html

    Can someone confirm for me whether Portal supports dynamic html (i.e., mousing over a link provides a drop-down menu, etc.)?

    Melissa,
    Oracle9iAS Portal supports any html that can live inside a table cell which includes dynamic html.
    Rich

  • Spry in dynamic HTML

    Hi,
    i want to use the Spry Framework with dynamic loaded HTML.
    To do so i load HTML in an div-Element and afterwards i call
    'Spry.Data.initRegions(obj);', where obj is the object of the div
    with the dynamic content.
    I have set: 'Spry.Data.Region.debug = true;' and this shows
    me, that the dynamic HTML is parsed in the right way, but i is not
    written in the div-Element. I don't know why.
    My test setup is based on the 'Hijax Demo - Notes 1' from
    articles/data_set_overview/index.html.
    At first the XML:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <notes>
    <note id='a1'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    1.</p>]]></note>
    <note id='b2'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    2.</p>]]></note>
    <note id='c3'><![CDATA[<p>This is some
    <b>dynamic content</b> for note
    3.</p>]]></note>
    </notes>
    Here i have added the id-attribute.
    Now the HTML / Spry:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Hijax Demo - Notes 1</title>
    <script language="JavaScript" type="text/javascript"
    src="../includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript">
    var dsNotes = new Spry.Data.XMLDataSet('notes.xml',
    "/notes/note");
    var dsNotes1 = new Spry.Data.XMLDataSet('notes.xml',
    "/notes/note");
    Spry.Data.Region.debug = true;
    function writeSpry(){
    var obj=$('dynamicSpry');
    obj.innerHTML='<div id="innerSpry"
    spry:region="dsNotes1"><p spry:repeat="dsNotes1">This is
    some <b>dynamic content with
    Spry</b>{dsNotes1::@id}</p></div>';
    Spry.Data.initRegions(obj);
    alert(obj.innerHTML);
    </script>
    </head>
    <body>
    <a href="#" onclick="dsNotes.setCurrentRowNumber(0);
    return false;">Note 1</a>
    <a href="#" onclick="dsNotes.setCurrentRowNumber(1);
    return false;">Note 2</a>
    <a href="#"
    onclick="dsNotes.setCurrentRowNumber(2);Spry.Data.initRegions();
    return false;">Note 3</a>
    <a href="#" onclick="writeSpry(); return
    false;">Dynamic HTML</a>
    <div id='dynamicSpry' spry:detailregion="dsNotes"
    spry:content="{note}">
    <p>This is some <b>static content</b> for
    note 1.</p>
    </div>
    </body>
    </html>
    The trace Box shows:
    Generated region markup for 'innerSpry':
    <p>This is some <b>dynamic content with
    Spry</b>a1</p><p>This is some <b>dynamic
    content with Spry</b>b2</p><p>This is some
    <b>dynamic content with Spry</b>c3</p>
    Everthings semms to be ok.
    But the display won't change and the alert box says, the
    content has not changed.
    I don't know how to say, that Spry should display the right
    content.
    Sincerly
    Harald

    The reason it doesn't work is a bit complicated, but it goes
    something like this:
    Spry maintains a list of the regions on the page after the
    onload event fires. When you go and call initRegions from your
    "Dynamic HTML" link, it finds your region that you injected
    programatically and adds that to the end of the regions list ...
    but, one of the things that initRegions does after it finds and
    creates regions, is it tells all of the regions in the regions list
    to update themselves ... since you basically have set up a region
    in a region (nested) ... the outer region recalculates its internal
    content ... blowing away your nested region container ... since
    spry is holding a pointer to your inner-nested region container
    node, it does insert your new content, it's just that your node
    isn't in the document anymore.
    That all said, if all you are trying to do is replace the
    template code used in the region, you can do it this way:
    function writeSpry(){
    var obj=$('dynamicSpry');
    // Break any ties between the data set and the current region
    object:
    dsNotes.removeObserver(Spry.Data.getRegion('dynamicSpry'));
    obj.innerHTML='<p spry:repeat="dsNotes1">This is some
    <b>dynamic content with
    Spry</b>{dsNotes1::@id}</p>';
    // Add a region attribute so the initRegions call can find
    it.
    obj.setAttribute("spry:detailregion", "dsNotes1");
    Spry.Data.initRegions(obj);
    alert(obj.innerHTML);
    I'm not going to guarantee that this will work between
    versions of Spry ... but allowing folks to change the template
    inside the region is definitely something on our list of things to
    do. There's also some refactoring work I need to do so that you can
    call some method that will allow you to turn a dom sub-tree into a
    region without triggering all of the regions on the page to update
    themselves.

  • SunOne Websever 5 sp 5 dynamic jsp:include

    Hi,
    I'm just trying to migrate from another webserver to SunOne.
    I have a number of pages that rely on dynamic JSP includes.
    IE
    <jsp:include page="<%= someString %>" flush="true">
    All pages which use this fail to compile and I get a server error (no errors show up in the logs).
    While using a static value (the same value) works fine.
    <jsp:include page="somevalue" flush="true">
    Has anyone has this problem ? has this functionality been discontinued ?
    regs
    Michael

    Hi,
    That page refers to the JSP Spec. version 1.1 which is used in WebServer 6.0.
    It is documented in the Release Notes for WebServer 6.0 that jsp:include throws an exception when used with the POST method. Is this what you are experiencing?
    http://docs.sun.com/source/816-5695-10/rn60sp2.html
    Problem 556917. JSP: <jsp:inlcude page="*.html" flush="true" /> Throws Exception If Using With POST Method.
    Which version of webserver are you using?? Your subject line refers to "Websever 5 sp 5" but do you mean Webserver 6.0sp5 or WebServer 6.1sp5??
    WebServer 6.1sp5 uses JSP Spec. version 1.2, so the page that you were referring to is not relevant if you are using this version of WebServer.
    Please note that JSP Specs can be downloaded from:
    http://java.sun.com/products/jsp/reference/api/index.html
    Let us know exactly which version of WebServer you are using :)

  • Help! How to send Dynamic HTML table as an email?!

    hi
    i want to send a dynamic html table as an email
    i am using php/mysql and have a mysql database
    i have a dynaimc table contins some data from the database
    i have a form with textbox to write the email in and a submit button
    i want to send the the table (or the information in the table) when i submit the form
    is that possible???
    plz help!

    Ok, now I have you.  You create a queary to select the data you want, then use this code
    $data = mysqli_query($dbc, $query) or die(mysqli_error($dbc));
    while ($row = mysqli_fetch_array($data))    {
    //Sending Email to form owner
    $header = "From: [email protected]\n"
      . "Reply-To: $email\n";
    $subject = "Data From DB into email";
    $email_to = "[email protected]";
    $message =
    $row['first_name'].
       $row['last_name']
    mail($email_to, $subject ,$message ,$header ) ;
    So for each column, you will enter this
    $row['first_name'].
    So if the column is state, you would put
    $row['state'].
    Hopefully this is the answer you were looking for.
    Gary

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • Dynamic HTML generation from a Dynamic PDF/XDP

    I was wondering if LiveCycle is able to generate a dynamic HTML page from a dynamic XDP/PDF form in LiveCycle ES ?
    I have read up on the help contents regarding HTML generation from PDF forms but its not mentioned anywhere whether LiveCycle supports the creation of an HTML page that mimics the dynamic behavior of a dynamic PDF/XDP form.
    Thanks in advance

    Yes it does ....
    Paul

  • Dynamic HTML effects in IE11

    Hi,
    For the past few years I have used a website with simple dynamic HTML effects in it to teach people how to double click a mouse. I had a series of images that disappeared off the page when they double clicked on them, I had added the DHTML effects using
    Front Page 2003, up until IE11 I could still make the effects work by setting the browser to support compatibility mode but now I can't see how I can activate this content. Is it possible to make the double click effect work by simply altering the JavaScript
    on the page?
    Thank you in anticipation of your help.
    Bernard Jordan

    You are post a wrong forum.

  • Maximum Size of Dynamic HTML

    Hi,
    I have used the below mentioned code to create a Dynamic HTML Page for plsql clob attribute ie
    PROCEDURE get_html_doc (
    p_transaction_id IN NUMBER,
    x_document IN OUT NOCOPY CLOB
    IS
    l_proc_name VARCHAR2 (150) := 'get_html_doc';
    l_page HTP.htbuf_arr;
    l_lines NUMBER DEFAULT 99999999;
    l_nm OWA.vc_arr;
    l_vl OWA.vc_arr;
    l_clob CLOB;
    BEGIN
    l_nm ( 1) := 'DUMMY_JUST_TO_SET_UP_OWA_UTIL';
    l_vl ( 1) := 'WHATEVER';
    xyz.display_detail
    (p_called_from => 'DOC_ATTR_VALUE',
    p_transaction_id => p_transaction_id
    OWA.init_cgi_env (l_nm.COUNT, l_nm, l_vl);
    OWA.get_page (l_page, l_lines);
    DBMS_LOB.createtemporary (x_document, TRUE, DBMS_LOB.SESSION);
    FOR i IN 1 .. l_lines
    LOOP
    IF (i = 1)
    THEN
    DBMS_LOB.WRITE (x_document,
    LENGTH (l_page (i)),
    1,
    l_page (i)
    ELSE
    DBMS_LOB.writeappend (x_document,
    LENGTH (l_page (i)),
    l_page (i)
    END IF;
    END LOOP;
    END get_html_doc;
    I am getting a ORA-06502: PL/SQL: numeric or value error.
    In view of the following ie
    a) htbuf_arr is table of varchar2(256)
    b) Total size of the page cannot exceed 32 K (Not sure)
    Is any one of the above responsible for the error.
    -> Scenario of LENGTH (l_page (i)) has exceeded 256.
    -> Scenario where the size of the document is greater than 32k.
    Regards

    I have answered your duplicate post on the WorkflowFAQ forum at http://smforum.workflowfaq.com/index.php?topic=1092.0
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com
    Edited by: WorkflowFAQ.com on Feb 24, 2010 1:10 PM

  • Dynamic HTML generation

    Hi All,
               I would like to know how dynamic HTML can be generated in WD,.? Is there any method that can be used?
    Thanks,
    Vasuki

    Hi Vasuki
    create a dynamic HTML string lv_html_string and upload to ICM Cache by constructing a dynamic URL.
    data: cached_response type ref to if_http_response.
    create object cached_response
      type
        cl_http_response
      exporting
        add_c_msg        = 1.
    try. " ignore, if compression can not be switched on
        call method cached_response->set_compression
          exporting
            options = cached_response->co_compress_based_on_mime_type
          exceptions
            others  = 1.
      catch cx_root.
    endtry.
    data: l_app_type type string.
    cached_response->set_cdata( lv_html_string ).
    l_app_type = 'text/html'  .
    cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                       value = l_app_type ).
    concatenate '/sap/public' '/' 'pagename.html' into lv_URL.
    cl_http_server=>server_cache_upload( url      = lv_url
                                         response = cached_response
                                         SCOPE = IHTTP_INV_global ).
    lv_url is the link to a html page, put all the html content in lv_html_string.
    Abhi

  • Dynamic html header

    How can I generate dynamic html header entries in a page?
    Thanks,
    Art

    See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=2808228]: a PL/SQL Function Body Shortcut would be the way to go in page HTML Headers.
    For even more flexibility and lower maintenance, consider the other technique mentioned there of placing one of the #REGION_POSITION_nn# placeholders inside the HTML &lt;head&gt; in the page template. A template-less PL/SQL Dynamic Content region can now be set at this display point to generate any header content by calling package code that uses htp. Put this region on page zero for a very generic solution...

  • Need help with dynamic html

    I am a Microsoft J++ developer, but am switching to Sun technologies. The first application that I need to work on is an application that does a great deal of dynamic HTML. I originally wrote this application under J++ but I need to convert it to Sun Java. The methodology J++ used for dynamic HTML (extending DhDocument) appears to be duplicated (somewhat) with Swing. I need a little push start here, I seem to have a mental block. My application must run in the client browser, so I believe an applet is the way to go, but I can't figure out how to manipulate HTML from an applet through Swing. Can someone point me to a simple Applet that, say for example, changes the value of a text box that is predefined in the HTML, I would greatly appreciate it. That should get me past this mental block so I can go on with the conversion. I have successfully added textboxes with Swing through my Applet, but I need to manipulate HTML elements that already exist. That's where I'm stuck.

    Here's the code I come up with. It doesn't work. I get a javascript exception on getWindow. I have never used the JSObject before. Can you give me any advice on what I am doing wrong?
    import javax.swing.*;
    import netscape.javascript.*;
    public class Search extends JApplet
    public void init()
         JSObject obj = JSObject.getWindow(this);
         JSObject doc = (JSObject) obj.getMember("document");
         String[] element = new String[1];
         element[0] = "UserID";
         JSObject form = (JSObject) doc.call("getElementById", element);
    }

  • Help with Dynamic HTML

    I find myself generating dynamic html within servlets like this:
    os.println("<TD ALIGN=RIGHT VALIGN=TOP><FONT SIZE=1>Website creation & design, by <A HREF=mailto:" + webmaster + ">Blah, blah, Inc.<BR>");
    os.println("</A>Contact the <A HREF=mailto:" + webmaster + ">webmaster</A><BR>");
    This is trememdous strain on my wrist and brain.
    Is there any other way to generate dynamic html easier than writing it by hand inside the servlet?
    Thanks,
    Chris.

    Hi
    Yes there's a much better way. Just try it with JSP Java Server Pages. It's similar to php or asp, but with jsp you can also use java code in it.
    Informations:
    -> http://java.sun.com/products/jsp
    -> http://java.sun.com/products/jsp/resources.html
    -> http://forum.java.sun.com/forum.jsp?forum=45
    Cyrill

  • How to create dynamic HTML page using PL/SQL code in APEX.

    hello,
    I am woking on one APEX application in which i want to create one dynamic HTML page on button press using PL/SQL code.
    Thanks

    It is possible to create HTML page with dynamic content. One way would be creating hidden field (e.g. P1_HTML on page 1) with dynamic HTML and on button click you redirect to page 2 and pass P1_HTML item value to item P2_HTML on page 2. On page you must have PL/SQL region. You can then render your dynamic HTML with code:
    htp.p(:P2_HTML);
    Don use APEX URL for passing HTML value. Problem and solution is described here: http://blog.trent-schafer.com/2011/04/03/dont-pass-string-parameters-in-the-url-in-apex-its-a-bad-idea/
    Edited by: MiroMas on 3.2.2012 3:20

Maybe you are looking for

  • Upgrade to SCM7.0 DP info objects (Characteristics) long/short text issue

    Hi All, We have upgraded from SCM4x to SCM7.0. The info objects characteristics customized long and short text is not updated in SCM 7.0. Example: Info object 9ALOCNO standard long/short text is APO location. But in SCM4x they have changed to Plant.

  • Wlst weblogic.nodemanager.NMException wls92

    Hi all, I have got a problem connecting to Nodemanager with wlst. The System is wls920 on windows2003Server. Connecting to adminserver works with wlst. Here's the call: nmConnect('addi', 'weblogic', 'localhost', '5555', 'testdomain', 'c:/win32app/bea

  • 'Convert Selection for iPod/iPhone' makes my movies silent. Why?

    When I choose the 'Convert Selection for iPod/iPhone' option so that I can put my movies on my iPod, all of the audio becomes silent. The picture is fine and only the music/words go away. Why? And, if there's a way, how can I fix it? (These movies ar

  • Retirement of 9i DBA OCA and OCP and associated exams and also 1z0-147

    This question hasnt been asked for a while, which I suppose means the numbers doing the followig exams must be diminishing: 1z0-007, 1z0-031, 1z0-032, 1z0-033, 1z0-147 I think there is now a fairly good case for these to be retired, assume that WDP c

  • My list of exceptions is being deleted

    Each time I put my computer to sleep or quit Firefox, my list of sites for which cookies are to be blocked or allowed (Exceptions) gets deleted. What do I need to do to to keep this list?