try this.......
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public class AppletInServlet extends HttpServlet
{
String code="AppletToServlet.class";
public void init(ServletConfig config) throws ServletException
{
System.out.println("Servlet entered");
super.init();
}
public void service(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException
{
PrintWriter out=response.getWriter();
out.println("<html><body><applet code=\""+code+"\" codebase=\"/\" width=200 height=200></applet></body></html>");
}
}
note that i have place the AppletToServlet.class file in my servlets directory in JWS2.0 . if that is not to be done, you may need to alter your codebase path.
hope this helps
regds
chetan