Olá,
Tenho um applet no seguinte diretório:
c:jdk1.3.0_01in
Tenho um servlet no seguinte diretório:
c: omcatjakarta-tomcat-4.0.5webappsexamplesweb-infclasses
Quero que meu servlet execute esse applet, então coloquei a seguinte instrução:
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
char aspa=’"’;
PrintWriter output;
res.setContentType(“text/html”);
output = res.getWriter();
StringBuffer buf = new StringBuffer();
buf.append("<html><head><title>
");
buf.append(“Titulo
“);
buf.append(”</title></head>
“);
buf.append(”<applet code=+aspa+nomeapplet.class+aspa width=750 height=250>
“);
buf.append(”</applet></html>”);
output.println(buf.toString());
output.close();
}
Quando executo esse servlet o browser não encontra meu applet (nomeapplet notinitied).
Se coloque o path (c:jdk1.3.0_01in) do applet dentro do servlet, ele não compila (dá erro de caracter ilegal).
Como faço pro servlet indicar o caminho do applet?