Include html content in jsp

Hi ,
I have the html data and need to include in the jsp .
eg :
String htmldata = " <html><body>testdata </body></html>";
how can i display this htmldata in the jsp . I mean I need this data in html format ( testdata ) and should not see all html tags in the explorer.
Suggest me if you know anything.
Thanks in advance.
- bregoty

You have the right idea, but you need to specify the escapeXml attribute on the c:out tag to be false. It defaults to true, and this means that when c:out encounters special characters it tries to display as-is rather, which is why you saw your HTML formatting. Set the escapeXml attribute to false and this should solve your problem.
<table width=100% cellspacing=0 cellpadding=5>
     <c:forEach items="${myBean}" var="myDB">
     <tr height=10px>
          <td>
               <c:out value="${myDB.htmldata}" escapeXml="false" />
          </td>
     </tr>
</table>

Similar Messages

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • Import external HTML contents to JSP

    Hi,
    Anybody knows if the WLW has a JSP tag that can be used to import external HTML
    contents to my current JSPs? Something similar to JSTL import.
    Thanks
    Qiu

    Qiu--
    WLW doesn't have one specifically.
    You can certainly use that tag from the Jakarta standard tags 1.0 implementation of JSTL -- this
    version does not require JSP 2.0 and can run on a 2.3 Servlet container.
    Hope that helps...
    Eddie
    Shiye Qiu wrote:
    Hi,
    Anybody knows if the WLW has a JSP tag that can be used to import external HTML
    contents to my current JSPs? Something similar to JSTL import.
    Thanks
    Qiu

  • Trying to dynamic include HTML into a JSP

    All,
    I am trying to include an HMTL file into a JSP file. I wish to do this dymanically. So, the following is not an option:
    <%@ include file="relativeURL" %>
    So, I am forced to resort to such measures as the following:
    <jsp:include page="<%=myPath%>"/>
    However, I get the following error:
    java.lang.IllegalStateException: Response has already been committed
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)....
    I tried it like this:
    <jsp:include page="<%=myPath%>" flush="true"/>
    I encoutered the same result. I have JSP 1.2 running Tomcat 3.1 with Apache 1.3.14, all on SunOS. Thanks in advance for any help.
    Nicholas

    One of the worst error messages you can get is the IllegalStateException. It simply means that an attempt has been made to forward or include but only a portion of the include was sent. In a situation like this the best way to handle the dynamic page content is to include it from a Servlet by sending the information you need through beans. Including the Servlet rather than the dynamic path would clear those errors right up. One thing to keep in consideration is that you can't just get the page and display it, you have to buffer it in so the state can be kept alive without timing out like it does with the dynamic include.
    Hope that helps. Been there, done that, I know how frustrating the error was.

  • Html fragments within JSP code

    Hi
    I'm not a developer, but need to create some JSP pages to sit within the site page structure.
    I was originally told i had to strip out the following tags....
    <html> <head> and <body>
    And just use the bare bones layout tags.
    But i have created a small piece of functionality that relies on calling a javascript function from within the <body> tag....
    Is it so bad to leave in this <body> tag in the page fragment?
    I'm not even sure if this is the standard way to create JSP pages but if anyone can offer any advice that would be great.

    There is no requirement to strip out the html or body tags, or any tags for that matter. In fact, JSP isn't specific to HTML content. JSPs can be used for XML, WML, or some proprietary client content markup.
    JSP pages are simply dynamically generated pages to define it quite unofficially and non-technically.
    Your topic seems to be one of web content development. This forum is dedicated to the Web Application Framework. I'm not sure what your challenges are, but you will likely find more successful guidance on a forum that is focused on web design or general JSP technology.
    But to answer your question, you can keep your html based tags in the JSP.
    craig

  • Writing Html Content into PDF using JSP

    Dear All,
    I am using JSP to generate Employee payslip dynamically. Presently i am diplaying payslip as on-screen display.
    Here i want to give option "Save as PDF". I am able to create PDF file using IText Libraries. i want to integrate HTML code into the PDF file.
    Writing HTML Content (using HTML Tags) into PDF.

    Well it is a difficult ask and i believe we are trying to re-invent the wheel
    Just to make my life simple i could have choosen either sample API given below to serve my cause
    1).[http://xmlgraphics.apache.org/fop/] (Apache FOP one can simply write an XSL template of their and then substitute the values from respective DTO's by using XSL - XML transformations and can generate content in different formats which includes PDF aswell)
    2).[http://jasperforge.org/plugins/project/project_home.php?group_id=102] (Just design a simple report template using iReport and create a jrxml files and write a small code snipett such that you can pass few details at the runtime and can export the report in different formats which includes PDF aswell)
    3).[http://www.object-refinery.com/jfreereport/] (Is much similar to what jasper offers in order to compile these you can either use pentaho product IDE or BEA/Oracle Actuate report tools)
    You can simply try searching for different examples for getting more help on using the respective API's
    Hope that helps :)
    REGARDS,
    RaHuL

  • Render xml and html content type in single jsp

    I have 2 jsps, one jsp(a.jsp) is throwing content-type as HTML and other JSP(b.jsp) is throwing content-type as xml. I am making use of xsl to render the xml content in html format. But the problem is that i want to include b.jsp in a.jsp, and when i do so b.jsp doesn't make use of xsl for its rendering rather it displays the contents haphazardly.
    Plese help if somebody knows the solution.

    Below the following line ..
    <html:form action="addContact">Add this new form field..
    <html:hidden name="flag" value="0"/>Needless to say that this String variable flag should be defined in your ActionForm.
    Next, instead of ...
    <html:submit property="parameter"><bean:message key="ok.company" /></html:submit>Put this ...
    <input type="button" name="xyz" onClick="callSubmit(1);" value='<bean:message key="ok.company" />'>Then add a JS function as below ...
    <script>
    function callSubmit(flg)
         document.forms[0].flag.value=flg;
         document.forms[0].submit();
    </script>Finally in your ActionServlet, you need to find the value of the ActionForm variable flag via request.getParameter("flag").
    In case the value is set to 1, then it means that you need to send the particular row to DB. You may add additional flag values to correctly identify theparticular row which you may want to send to DB.
    Hope you got it.
    -Rohit

  • JSP error page does not displayed on its own, includes in the original JSP

    Problem Description: - Exceptions in a Condition cause pages to fail to render.
    The actual issue is, the JSP error page does not displayed on its own, included in the original JSP Page when exception occurs.
    Problem Cause: As per the JSP specification when jsp content reached the buffer size (default 8KB) the page being flushed (Part of condent displays). The default �autoFlush� value is true.
    When the page buffer value is default size (8KB), and if any exception occurs after flushing the part of the content, instead of redirecting into error page, the error page content included in the original page.
    If i specify autoFlush="false" and with default buffer size, at the runtime if the buffer size is reached, i am getting stackoverflow error.
    To solve the above problem we can make it autoFlush=�false� and buffer=�100KB�. But we can�t predict the actual size of the page.
    I found in one of the weblogic forum as no solution for this issue. Ref.
    http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_clfydoc&answerpage=solution&page=wls/S-10309.htm
    Please provide me any solution to resolve the problem.

    Error-Page tags work best with an error.html pages. If you have an error.jsp page what I would do, and I have, is wrap my classes and jsp pages in a try catch block where you forward to the error jsp page and display anything you want. YOu can also do this with if else statements. I have used the tomcat error pages before but when I've implemented them I used java.lang.Exception as the error to catch not Throwable. I don't know if this would make a difference or have anything to do with your problem.

  • Include HTML file

    Hi
    I am using JBoss 3.2.2 application server and Apache web server.
    In my application I have to include static HTMLs outside from context root .
    for eg context root is e:\jboss\server\deploy\MyApplication.
    and static html path is "e:\test\"
    1) When I add <%@ include file="E:\test\test1.html" %> in my JSP file it gives me following exception even if test1.html exists in test folder.
    org.apache.jasper.JasperException: /jsp/website/testing.jsp(1,0) File "E:\test\test1.html" not found
    2) When I add <jsp:include page="e:\test\test1.html" />
    gives me same exception as in first case.
    Can any one please help me....
    Quick reply is appreciate....ITs urgent....
    thanks in advance
    ashish

    you can only specify relative paths to include or forward I'm afraid (so an URL like http://somesite.com/myinclude.jsp is also not going to work). You could simulate this behavior by opening the file yourself and dumping the content to the browser using the regular java File / FileReader classes.

  • Why this does not works??? (I use jsp: include. to contain two jsp files)

    I have a main.jsp, and in this main.jsp, I have two part, leftButton.jsp and view.jsp, I want to include the leftButton.jsp and view.jsp to main.jsp.
    The code of main.jsp is like follows:
    <%@ page language="java" contentType="text/html" %>
    <html>
    <head>
    <title>JSP include element test</title>
    </head>
    <body>
    <table>
    <tr>
    <td><jsp: include page="leftButton.jsp" flush="true"></jsp: include></td>
                             <td>     <jsp: include page="view.jsp" flush="true"></jsp: include></td>
                        </tr>
         </table>
    </body>
    </html>
    Why the include does not works? by the way, I embeded a flash.swf file in view.jsp.

    Hi Mellon,
    You might be better off using a JSPF segment for leftButton.jsp & view.jsp and the <%@ include file="relativeURL" %>.
    Be careful that the included file does not contain <html>, </html>, <body>, or </body> tags. Because the entire content of the included file is added to the including JSP page, these tags would conflict with the same tags in the including JSP page, causing an error.
    Note: It is conventional to put JSP segements under the WEB-INF/jspf/ folder so the file cannot be accessed directly by a URL
    Note: JSPF files end with .jspf, so your files would be leftButton.jspf and view.jspf.

  • How to Include html tag in xml

    Hi,
    Is there any way to include html tags in xml?
    For Example, I'm using xsl to get the value of FIELD_1 from fetch.xml
    In fetch.xml, I have the tag
    <FIELD_1>
    <font color='#8080ff'>&#160;<font face='Times New Roman, Times' size='28'>Testing font and color</font></font>
    </FIELD_1>
    But If I tried to read the value from xsl like <xsl:value-of select="FIELD_1"/> I'm just gettig the display 'Testing font and color' without the specified font and color....
    How to achieve this?
    Thanks
    Selva.

    Hi,
    Thanks for the input.
    I tried with the below code
    <fo:block space-after="5mm" font-family="Arial"><xsl:copy-of select="FIELD_1"/></fo:block>
    But I'm getting the below error...
    "An invalid XML character (Unicode: 0xa0) was found in the element content of the document."
    Below is the code included in the xsl....
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="Values"><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="3cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
    <fo:region-body/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simpleA4">
    <fo:flow flow-name="xsl-region-body">
    <fo:block space-after="5mm" font-family="Arial"><xsl:copy-of select="FIELD_1"/></fo:block>
    </fo:flow> </fo:page-sequence> </fo:root> </xsl:template></xsl:stylesheet>
    Is there any mistakes in the above code?
    Regards,
    Selva.

  • Spry accordion widget - SSI (server side include) as content in the panel

    After having inserted the following command <!--# include file = "content2.asp" -> in the accordion Panel Content I get an error in Dreamweaver - every time I open the file. See the error in the attached picture.
    Once all files are uploaded to the server it works apparently without problems or script errors.
    Is there anyone who can help me to use SSI "server side include" as content in accordion panels?

    Thanks for your reply.
    The fault lay in the SSI file. This file contained these tag:
    </ html>
    And of course the tag </ html> generate an error if the tag is inserted in the content of the accordion panel via ssi file.

  • How to include .js file in jsp file?

    hi,
    i have a jsp file with struts tag. right now i have all the javascript code as a separate function inside the jsp file itself. i want the javascript code to be present in a .js file and i want to refer that .js file from the jsp file with struts tags.
    <html:text property="Phone" value="" size="3" maxlength="3"
         onkeyup="return autoTab(this, 3, event);"></html:text>
    the above is the html tag which will call the function "autoTab" of the .js file. please help.
    thanks,
    Jayanth.

    You include javascript into a jsp in exactly the same way you do with html
    <script src="myJavascriptFile.js"/>
    It has nothing to do with the jsp per se, but rather the generated HTML page.

  • HTML content with images and links blocked

    Hello,
    I very much need some help here because my company needs to send out newsletters to our clients in HTML format soon and so far the email with HTML content is being blocked as spam while text content works fine. Specifically, whenever I add a link or an image in HTML content, the email doesn't go through. I tried sending in multipart format but it is also not sending HTML with images and links. Here is my attempt:
                                    props.setProperty("mail.transport.protocol", "smtp");
                                     props.setProperty("mail.host", "mail.server.com");
                                     props.setProperty("mail.user", "joeuser");
                                     Session mailSession = Session.getDefaultInstance(props, null);
                                     mailSession.setDebug(true);
                                     Transport transport = mailSession.getTransport();
                                     MimeMultipart mp = new MimeMultipart("alternative");
                                     MimeBodyPart htmlPart = new MimeBodyPart();
                                     MimeBodyPart textPart = new MimeBodyPart();
                                     textPart.setText("Just to make it multipart");
                                     htmlPart.setHeader("MIME-Version", "1.0");
                                     htmlPart.setHeader("Content-Type", htmlPart.getContentType());
                                     htmlPart.setContent(strHtmlMessage, "text/html");
                                     mp.addBodyPart(textPart);
                                     mp.addBodyPart(htmlPart);
                                     MimeMessage message = new MimeMessage(mailSession);
                                     message.setHeader("MIME-Version", "1.0");
                                     message.setHeader("Content-Type", mp.getContentType());
                                     message.setHeader("X-Mailer", "Recommend-It Mailer V2.03c02");
                                     message.setContent(mp);
                                     message.setSubject(strSubject);
                                     message.setFrom(new InternetAddress("[email protected]"));
                                     message.addRecipient(Message.RecipientType.TO,
                                             new InternetAddress("[email protected]"));
                                             transport.connect();
                                             transport.sendMessage(message,
                                             message.getRecipients(Message.RecipientType.TO));
                                     transport.close();This code is one of my numerous attempts to make HTML send images and links. Please, let me know if there is a workaround way to make JavaMail send HTML with links and images in the message body. Your help will be greatly appreciated.

    The JavaMail FAQ has information on creating HTML messages, including
    messages with both plain text and HTML. Did you find it?
    BTW, your code has many unnecessary statements, such as setting
    the Mime-Version header, which JavaMail will do for you, and setting
    the Content-Type header, which JavaMail does as a side-effect of the
    setContent or setText calls.
    Other than that, it looks like your code should be correctly creating a
    multipart/alternative message. If the recipient is still rejecting it you
    need to figure out what it is about the message that makes the recipient
    think it's spam. Can you send a similar message using another mailer?
    Can you send the message to a different recipient?

  • Not able to Send HTML Content in Apex Mail

    Hi,
    I am using Oracle Apex 4.2 and Oracle 11g XE
    I am trying to add HTML content in the apex_send mail procedure. But it give me the below error.
    >>•ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275
    Below is the code i am trying to add in the apex_send mail
    DECLARE
    l_from varchar2(1000);
    l_body CLOB;
    l_body_html CLOB;
    BEGIN
    l_body := null;
    l_body_html := '
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta property="og:title" content="Seasons Greetings from sudhir Networks" />
    <title>Seasons Greetings from sudhir Networks</title>
    <style type="text/css">
    /* Client-specific Styles */
    #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
    body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
    body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
    /* Reset Styles */
    body{margin:0; padding:0;}
    img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
    table td{border-collapse:collapse;}
    #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
    body, #backgroundTable{
    /*@editable*/ background-color:#FAFAFA;
    #templateContainer{
    /*@editable*/ border: 1px solid #DDDDDD;
    h1, .h1{
    /*@editable*/ color:#202020;
    display:block;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:34px;
    /*@editable*/ font-weight:bold;
    /*@editable*/ line-height:100%;
    margin-top:0;
    margin-right:0;
    margin-bottom:10px;
    margin-left:0;
    /*@editable*/ text-align:left;
    h2, .h2{
    /*@editable*/ color:#202020;
    display:block;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:30px;
    /*@editable*/ font-weight:bold;
    /*@editable*/ line-height:100%;
    margin-top:0;
    margin-right:0;
    margin-bottom:10px;
    margin-left:0;
    /*@editable*/ text-align:left;
    h3, .h3{
    /*@editable*/ color:#202020;
    display:block;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:26px;
    /*@editable*/ font-weight:bold;
    /*@editable*/ line-height:100%;
    margin-top:0;
    margin-right:0;
    margin-bottom:10px;
    margin-left:0;
    /*@editable*/ text-align:left;
    h4, .h4{
    /*@editable*/ color:#202020;
    display:block;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:22px;
    /*@editable*/ font-weight:bold;
    /*@editable*/ line-height:100%;
    margin-top:0;
    margin-right:0;
    margin-bottom:10px;
    margin-left:0;
    /*@editable*/ text-align:left;
    #templatePreheader{
    /*@editable*/ background-color:#FAFAFA;
    .preheaderContent div{
    /*@editable*/ color:#505050;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:10px;
    /*@editable*/ line-height:100%;
    /*@editable*/ text-align:left;
    .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{
    /*@editable*/ color:#336699;
    /*@editable*/ font-weight:normal;
    /*@editable*/ text-decoration:underline;
    #templateHeader{
    /*@editable*/ background-color:#FFFFFF;
    /*@editable*/ border-bottom:0;
    .headerContent{
    /*@editable*/ color:#202020;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:34px;
    /*@editable*/ font-weight:bold;
    /*@editable*/ line-height:100%;
    /*@editable*/ padding:0;
    /*@editable*/ text-align:center;
    /*@editable*/ vertical-align:middle;
    .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{
    /*@editable*/ color:#336699;
    /*@editable*/ font-weight:normal;
    /*@editable*/ text-decoration:underline;
    #headerImage{
    height:auto;
    max-width:600px;
    #templateContainer, .bodyContent{
    /*@editable*/ background-color:#FFFFFF;
    .bodyContent div{
    /*@editable*/ color:#505050;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:14px;
    /*@editable*/ line-height:150%;
    /*@editable*/ text-align:left;
    .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{
    /*@editable*/ color:#336699;
    /*@editable*/ font-weight:normal;
    /*@editable*/ text-decoration:underline;
    .bodyContent img{
    display:inline;
    height:auto;
    #templateFooter{
    /*@editable*/ background-color:#FFFFFF;
    /*@editable*/ border-top:0;
    .footerContent div{
    /*@editable*/ color:#707070;
    /*@editable*/ font-family:Arial;
    /*@editable*/ font-size:12px;
    /*@editable*/ line-height:125%;
    /*@editable*/ text-align:left;
    .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{
    /*@editable*/ color:#336699;
    /*@editable*/ font-weight:normal;
    /*@editable*/ text-decoration:underline;
    .footerContent img{
    display:inline;
    #social{
    /*@editable*/ background-color:#FAFAFA;
    /*@editable*/ border:0;
    #social div{
    /*@editable*/ text-align:center;
    #utility{
    /*@editable*/ background-color:#FFFFFF;
    /*@editable*/ border:0;
    #utility div{
    /*@editable*/ text-align:center;
    #monkeyRewards img{
    max-width:190px;
    </style>
    </head>
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
    <tr>
    <td align="center" valign="top">
    <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer">
    <tr>
    <td align="center" valign="top">
    <!-- // Begin Template Header \\ -->
    <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateHeader">
    <tr>
    <td class="headerContent">
    <img src="http://www.sudhirnetworks.com/i/logo/sudhir-logo.png" style="max-width:600px; padding-top: 20px;" id="headerImage campaign-icon" mc:label="header_image" mc:edit="header_image" mc:allowdesigner mc:allowtext />
    </td>
    </tr>
    </table>
    <!-- // End Template Header \\ -->
    </td>
    </tr>
    <tr>
    <td align="center" valign="top">
    <!-- // Begin Template Body \\ -->
    <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
    <tr>
    <td valign="top" class="bodyContent">
    <!-- // Begin Module: Standard Postcard Content \\ -->
    <table border="0" cellpadding="20" cellspacing="0" width="100%">
    <tr mc:repeatable>
    <td valign="top">
    <img src="http://www1.sudhirnetworks.com/ecard/sudhir_holidaycard_clickhere.jpg" style="width:560px;" mc:label="postcard_image" mc:edit="postcard_image" mc:allowtext />
    <div mc:edit="std_content00">
    <strong>Custom Message</strong> goes here.
    </div>
    </td>
    </tr>
    </table>
    <!-- // End Module: Standard Postcard Content \\ -->
    </td>
    </tr>
    </table>
    <!-- // End Template Body \\ -->
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </center>
    </body>
    </html>
    l_from := lower(:app_user) || lower('@sudhirnetworks.com');
    apex_mail.send(
    p_to => :P1_TO,
    p_from => l_from,
    p_body => l_body,
    p_body_html => L_BODY_HTML,
    p_subj => :P1_SUBJECT);
    APEX_MAIL.PUSH_QUEUE;
    END;
    Please suggest me how to fix this issue.
    Thanks
    Sudhir

    What happens if the user isn't reading the message in a HTML enabled mail client?
    Besides, even if you don't want to send an equivelant message in plain text, at least say something like 'Please open the message in an HTML enabled mail client'.
    It is a required field, so requires some value (not null).
    From the docs:
    Plain text and HTML email content. Passing a value to p_body, but not p_body_html results in a plain text message. Passing a value to p_body and p_body_html yields a multi-part message that includes both plain text and HTML content. The settings and capabilities of the recipient's email client determine what displays. Although most modern email clients can read an HTML formatted email, remember that some users disable this functionality to address security issues.

Maybe you are looking for