Hi,
I compiled everything and run it in
Tomcat , I got this in the
java console:
Curses! Foiled again: java.io.FileNotFoundException:
http://localhost:8080/appletservlet/PipelineServlet
Applet is loading perfectly, but the URL is not being found...
In older Tomcat, your applet could access the Servlet like this:
http://localhost:8080/appletservlet/servlet/PipelineServlet
but now make web.xml file placed in WEB-INF folder like:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>PipelineServlet</servlet-name>
<servlet-class>PipelineServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PipelineServlet</servlet-name>
<url-pattern>/PipelineServlet</url-pattern>
</servlet-mapping>
</web-app>
And your applet is now accessing the servlet.
the output on Applet and tomcat comand prompt, once you press button is:
s--->!noooooopS zes kciT ehT
pressing again gives:
s--->The Tick sez Spoooooon!
...and you can continue as long as you want.
Morale of the story:
>>>
Set your paths, fellas!
Thanks,
Maki Jav