Whenever I try to comply the following servlet I am getting this error: ERROR:-------------- SimpleBean.java:6: Public class FileUploadBean must be defined in a file called "FileUploadBean.java". public class FileUploadBean { ERROR-----------------
What am I doing wrong? Thanks CODE------------------- import java.io.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletInputStream; public class FileUploadBean{ public void doUpload(HttpServletRequest request) throws IOException { PrintWriter pw = new PrintWriter( new BufferedWriter(new FileWriter("Demo.out"))); ServletInputStream in = request.getInputStream(); int i = in.read(); while (i != -1) { pw.print((char) i); i = in.read(); } pw.close(); } } ___________________________________________________________________________ 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