Yuo can intent
                      /  PrintStream out = new PrintStream(res.getOutputStream());

                      �   PrintWriter out = res.getWriter();


Ryan Richards wrote:

> I have been battling this Servlet Applet problem off and on and cannot figure out 
>what is causing this problem. Here is my servlet code:
>
> import javax.servlet.*;
> import javax.servlet.http.*;
> import java.io.*;
>
> public class pageGenerator extends HttpServlet
>                                     implements SingleThreadModel {
>
>   public void init( ServletConfig config ) throws ServletException {
>     super.init(config);
>   }
>
>   public void doGet( HttpServletRequest req,
>                       HttpServletResponse res )
>     throws ServletException, IOException {
>
>         // Setup the stream
>         PrintWriter out = res.getWriter();
>         res.setContentType("text/html");
>
>         out.println(
>           "<HTML>"+
>           "<TITLE>Multiple Well Selection Form</TITLE>"+
>           "<BODY>"+
>            "<CENTER>"+
>             "<APPLET CODE=MultiList.class"+
>               "codebase=\".\""+
>               "width=430"+
>               "height=410>"+
>             "</APPLET>"+
>            "</CENTER>"+
>           "</BODY>"+
>           "</HTML>"
>         );
>         out.close();
>   }
> }
>
> I keep getting this error in java console:
>
> # Applet exception: error: java.lang.ClassFormatError: Bad magic number
>
> If I print the html out as ascii it loads the applet fine!
>
> Any help would be appreicated!
>
> Ryan Richards
> Technical Consultant
> Database Consultants, Inc.
> Oklahoma City, OK
> -----------------------------------------------
> FREE! The World's Best Email Address @email.com
> Reserve your name now at http://www.email.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

Reply via email to