| Author |
include contents of an .inc file as in HTML pages
|
JayaSiji Gopal
Ranch Hand
Joined: Sep 27, 2004
Posts: 303
|
|
Hi! I have a .inc file, which is a plain text file, containing around 20 lines of plain text. I have an HTML page with lot of tables inside it. I need to include this plain text AS INLINE TEXT inside the html page. How do I get this done?? Any ideas??
|
SCJP 1.4, SCWCD 1.4<br /> <br />Thanks in advance!<br />Jayashree.
|
 |
Jessica Sant
Sheriff
Joined: Oct 17, 2001
Posts: 4313
|
|
if you're using JSP's (Java Server Pages) -- you can use the <jsp:include> tag. But... seeing as though you're asking about plain old HTML pages, I'm going to move this to that HTML and JavaScript forum. Hopefully they can help you out.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Could use iframes if you do not want to use server side includes. Eric
|
 |
Eugene Lucash
Ranch Hand
Joined: Feb 19, 2005
Posts: 77
|
|
I don't really understand which environment you are working in. What does it means 'INLINE TEXT' If you want to preserve formating in .inc file, you can include within <pre> tag <table><tr><td>...... ........ <pre> <%@include file="file.inc" %> <%-- using jsp --%> </pre> ..... ... </td></td></table>
|
 |
JayaSiji Gopal
Ranch Hand
Joined: Sep 27, 2004
Posts: 303
|
|
Hi All, Thank u for all the replies. By inline text, I mean...the HTML file contains all the text from the .inc file directly into it. I cannot use <@include file...> since it is plain HTML. I am not using JSP. I am working on SeeBeyond EAI tool. Writing Java Code to put business logic into the system. SeeBeyond is an Enterprise Appln and Integration Tool developed by SeeBeyond Corporation Inc. I cannot use JavaScript, bcos it is not supported by SeeBeyond. [ February 21, 2005: Message edited by: JayaSiji Gopal ]
|
 |
Eugene Lucash
Ranch Hand
Joined: Feb 19, 2005
Posts: 77
|
|
Does your server support SSI ? (Server side includes) (even tomcat supports it via special servlet)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56540
|
|
HTML has no inherent include mechanism. You need to use a mechanism provided by the web server for this. So, what web server are you using? If Apache, you need to enable server-side includes.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: include contents of an .inc file as in HTML pages
|
|
|