I'm having trouble serving up a fairly simple embedded applet from the
O'reilly Servlet Programming tutorials.

Tomcat can't seem to find the applet that I request from loginpage.html
using this line of HTML.
<applet CODE="DaytimeApplet" CODEBASE="/" WIDTH=300 HEIGHT=180></applet>

The HTML page is served just fine, but both IE and Netscape seem to bring up
an empty applet. I see the Sun logo in the browser so I am assuming it's a
Tomcat config issue and not a local client problem.

Does Tomcat expect applets to reside next to servlets in the WEB-INF/classes
directory? I can't seem to find much documentation and Tomcat and the
<applet> tag.

This was the web.xml IN used for the example above. It was my best guess. I
scanned the DTD but didn't find the relevant ELEMENTS or ATTRIBUTES.

<web-app>
  <servlet>
    <servlet-name>DT</servlet-name>
    <servlet-class>DaytimeApplet</servlet-class>
  </servlet>
  <servlet-mapping>
     <servlet-name>DT</servlet-name>
     <url-pattern>/DaytimeApplet</url-pattern>
  </servlet-mapping>
</web-app>


Tomcat version 4.1.27 gave me this output with debug=99

2003-12-22 13:24:52 StandardHost[localhost]: Mapping request URI
'/loginpage.html'
2003-12-22 13:24:52 StandardHost[localhost]:   Trying the longest context
path prefix
2003-12-22 13:24:52 StandardHost[localhost]:  Mapped to context ''
2003-12-22 13:24:52 StandardHost[localhost]: Mapping request URI
'/DaytimeApplet.class'
2003-12-22 13:24:52 StandardHost[localhost]:   Trying the longest context
path prefix
2003-12-22 13:24:52 StandardHost[localhost]:  Mapped to context ''
2003-12-22 13:24:52 StandardHost[localhost]: Mapping request URI
'/DaytimeApplet.class'
2003-12-22 13:24:52 StandardHost[localhost]:   Trying the longest context
path prefix
2003-12-22 13:24:52 StandardHost[localhost]:  Mapped to context ''
2003-12-22 13:24:57 HostConfig[localhost]: Deploying discovered web
applications


TIA,

Mike C



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to