Hi:

I can not find where the codes are wrong

//*****************************
package  emailtools;

import  java.io.*;
import  java.net.*;
...
...
public class EmailBean{
...
...
private URL url=new
URL("http://127.0.0.1:8080/examples/jsp/emailtools/test.jsp");

private BufferedReader in=new BufferedReader(new
InputStreamReader(url.openStream()));
....
.....
}
//******************************************

When I complie it, it shows


 EmailBean.java:25: Exception java.net.MalformedURLException can't be
thrown
in initializer.

 private  URL url= new
URL("http://127.0.0.1:8080/examples/jsp/mailtools/testOne.jsp");
^

EmailBean.java:26: Exception java.io.IOException can't be thrown in
initializer.

private   BufferedReader in=new BufferedReader(new
InputStreamReader(url.openStream()));
                                             ^
2 errors



Thanks!

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to