html5 - How to add part of an external file in HTML file programatically? -


The content of a body of the table is generated by the Java code and it exports it to the file in the HTML file program definition How can I read?

The Java program generates the following code

  & lt; Tr & gt; & Lt; Th & gt; File name & lt; / Th & gt; & Lt; Th & gt; & Lt; / Th & gt; & Lt; Th & gt; Date & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> The Hitch Hitchcock's Guide to the Galaxy & lt; / Td> & Lt; TD & gt; Book & lt; / TD & gt; & Lt; TD & gt; 28/01/2011 & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> The Hitch Hitchcock's Guide to the Galaxy & lt; / Td> & Lt; TD & gt; Film & lt; / TD & gt; & Lt; TD & gt; 28/01/2011 & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Deck Slow's overall detective agency & lt; / Td> & Lt; Td> TV series & lt; / Td> & Lt; TD & gt; 28/01/2011 & lt; / TD & gt; & Lt; / TR & gt;   

.

  & lt; Div id = "liveFilter" & gt; & Lt; Div class = "liveFilterContainer" & gt; & Lt; Input type = "text" class = "live filter input default" value = "live filter" /> & Lt; A href = "#" class = "clearField" title = "clear filter" & gt; X & lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "noResults" & gt; & Lt; Strong & gt; Excuse me. & Lt; / strong> There is no match for your filter; Please try again. & Lt; / Div & gt; & Lt; Table class = "live filter list" range = "0" & ​​gt; & Lt; Tbody & gt; & Lt ;! - Java Generated Code goes here - & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt;    

You can add HTML code to jsp: include In the java file,

  & lt; Jsp: include page = "table.html" flush = "true" />   

The included file must be specified as "relative path"

The relative URL is a path name The protocol name, port number, or domain name can not be included in it. The URL can be relative to the absolute or existing JSP page. If this is complete (/ beginning with), then the name of the path is solved by your web or application server. You can not do the following:

 < Code> & lt; Jsp: include page = "http://www.cnn.com/todayNews.html" & gt; You can use jquery ajax to include the  table.html  page        < pre>  & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-1.11.0.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Click the $ ('# btt download') (function () {$ .ajax ({context: data, type: "html", url: "table.html", success: function (result) {$ (this). html (result);}}};}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Button name = "btnload" id = "btnload" value = "load code" /> & Lt; / Body & gt; & Lt; / Html & gt;    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -