🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1228

How to get content of a text file from client post by web page

#1228
From: Angry Orca
Date: Tue, 16 Apr 2002 09:20
21 lines
1823 bytes
Hi, all:
I encounter a problem here while I am using the jsp.
In the client page, I use this input to post a text file to the server side.

<p><input type="file" size=40 name="file" value="*.txt"></p>

On the server side, what should I do to get the content of the file?
The tutorial says this:
To read character data, use the BufferedReader object returned by the
request��s getReader method. To read binary data, use the ServletInputStream
returned by getInputStream.

But the problem is the construction of BufferedReader need another
inputstream!! What should I do??

Thanks a lot for your help.

--
***********************
THE TRUTH IS OUT THERE
***********************
Technical Details
Message-ID: <3cbbece2_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!netnews.com!xfer02.netnews.com!feed.cgocable.net!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,6b7f0acc204b911f,start
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,6b7f0acc204b911f,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2002-04-16 02:31:46 PST
From: "Angry Orca" <luke@email.newpalm.com>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language
Subject: How to get content of a text file from client post by web page
Date: Tue, 16 Apr 2002 17:20:28 +0800
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 202.108.48.186
Message-ID: <3cbbece2_1@dnews>
X-Trace: dnews 1018948834 202.108.48.186 (16 Apr 2002 02:20:34 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!netnews.com!xfer02.netnews.com!feed.cgocable.net!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews