On Tue, 24 Oct 2000, Heakyung Park wrote:
> So you mean the reason I am having the problem is due to my code? No other
> possible reason?
>
> The following is the servlet code to display java applet;
> import java.io.*;
> import javax.servlet.*;
> public class gan extends GenericServlet {
> public void service (ServletRequest request, ServletResponse
> response) throws ServletException, IOException {
> response.setContentType("text/html");
> PrintWriter pw = response.getWriter();
> pw.println("<html><head><title>Gentt Chart</title></head><body>");
> pw.println("<h1>Project Schedule in Gantt Chart</h1>");
> pw.println("<applet code=\"gantt\" width=500 height=500></applet>");
> pw.println("</body></html>");
> pw.close();
> }
> }
[ ... ]
I suspect the problem is that the browser cannot find the applet code
to (down)load. The way you have it above, the applet code is expected
to be in the same "directory" as the html page, but that html was
generated by a servlet, so it's in the servlet virtual directory. I
think you need to specify a directory via the CODEBASE attribute on
the APPLET tag that will tell the browser where to find the applet
code. (The exact value of which depends on where the applet code is.)
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
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