473,651 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

41 New Member
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 2534
Ganon11
3,652 Recognized Expert Specialist
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 Top Contributor
the code will be somthing like this in jsp....

import java.io.*;

<center></h5>
<%FileReader file = new FileReader("fil e_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
2560
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 access wizard. I just started looking at it actually because I'm trying to learn about asp pages and storing form information. I'm trying desperately to find a solution to displaying ONLY the record number of the last entry into the form. I'm...
13
3260
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 created an array already, and whereby, the HTML and Javascript currently used amount to about 14KB for each of four different pages, the PHP page I started working on is already over 35KB in size (most of it is server side processing creating the array...
1
1556
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 below) or is there an easier way (asp.net 2.0, VS 2005) ? Thanks for your help! Protected Sub Page_Load(ByVal sender As Object, ByVal e As
10
23358
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 xyz that i wanted to transfer to a data entry box on a webpage that is concurrently open. basically i want to make it simple enough that at a push of a button, i can copy/paste all my data into another form. alternatively, i guess could have a...
3
1803
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 was using to pass a single value First WebPage: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
13
10348
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 one know how I could do the same thing using servlets and jsp, I have been trying to do it, but have not succeeded yet.
4
2132
by: Joe101 | last post by:
Question: How to put access data base onto a web page?
2
3260
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 validated my HTML and CSS code. 1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
4
2449
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 webpage i want the data to be displayed remains empty....any suggestions.. code so far. <?php require_once('Connections/mysql_connect.php'); ?> <?php if (!function_exists("GetSQLValueString")) {
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.