It's correct to put the applet class in webpages subdirectory. I guess you
should
add webpages in your classpath. I tried it, and it works.

liwen

----- Original Message -----
From: "Bo Xu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 29, 2000 11:42 PM
Subject: how to reponse html including a applet ?


> Hi ,
>
> 1.
> In my servlet, I want to response a html including an applet. I wrote the
> following lines in my servlet:
>
> ...
> out.println("<html>\n");
> out.println("<BODY>"+"\n");
> out.println("<P ALIGN=CENTER>"+"\n");
> out.println("<APPLET CODE=myapplet.class WIDTH=300 HEIGHT=300>"+"\n");
> out.println("</APPLET>"+"\n");
> out.println("</BODY>"+"\n");
> out.println("</html>");
> ...
>
>
> 2.
> I use jsdk2.1 and Netscape browser to test my servlet.
>
> 3. But I found the following error in "Java Console" of Netscape:
>
> ...
> # Applet exception: class myapplet could not be loaded
> java.lang.ClassNotFoundException: myapplet
> ...
>
>
> my servlet is in .../jsdk2.1/webpages/WEB-INF/servlets, and
> I have already put myapplet.class in both .../jsdk2.1/webpages
> and .../jsdk2.1/webpages/WEB-INF/servlets.
>
> So could anybody tell me what is the "documentbase" of a
> "response" from a servlet?  where can I put my applet?
>
>
> Thanks very much!
>
>
>
> Bo
> May 29, 2000
>
>
___________________________________________________________________________
> 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