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.

Similar Messages

  • How include html file ?

    Hi to everybody.
    regarding including html file
    I write by myself html file and I want include this file in javadoc documentation
    could give me the easiest way to do that
    many many thanks
    Fausto

    Create a directory in the source tree named "doc-files" in the package directory of the class, then put file.html in that directory. Then create a link to that file from the class. When you run javadoc, the file will be copied to the -d directory and the link will work.
    Look at the example here:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#unprocessed
    -Doug

  • 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.

  • Including HTML file

    Hi,
    I have a HTML file. I would like to include it on a UIX page. If I use the
    <urlInclude source="file://c:\example.html"/>
    tag, after the rendering of the UIX page the mentioned HTML file does not appear. How can I include this HTML file, or what is wrong?
    Thanks,
    Andras

    Andras,
    Please try
    <urlInclude source="file://c:/example.html"/>
    That ought to work.
    Hope this helps,
    Ryan Pollock
    UIX Team

  • How to include html files in another html files?

    Hello,
    I am wondering if there is any way of including content (html code) inside another html page..
    I've tried:
    - iframe - it's working fine but IE7 doesn;t like it.
    I am looking for something similar with:
    - Server Site Include <!--#include virtual="/directory/included.html" -->
    but without to have to change the portal settings.
    Any idea?
    Thank you
    Anca

    HI did u try using the omniportlet? on Portlet builders

  • Include HTML file to E-Mail Notification body GRC AC 10.0?

    Hello Experts,
    i have already created an own email notification tempate and i'm trying to edit the body by using TA SE61. Within this transaction i see only very limited possibilities to change the text formatting (only given styles). During some tests and i saw the possibility to download the template as a html file.
    to my question:
    is there any opportunity to upload a html file to the email notification instead of using the ms word formatting (not ITF /RTF/ ASCII)?
    or is it possible to change color, size (except using styles) of the text or add tables to the body etc?  and if its possible how do i change it within the ms word editor?
    Thank you in advance !!!
    Alice

    Hello Alessandro,
    yes sure. For explanation: i retained all HMTL tags, because it didnt work either without.
    I also deleted all my content and inserted the code of Sai. Additionally i tried only <strong> text </strong> but again without any results.
    <HTML><BODY>
    <P style='margin-bottom:12.0pt'><span style='font-size:20.0pt;font-family:CorpoS;color:#0F2749'> XXX TSS Company </span><span style='font-size:19.0pt;font-family:"Arial Black","sans-serif";color:#00B5ED'> IDENTITY MANAGEMENT</span></p>
    </td></tr>
    <tr style='mso-yfti-irow:1'>
      <td style='padding:0cm 0cm 0cm 0cm'>
      <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%"
       style='width:100.0%;mso-cellspacing:0cm;mso-yfti-tbllook:1184;mso-padding-alt:
       0cm 0cm 0cm 0cm'>
       <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
        <td style='border-top:#00B6ED;border-left:#0F2749;border-bottom:#00B6ED;
        border-right:#0F2749;border-style:solid;border-width:2.25pt;background:
        #0F2749;padding:3.75pt 7.5pt 3.75pt 7.5pt'>
        <p class=MsoNormal><span style='font-size:13.5pt;font-family:"Arial","sans-serif";
        color:white'>User account expiration caused by position change<o:p></o:p></span></p>
        </td>
       </tr>
      </table>
      </td>
    </tr>
    <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
      <td style='padding:0cm 0cm 0cm 0cm'>
    <P>Dear %REQUESTER_NAME%,</P>
    <P>your <STRONG> request number </STRONG> :  %REQNO%  has been approved.</P>
    <P></P>
    <P>Kind regards,</P>
    <P>Access Control Administrator</P>
    <P></P>
    </BODY></HTML>
    Regards,
    Alice

  • Include html file into servlet

    Hi.
    I try to include an static html into my servlet application.
    example.
    booolean var=false
    HttpServletResponse resp;
    if(var)resp.print("head.html");
    else resp.print("other.html")is there anyway to do it??
    thaks...

    String target = "";
    if(var)
    target = "head.html";
    else
    target = "other.html";
    RequestDispatcher rd;
    rd = getServletContext().getRequestDispatcher(target);
    rd.forward(_req, _res);                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to include HTML-Files / Temlplates in Servlets ?

    Yep, that's what i need to know.
    In JSP there is the include-Command, but with Servlets this Command doesn't work. It's for something else, i think.
    I wanna include a header- and a footer-Template within the most of my Servlets.
    Thx for Help
    Tobias

    You can use the request's dispatcher to include the contents of a template in your response:
    request.getRequestDispatcher("header.jsp").include(request, response);
    request.getRequestDispatcher("template1.jsp").include(request, response);
    if(...)
      request.getRequestDispatcher("template2.jsp").include(request, response);
    request.getRequestDispatcher("footer.jsp").include(request, response);This enables your Servlet to dynamically construct the view.
    Typically you'd decide which template to forward to in your Servlet and then just use the include directive in your JSP. However, sometimes the decision about what to include can only be resolved by the controller.
    There are various other ways of achieving the same result such as passing flags from the Servlet to the top-level JSP template via the request to instruct the JSP to include another template.
    Use whichever approach you feel most comfortable with.
    Hope this helps.

  • Include External File

    Hi,
    I'm using RequestDispatcher include method to include HTML files in my servlet. What I want to do however is include HTML files situated on a separate server in a separate domain. However even though I preface the address with http://xxxx/myfile.html it still searches for the file from the doc root. Does anyone know how I can get it to include a file from an external server. (I am using iPlanet 4.1 btw).
    Thanks,
    Sean

    If you read Javadoc for javax.servlet.RequestDispatcher and the various methods that one can use to get an instance of an object implementing this interface, it will be clear that it can be used only if the target resource is on the sane server as the one in which you are running your code in the first place.
    For your purpose, you would have to use the facilities provided by java.net.URL, java.net.URLConnetion and java.net.HttpURLConnection to gather content from the remote resource and then place that contents into your own resource's HTML being generated yourself.

  • How to Include a HTML file in a UIX Page

    I have an old .html file (content.html) which contains some infomation and now I want to present that information inside a Uix Page! Is it possible to do so if then how.
    I tried using uix include tag but no luck.
    Any help is greatly appreciated.
    Thanks
    Kolluru

    Here is the .jsp file and the serverinclude tag is written in the 4th line from last.
    <uix:servletInclude source="layout.html" />
    I want the content of the layout.html in the main content pane but instead it is getting added on to the top or to the SideNav.
    Thanks for the help anyway.
    ====================================================
    <%@ page errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="MyBC4JModule" definition="MyUIX.MyBC4JModule" releasemode="Stateful" />
    <jbo:DataSource id="ds1" appid="MyBC4JModule" viewobject="EmpView1" rangesize="4" />
    <%-- user interface begins here --%>
    <HTML>
    <HEAD>
    <TITLE>Oracle Migration Maps </TITLE>
    <uix:styleSheet/>
    </HEAD>
    <BODY>
    <uix:pageLayout>
    <uix:pageHeader>
    <uix:globalHeader selectedIndex="0">
    <uix:contents>
    <uix:link text="Migration Maps" destination="uixpage1.jsp" />
    <uix:link text="Migration Checklist" destination="http://www.oracle.com" />
    <uix:link text="Templates" destination="http://www.oracle.com" />
    <uix:link text="Scripts" destination="http://mtg.ie.oracle.com" />
    <uix:link text="Release" destination="http://www.oracle.com/" disabled="true" />
    </uix:contents>
    </uix:globalHeader>
    </uix:pageHeader>
    <uix:productBranding>
    <uix:image source="productBrand.gif" shortDesc="product" />
    </uix:productBranding>
    <uix:cobranding>
    <uix:image source="cobrand.gif" shortDesc="brand" />
    </uix:cobranding>
    <uix:copyright>
    <uix:flowLayout>
    <uix:contents>
    <uix:image source="images/info.gif" />
    <uix:link text=" @Copyright 2003, Oracle Corp. " destination="http://www.oracle.com" />
    </uix:contents>
    </uix:flowLayout>
    </uix:copyright>
    <uix:privacy>
    <uix:flowLayout>
    <uix:contents>
    <uix:image source="images/info.gif" />
    <uix:link text="privacy statement" destination="http://www.oracle.com" />
    </uix:contents>
    </uix:flowLayout>
    </uix:privacy>
    <uix:globalButtons>
    <uix:globalButtonBar>
    <uix:contents>
    <uix:globalButton icon="images/returntoportal.gif" text="Home"
    destination="uixpage1.jsp"/>
    <uix:globalButton icon="images/logout.gif" text="Logout"
    destination="http://www.oracle.com"/>
    <uix:globalButton icon="images/preferences.gif" text="Preferences"
    destination="http://www.oracle.com"/>
    <uix:globalButton icon="images/help.gif" text="Help"
    destination="http://www.oracle.com" targetFrame="_blank"/>
    </uix:contents>
    </uix:globalButtonBar>
    </uix:globalButtons>
    <uix:breadCrumbs>
    <uix:contents>
    <uix:link text="Home" destination="uixpage1.jsp" />
    <uix:link text="Qualification" destination="qualification.jsp" />
    <uix:link text="Customer Survey" destination="customersurvey.jsp" />
    </uix:contents>
    </uix:breadCrumbs>
    <uix:quickSearch>
    <uix:messageTextInput prompt="Search" name="QSearch" text="Cabo">
    <uix:end>
    <uix:submitButton accessKey="g" text="Go" />
    </uix:end>
    </uix:messageTextInput>
    </uix:quickSearch>
    <uix:start>
    <uix:sideNav>
    <uix:link text="Home" destination="uixpage1.jsp" />
    <uix:link text="Help" destination="/site1/PageTemplate.jsp" />
    <uix:link text="Migration Process Guide" destination="http://pta.us.oracle.com:9999/" />
    <uix:link text="MSMS v1.1" destination="http://amgdev1.ie.oracle.com/mtg/" />
    <uix:link text="Knowledge Base" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Factory Infrastructure" destination="http://webiv.oraclecorp.com" />
    <uix:link text="BugDB" destination="http://bug.us.oracle.com" />
    <uix:link text="Oracle Migration Workbench " destination="http://webiv.oraclecorp.com" />
    <uix:link text="Application SQL Tools" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Support" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Migration Technology Centre" destination="http://otn.oracle.com/tech/migration/content.html" />
    <uix:link text="Migration Technology Group" destination="http://mtg.ie.oracle.com" />
    </uix:sideNav>
    </uix:start>
    <uix:end>
    <uix:contentContainer text="Related Maps" background="light" icon="testInfo.gif" width="100%">
    <uix:link text="Customer Surveys" destination="http://www.oracle.com" />
    <uix:link text="Survey Request" destination="http://www.oracle.com" />
    <uix:link text="Customer Analysis" destination="http://www.oracle.com" />
    </uix:contentContainer>
    </uix:end>
    <%-- Main page contents go here --%>
    <uix:contents>
    <uix:header styleClass="OraLightHeader" text="Qualification Stage" />
    <uix:styledText styleClass="OraHeaderSubSub" text="" />
    <uix:spacer width="10" height="15" />
    <uix:styledText styleClass="OraDarkHeaderSubSub" text="Qualifying the Customer - Receiving Customer Surveys" />
    <uix:spacer width="10" height="10" />
    <bc4juix:TableDetail></bc4juix:TableDetail>
    <uix:styledText styleClass="OraInstructionText" text="Prospective customers
    are identified by a variety of sources, such as sales consultants and
    Oracle Direct. These customers are asked to complete a customer survey and
    the results are automatically sent to the Migration Factory. The table below
    lists the location of the customer surveys once they are released on the
    Oracle eMarketing system." />
    <uix:spacer width="10" height="20" />
    <uix:servletInclude source="layout.html" />
    </uix:contents>
    </uix:pageLayout>
    </BODY>

  • Html files with included php: related files, code color?

    Hi there,
    Wow, what an active forum!
    I have two questions about html files that include php.
    Almost all my html files have this structure:
    <?php
    (php stuff)
    require_once 'somefile.php';
    ?>
    (html stuff)
    My first question is, is there any way for DW CS4 to display the files included this way? At the moment, they don't show up in related file view.
    My second question is, is there any way for DW CS4 to display the html and php code in the file in a pleasant way? The php is not red as it is in pure php files.
    Definitely not wanting to change the way I code or to change the file extensions...
    Instead, wanting to change the SW settings to make my work easier.
    With gratitude,
    Smiles
    Andy

    Hi Brad,
    Thanks for your reply!
    > The PHP coding in a regular HTML page likely won't even work in a  browser
    That's a standard coding technique...LOL... Maybe I didn't explain correctly...
    My hundreds of pages validate XHTML transitional...
    You are quite right that browsers do not interpret php code, but the  browser never sees php code.
    I will try to explain again
    The html file starts with <? php (code> ?>
    When the browser calls the html file, the server knows to process the file as php.
    It processes the php, then returns some html headers, and follows up with all the html that is after the <? php (code> ?> section.
    Thousands of php coders work like this.It's a very efficient way of building a modular website while keeping html extensions.
    By the way, related files already show in CS4 if they are in the html code.
    Are you 100% sure you are correct about the CS5 inclusion situation? You won't know unless you have built an html file that looks like this.
    <?php
    require_once 'myfile.php'>
    ?>
    <body>
    hello html
    </body>
    Your myfile.php might look like this:
    <?php
    echo 'hello php <br />';
    ?>
    If you have never used php in an html file, you will probably need to add something like this to your .htaccess file:
    AddHandler application/x-httpd-php5 .php .htm .html
    It tells your server that php processes not only php files but also html files.
    Warmest wishes to all,
    Andy

  • How can i include css in html file when exported

    I want the CSS should be included in the html file when exported, how is that posable?

    Muse follows its own structure and keeps HTML, CSS and JS code in separate files as and when possible. If you want all that code to be merged into the HTML file itself, then there is no option to force Muse to do that. You can however, add your own CSS code into the HTML page by adding the CSS using either the Insert HTML option or using the HTML for <head> option in Page Properties > Metadata.
    Cheers,
    Vikas

  • Including  HTML text files in  JSP where filename is variable

    Hi
    Myself new to JSP codings please do let me know via code how can thi s be done .
    i have to call a HELP JSP for the page user is navigating
    Help.jsp comes in popup. I have included header file in it HElp
    _header.jsp
    in help_body.jsp an HTML text file will be included but problem is this
    file will be decided at runtime.
    could you let me know how to pass variable file names in include .
    for the moment i will use if else
    After that help file location has to be fetched from session.

    Hi
    Myself new to JSP codings please do let me know via code how can thi s be done .
    i have to call a HELP JSP for the page user is navigating
    Help.jsp comes in popup. I have included header file in it HElp
    _header.jsp
    in help_body.jsp an HTML text file will be included but problem is this
    file will be decided at runtime.
    could you let me know how to pass variable file names in include .
    for the moment i will use if else
    After that help file location has to be fetched from session.

  • Hi i have a learning HTML file with a data file include a swf files how can i open it in my ipad?

    hi i have a learning HTML file with a data file include a swf files how can i open it in my ipad?

    iPad do not support flash natively.
    Look in the app store, some browsers do support flash with limited functionality.

  • Jsp:include an html file in a subdir

    I have the following directory structure and files
    $CONTEXT/articles.jsp
    $CONTEXT/articles/article1.html
    $CONTEXT/articles/images/image01.gif
    When I browse to
    http://$SERVER/$CONTEXT/articles/article1.html
    the article and its image display fine. The file article1.html references the image via an href to "images/image01.gif".
    However, when I try to access the article from articles.jsp via a <jsp:include page="articles/article1.html" flush="true"/>, the article1.html can't find its image. Obviously this is a problem with the relative path to the image.
    I want to be able to correctly view article1.html from directly browsing it and from including it from articles.jsp. How can I include the article1.html from articles.jsp and somehow allow article1.html to find its images? Is this possible?
    Best regards and thanks,
    John

    I have just tried what you say doesn't work, but I have no problem getting it to work. You may want to check your syntax.
    My directory structure is as follows
    SERVERNAME/CONTENT/jspinclude.jsp
    SERVERNAME/CONTENT/inc/inc.html
    SERVERNAME/CONTENT/inc/images/myimage.gif
    my jsp file looks like this:
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    This is a test of a jsp.include
    <jsp:include page="inc/inc.html" flush="true" />
    </BODY>
    </HTML>
    my html file looks like this
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    <P>This is some sample text</P>
    <P><IMG src="images/myimage.gif"> </P>
    </BODY>
    </HTML>
    This seems to work fine. Perhaps the problem exists somewhere else.
    Rob

Maybe you are looking for

  • Trying again; Excel 2013 error 0xC0000005 when printing.

    Hi, I have a problem in excel 2013 where some excel documents give my co-workers this error: -<Eventxmlns="http://schemas.microsoft.com/win/2004/08/events/event"> -<System> <ProviderName="Application Error" /> <EventID Qualifiers="0">1000</EventID> <

  • Remove or disable hangouts

    I have gone into apps and uninstalled updates. It keeps showing in My Apps for Updates. I do now want it. How do I disable it so it won't keep requesting me to update it? I have looked in settings->apps but it doesn't show up there. In fact, other th

  • What is the best way to install qmail?

    I'm about to rebuild my server and want qmail on it. What is the best way to install it? In the past I've used http://qmailrocks.com/ but I've also looked at  http://lifewithqmail.com/. The problem I found with qmailrocks was that because it doesn't

  • App Tabs disappear when reopening FF - Started in 7.01

    When I was updated to 7.01 my app tabs don't persist from one session to the next as they have previously. Win-7 64-bit - 8GB RAM - Lots of disk space Tried setting options to start with last tabs, but that didn't affect it.

  • Need a "click here" to rewind animation

    I created a simple "before & after" animation in FlashMX. User clicks on image, then animation starts. I would like to add a rewind button to watch it again, but I am unsure how to create this. I want user interaction to control when to start and res