473,320 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to display data from a text file onto a webpage?

41
Hi Guys,

Does anyone know how to display data from a text file onto a webpage?

So far I have opened and read the data in the text file and printed it out on command line, but I am having difficulty of displaying the data from the text file on to the webpage.
Feb 7 '07 #1
2 2506
Ganon11
3,652 Expert 2GB
I imagine you could open an output stream to the webpage's document and write everything through this, including all the HTML related tags. The changes would talk effect the next time you loaded the page. I'm not sure though if this is what you require, and I haven't had much experience reading/writing with Java files.
Feb 7 '07 #2
dmjpro
2,476 2GB
the code will be somthing like this in jsp....

import java.io.*;

<center></h5>
<%FileReader file = new FileReader("file_name with path");
while((String line = file.readLine()) != null){
%>
<%=line%>
<%}%>

plz send me the reply ..
i am online
Feb 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: liberatingathena | last post by:
I'm writing you from Alajuela, Costa Rica. It's 4:30 in the morning here and I'm reaching a point of pure desperation as I've been searching the internet all night for a solution. I am not an...
13
by: Jim Carlock | last post by:
I have over a hundred pictures I would like to present. Is it practical to create and parse an array of pictures, picture paths, et al using server-side scripting to accomplish this? I...
1
by: Kees de Winter | last post by:
Hi, If I want to display some text value coming out of a database on an aspx page (on a label), do I really have to create a connection and command object etc. all manually (such as in the code...
10
by: sanou | last post by:
Hi does anyone know if the following is possible? I have an excel spreadsheet with values that i need transferred to a certain website's form. for instance, i have a value in excel spreadsheet...
3
by: Sharon | last post by:
hello all, I was successfull in passing one value from first webpage to second webpage, but not sure how to pass three textbox values from the first page to the second page. Below is the code i...
13
by: Naha | last post by:
Hi Guys, I have managed to write a java class which opens and reads a text file and prints the data onto a webpage. however in order to do this I have to compile my java class each time. Does any...
4
by: Joe101 | last post by:
Question: How to put access data base onto a web page?
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
4
by: Mubs | last post by:
Hi ppl, I am trying to insert records into my database using a form. this works. but after this i would like the records to be displayed onto another page.. the database gets updated but the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.