This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

include contents of an .inc file as in HTML pages

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could use iframes if you do not want to use server side includes.

Eric
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your server support SSI ? (Server side includes)

(even tomcat supports it via special servlet)
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic