Sorry for not being clear...
 My intentions are to read the current webpage that the button
resides on. For instance I have a web page with a button at the
bottom, when a user clicks that button I want the servlet to
read that page(including the button) and then append something
to the end... then output the page(with new info)...
 I think I can get the bufferedReader to work.. I'll let you
know if there is any problems. Thanks for your reply...

gehan Gehale

--- Mike Whittaker <[EMAIL PROTECTED]> wrote:
> Do you mean a web page you have access to ie on your server or
> some other
> web page.
> If the former read it in from a BufferedReader
> If the latter you will need to make a URLConnection and read
> it in that way
> eg:
>
>                         InputStream is;
>                         URLConnection uc;
>                         StringBuffer sourceBuffer = new
> StringBuffer();
>                         try{
>                                 URL userUrl = new URL(myURL);
>                                 uc = userUrl.openConnection();
>                                 is = userUrl.openStream();
>                                 BufferedReader in = new
> BufferedReader(new InputStreamReader(is));
>                                 String line = null;
>                                 while((line = in.readLine())
> != null) {
>
> sourceBuffer.append(line);
>                                 }
>                                 is.close();
>                         }
>                         catch(Exception e) {}
>
> You're not being very clear in your intention.
>
> Mike W.
>


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to