I guess u r issue can easily solved by instead u use JSP.. and ask the Form to submit the information to the same jsp itself.
Hope the following code helps.. Name this file as simple.jsp <%@ page import="java.sql.*, java.io.*" %> <html> <body > <form action="http://localhost/samples/simple.jsp " method="post"> <input type="text" name="T1" size="31"> <% String reqParam=request.getParameter("parameterName "); if reqParam=="some value" { out.println(" some thing "); } else{ out.println(" some other thing "); } %> <input type="submit" value="Submit" name="B1"> </form > </body> </html > Sorry if this solution is off the track :( Aroon -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of Gehan G. Sent: Thursday, May 16, 2002 8:49 AM To: [EMAIL PROTECTED] Subject: Re: HTML read question 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 ___________________________________________________________________________ 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
