Include an HTML file that needs parameters??

I have a JSP that includes an HTML file template.
Lets say I don't know all the contents of the HTML at the time. How do I add it?
Simple Example:
myHTML.html
<HTML>
<HEAD>
  <TITLE>myVariablePassedFromJSP</TITLE>
</HEAD>
<BODY></BODY>
<HTML>myJSP.jsp
  String title = "My Title To Display";
  <%@ include file="myHTML.html" %>
  etc...and the result should be
<HTML>
<HEAD>
  <TITLE>My Title To Display</TITLE>
</HEAD>
<BODY></BODY>
<HTML>

If the included file can be a JSP instead of a plain HTML file you can use the <jsp:include> tag with parameters. The parameters will become request parameters in the included JSP. You can use them anywhere in the JSP.
e.g.
*** 1.jsp ***
<jsp:include page="2.jsp" flush="true">
<jsp:param name="title" value="the window title" />
<jsp:param name="someBody" value="something for the body" />
</jsp:include>
*** 2.jsp ***
<HTML>
<HEAD>
<title><%= request.getParameter("title") %></title>
</HEAD>
<BODY>
<%= request.getParameter("someBody") %>
</BODY>
</HTML>
Be careful with includes because you can end up with multiple conflicting tags. For example, if 1.jsp has <html>, <head>, and <body> tags, and 2.jsp does, too, then you may run into a problem.

Similar Messages

  • Why does DW CC 2014.1 Fluid Grid load HTML file that contains Google Analytics Tracking Code script so slowly?

    I exclusively work in Fluid Grid since my site is a Responsive Web Design.  I'm having trouble with slow load time in DW CC 2014.1, when my file, as they all do of course, has the Google Analytics Tracking Code script.
    I'm on a Windows 8.1 using a Dell Precision M3800 Laptop with Memory 16GB (2x8GB) 1600MHz DDR3 . Each of our site's 180 or so web pages, of course, has its Google Analytics Tracking Code script. It is placed, following Google instructions, as the last entry in the <head>.  Google Analytics does not instruct to place the script in the JS Folder with an scr to it, but rather in the <head>.  It takes up to one and a half or two minutes for DW CC 2014.1 to load the Google Analytics Tracking Code script .  That is, the grid does not show in Live View until finally analytics.js shows up in the Document Toolbar. A minute or two can add up when every page you load takes this long.  And, making new Fluid Grid pages, as is done, through the Save As command; every new page made you have to deal with the minute or two wait time since all those pages have the Google Analytics Tracking Code script.  Therefore, this time component alone, assuming I'm accessing and/or making 20 pages per week (and in our business this is easily the case) the math is that I'm wasting between 17 and 35 hours per year just with DW CC 2014.1 loading the much needed Google Analytics Tracking Code script.
    I have loaded HTML files that do not have the Google Analytics Tracking Code script as a test and those files load at the normal quick speed.
    Therefore, the new Chromium Embedded Framework browser engine has a serious load problem when it confronts an HTML5 file with a Google Analytics Tracking Code script.  Oddly, the prior DW CC 2014 version, with the old browser engine did not have this slow-load problem since I was loading these same files in that DW CC version up until October 8th or so.
    I think this new browser engine is a Google platform that apparently has a problem rendering or loading a Google Analytics Tracking Code script.  That makes no sense.
    Anyone else had this particular slow-load problem with DW CC 2014.1?
    Thanks.

    Wow.  That sure solved the slow-load problem, at least using your suggested snippet in a simple test HTML file.
    Per Google's instructions, I pasted the snippet before the closing </head> tag.  And, even in that positioning in the file; the file loaded at the speed (about one second) that it did prior to DW 2014.1.
    Two questions.
    Will this snippet provide the same tracking data as my current GA snippet?
    Because my current GA snippet is in about 200 web pages, can I retain the old snippet in most of them and place the new snippet in my approximately 5 main web pages as well as my templates so my new pages, as well as my main pages, have the new snippet.  That is, can I have both snippets (i.e. old snippet in earlier pages and new snippet in main pages and new pages to be made going forward) in my website at the same time?
    Of course I would not have both the old and new snippet in a web page at the same time.
    I greatly appreciate any assistance anyone can provide me on this issue and thank all of you in advance.
    I've provided code for both simple test files below.
    Code for Asynchronous Syntax of GA script:
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test Asynchronous GA Tracking Code In Head</title>
    <link href="css/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/css/style.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="js/respond.min.js"></script>
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-73425000-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">
        <div id="test1" class="fluid ">This is the content for Layout Div Tag "test1"</div>
       <div id="test2" class="fluid ">This is the content for Layout Div Tag "test2"</div> 
    </div>
    </body>
    </html>
    Code for older GA script snippet:
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test GA Tracking Code In Head</title>
    <link href="css/boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/css/style.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="js/respond.min.js"></script>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', 'UA-73425000-1', 'auto');
      ga('send', 'pageview');
    </script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">
        <div id="test1" class="fluid ">This is the content for Layout Div Tag "test1"</div>
       <div id="test2" class="fluid ">This is the content for Layout Div Tag "test2"</div> 
    </div>
    </body>
    </html>

  • Create HTML file that can display unicode (japanese) characters

    Hi,
    Product:           Java Web Application
    Operating system:     Windows NT/2000 server, Linux, FreeBSD
    Web Server:          IIS, Apache etc
    Application server:     Tomcat 3.2.4, JRun, WebLogic etc
    Database server:     MySQL 3.23.49, MS-SQL, Oracle etc
    Java Architecture:     JSP (presentation) + Java Bean (Business logic)
    Language:          English, Japanese, chinese, italian, arabic etc
    Through our java application we need to create HTML files that have to display unicode text. Our present works well with English and most of the european character set. But when we tried to create HTML files that will display unidoce text, say japanese, only ???? is getting displayed. Following is the code we have used. The out on the browser displays the japanese characters correctly. But the created file displays only ??? in place of japanese chars. Can anybody tell how can we do it?
    <%
    String s = request.getParameter( "txt1" );
    out.println("Orignial Text " + s);
    //for html output
    String f_str_content="";
    f_str_content = f_str_content +"<HTML><HEAD>";
    f_str_content = f_str_content +"<META content=\"text/html; charset=utf-8\" http-equiv=Content-Type></HEAD>";
    f_str_content = f_str_content +"<BODY> ";
    f_str_content = f_str_content +s;
    f_str_content = f_str_content +"</BODY></HTML>";
    f_str_content = new String(f_str_content.getBytes("8859_9"),"Shift_JIS");
    out.println("file = " + f_str_content);
              byte f_arr_c_buffer1[] = new byte[f_str_content.length()];
    f_str_content.getBytes(0,f_str_content.length(),f_arr_c_buffer1,0);
              f_arr_c_buffer1 = f_str_content.getBytes();
    FileOutputStream l_obj_fout; //file object
    //file object for html file
    File l_obj_f5 = new File("jap127.html");
    if(l_obj_f5.exists()) //for dir check
    l_obj_f5.delete();
    l_obj_f5.createNewFile();
    l_obj_fout = new FileOutputStream(l_obj_f5); //file output stream for writing
    for(int i = 0;i<f_arr_c_buffer1.length;i++ ) //for writing
    l_obj_fout.write(f_arr_c_buffer1);
    l_obj_fout.close();
    %>
    thanx.

    Try changing the charset attribute within the META tag from 'utf-8' to 'SHIFT_JIS' or 'utf-16'. One of those two ought to do the trick for you.
    Hope that helps,
    Martin Hughes

  • Including static html file (WebServer)  with JSP (App server)?

    Hi,
    I want to know how can a static html file that runs on a Web Server (iPlanet) in a JSP that runs on an App Server (WebLogic 6.1).
    What would be the tag used and how the html file is referenced? Is there any other extra settings involved while integrating iPlanet with WebLogic 6.1?
    Responses are highly appreciated.
    Thanks and Regards,
    Madanlal.

    Web servers usually work with the MIME Types. In the mime type settings will determine how a request for a particular mime type is served. Usually HTML, JPG,GIF... are served by the web server itself. A JSP request will be forwarded to the APP Server for peocessing.
    The HTML and the image files need to be in a directory visible to the web server from the document root.
    See the files
    config\mime.types
    config\obj.conf
    under the web server installation directory.
    Refer to the web server's admin guide for more info.

  • To include a JAR file that contains enterprise beans in a WAR module

    1)I'm studying java ee tutorial in 6 but I do not understand what he means by "To include a JAR file that contains enterprise beans in a WAR module, add the JAR to the WEB-INF/lib directory of the WAR module" at this link:
    http://docs.oracle.com/javaee/6/tutorial/doc/gipio.html
    how do I create a file. jar to hold the enterprice beans in netbeans?
    2)
    as regards the case study prensete always in the tutorial "dukes-forest" I do not understand how it is structured, I think that the "dukes-store" is a web application (web module. war) to which are added other projects "entities "etc. .. is that correct? if it is right how do I create the project "entities" in netbeans? how do I add it to the project "dukes-store"?
    link at case study del tutorial:
    http://docs.oracle.com/javaee/6/tutorial/doc/glnpw.html

    Hi,
    I have also tried putting the actual jar file in my
    jar file that I created, that didn't work either.
    I didn't try extracting the contents of the jar file
    into mine because the directory structure would
    conflict my dir structure in the jar file (manifest
    file that is)Out of curiosity are you trying to use executable jar files? If so you might want to put the classpath in the manifest using Class-Path: blah.jar etc. Be remember that this resolves to the disk filesystem not the internals of the jar that is being executed. In other words - the blah.jar file resides in the same directoy on the disk as your executable jar.
    If you could clearly describe what you are trying to achive and how it is structured I am sure we could give you more pointers.
    TTFN

  • I want to display a HTML file that is stored locally on my machine.

    Hello,
    I am having a problem with my paths (I believe). I have created a JEditorPane that reads in a HTLM page. If the page is form the web it works fine:
    page_jep.setPage("http://www.google.com");However I want to display a HTML file that is stored locally on my machine.
    I have tried the following but cant get it to find the stored page:
    page_jep.setPage("file:///index.htm");
    java.io.FileNotFoundException: \index.htm (The system cannot find the file specified)I have tried putting the index file in both the root directory ( C ) and also the same place as where the class files are.
    Any help will be gratefully received,
    Harold Clements

    Nope, I have tried it:
    page_jep.setPage("file://c:\\index.htm");Gives me:
    java.net.UnknownHostException: c

  • When i have a web page which includes an SVG file that spans 2-3 pages, if i try to print the web page it only prints the first page.

    Basically, i have an html file that embeds a large SVG file. When i try to print the html file, FF only recognizes the first page - basically the second, third, fourth pages do not appear. Is this a known issue with FF?
    Can it be fixed?
    FYI - Google Chrome allows you to print the other pages but unfortunately headers/footers cannot be controlled and thus overwrite some of the SVG content.

    Anyone?

  • "Some files that need to be updadted are currently in use."

    I have Windows Vista, and iTunes has not been working on my computer for a few months now. I was hoping this new version (7.4 the latest one) would finally be able to run. Unfortunately, when I run the installer, I get a window that says this:
    "Some files that need to be updated are currently in use."
    "The following applications are using files that need to be updated by the installer. Close these applications and click Retry to continue"
    "Windows Explorer (Process ID: 2440)"
    How should I deal with this? And what if I still get the "iTunes has stopped working" message if I do manage to install it? Thanks for trying to help!

    Sorry to bump up an old thred.
    I too ran into the same error. It was the vagueness of the error message which surprised me.
    What I used Unlocker [http://ccollomb.free.fr/unlocker/] on the folder "C:\Program Files\Adobe\Reader 9.0", it showed some 6 to 7 files in use by the Windows Search Indexer.
    I unlocked all the files and was able to update Adobe Reader.

  • 9.2.0 Upgrade (CPSID_50026) "Files in Use" - "Some files that need to be updated are currently in use" "Program Manager"

    I have no other applications open, when I try to update with 9.2.0, but I receive subject error message.  Task Manager shows NO Image Name called "Program Manager".  There is nothing else running, that is obvious to shut down.  Any suggestions, Please?
    rick

    Have these posted suggestions worked for anyone?  I have been using the same installation files on several different machines.  Most machines upgrade just fine but, I have a few that receive this error and I cannot seem to get past it:  "Some files that need to be updated are currently in use"  "Program Manager" is the program that the installer is complaining about.  Does anyone know what program "Program Manager" is?  I'm assuming it is an Adobe file but, why would it interfere with one of my installations and not all of them?
    I'm using the same installation files for all installs so, I don't believe that it could be my downloaded installation setup files.
    Thanks so much in advance for your assistance --

  • I had a Microsoft tech access my computer remotely to resolve issues with my hotmail acct. There were files that needed to be deleted and he also changed some settings.   Later, when I tried to open InDesign I received the following error:  AMT Subsystem

    I had a Microsoft tech access my computer remotely to resolve issues with my hotmail acct. There were files that needed to be deleted and he also changed some settings.
    Later, when I tried to open InDesign I received the following error:
    AMT Subsystem Failure
    The licensing subsystem has failed catastrophically. You must reinstall or call customer support.
    I rebooted the computer and tried again:
    Licensing for this product has stopped working.
    You cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contacting your IT administrator or Adobe customer support for help.
    I can access Acrobat and MS Office programs, it's just the CS3 programs that I can't access. Can I uninstall and then reinstall CS3 without an access (un-lock) code?

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • Why does Dreamweaver upload a blank page when i "put" a .php or .html file that I just edited. It's

    Why does Dreamweaver upload a blank page when i "put" a .php or .html file that I just edited. It's like Dreamweaver isn't putting the complete file. So when i check my work (refresh the page), it is now blank. This happens about 50 percent of the time and can occur with any of the websites I maintain. (If I pull out my macbookpro, i can edit and upload the page, but the screen is smaller and i would rather be at my desktop). I am using CS5 on a MacPro, operating system 10.7.5.

    I've never heard of that type of error before. If it were happening to me, here are a few things I would do...
    Verify it's DW
         Download Filezilla (free and very nice in reality) and make sure it uploads correctly from there to rule out connection issues
    Rebuild Site Cache
         From the Files window of your site, click the menu and go to Site > Recreate Site Cache
    Delete DW File Cache
         If the above does nothing, I'd kill my DW Cache File: http://forums.adobe.com/thread/494811
    Uninstall, clean, reinstall
         Uninstall the program, use the cleaner tool here: http://www.adobe.com/support/contact/cscleanertool.html to kill everything (Adobe leaves behind things that are picked up again in a normal uninstall/reinstall) then reinstall it.

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

  • How to include a html file in jsp

    hi all
    I have a question about including a html in jsp.
    here's the sample of my jsp file:
    <%
    String filename = "helloworld.html";
    %>
    <%@ include file="helloworld.html" %>
    how will you go about doing it so that the included file depends on the variable "filename"? I've tried doing the following but I got an error:
    <%@ include file=filename %>
    Thank you very much :)

    try this:-
    <%
    String filename = "helloworld.html";
    %>
    <jsp:include page='<%= filename %>' />
    This should work.

  • WEBSITE NOT REFLECTING EDITS OF HTML FILE THAT WAYS SUCCESSFULLY "PUT" TO REMOTE SERVER

    Help!  I'm hoping there is a simple reason why I can't get my simple edits to reflect on the website.Here is what I have done/tried:
    1. opened and added one simple line of text (with one link to a pdf) to one page of the pre-exisitng site.
    2. checked both properties and code to make sure everything matched the preceding, similar line of text
    3. connected successfully to remote site through dreamweaver
    4. tried both "putting" and synchronizing the file (along with dependent files)
    5. the first time I did this I got the message that "no syncronization info is available" from  the remote site
    6. clicked ok (after going back and  unchecking "maintain synchronization information," and making sure there were no sync files in the _name folders)
    7. it took a long time to upload all of the files from the local site.  when it finished, the log stated that everything put successfully, but the website
    doesn't look any different.
    Our root folder is saved on our server.  We just recently changed web host providers.
    Also, for each webpage, there are two html files (one general and then one with a 1, 2 or 3 column descriptor).  I edited and put both to the site, but is there
    something I should know about these two files?
    ??  I just need to make some really simple edits and I don't understand why they are not showing up!!??
    Any help would be deeply appreciated!!!
    Thanks, Jessica

    I followed your instructions and was able to see the dummy page in the browser.  (no file not found error)
    OK - that's good.
    I only have one site defined (should I have two - one for local and one for remote?)
    Well, one site definition has the ability to contain local and multiple remote site specifications.  Under the basic Site category in the Site definition, you will see the path to the local root folder.  Under the Servers category, you will see each server that has been defined - usually a Remote server (that would be your web hosting account) and a Testing server (if you are coding a site with server scripting).  It's normally the case, with a simple, static HTML site, to have just Local and Remote details in your site definition.
    I called our host (Go Daddy) to ask what the name of the root directory was and they instructed me to just leave that blank. so right now it just appears as \
    Actually, it should be either blank or "/" (the regular slash).
    If you are able to see the dummy file that you browsed to but still do not see changes made to other files, then it must be that the host is caching files on your site.  You would have to ask them that question.  Otherwise, you should see changes that have been uploaded immediately.

  • Jsp:include of html file not working

              Hi
              I wrote:
              <jsp:include page="include.html" />
              <% pageContext.include("include.html"); %>
              in my jsp, but there is no output and no error message.
              What could be the problem?
              If I include include.jsp it works.
              Does jsp:include only work with jsp, not with html???
              I am wondering whether our servlet registrations could be responsible. We have:
              weblogic.httpd.defaultServlet=*.jsp
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.register.*.htm=weblogic.servlet.FileServlet
              weblogic.httpd.register.*.html=weblogic.servlet.FileServlet
              so that the default servlet is the JSPServlet, not the ServletServlet. We don't
              want to use the ServletServlet because it can deliver source code.
              What we want to do is a dynamic including of a file, like so:
              <% String s = ...; %>
              <jsp:include page="<%= s %>" />
              Thanks for any help.
              Alex
              

              By changing the weblogic servlets that are registered, I can get it to work. The
              combination that works is:
              weblogic.httpd.defaultServlet=file
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.register.file=weblogic.servlet.FileServlet
              I am surprised that it doesn't work if *.html is mapped explicitly to the FileServlet
              (which would leave the defaultServlet unused). Why is that?
              And why can't I map defaultServlet to "weblogic.servlet.FileServlet" directly,
              without the intervening virtual name "file"?
              What are the security implications of having FileServlet as the default servlet?
              Thanks
              Alex
              

Maybe you are looking for

  • ITunes lost all the names of my audio files

    I can appreciate that there are some people who need to have organisation forced upon them because they are incapable or too lazy to do it for themselves. I personally hate apps which take control of my computer or file system and put things where I

  • Can no longer get the plug in to charge

    The port on Ipad must have gotten damaged some how because I'm very careful when plugging it in, but now I can't get a plug in the device to charge it.

  • Parent child tables - how to maintain RI

    Here is my scenario: In our model, we have parent child relationship between tables. We are not sure how the parent tables are populated. If incremental update, it should be fine (assuming if needed rows will be inserted in the child table manually).

  • Oracle EBS12, how to start a new transaction.

    Sorry for this stupid question. I have installed EBS12 and login using sysadmin, sysadmin. All I see an interface manager with bunch of admin tasks to personalize. My question is how do I get into an interface to create a new transaction for my dummy

  • Adobe CS3 Reinatall Issues

    Hi, I was having issues with CS3 so decided to reinstall it. At the time I didnt realise I needed to deactivate it so just uninstalled it from the control panel and tried to reinstall. Now I get faced with the attached. I tried following the steps at