Okay, I did research on this, but alas I need another pair of eyes.
From this page:
http://test.javaranch.com/wiki/view?InvokerServlet In the file conf/web.xml find a section of text that looks like this:
<!-- The mapping for the invoker
servlet -->
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>-->
You need to uncomment the servlet-mapping and then restart
Tomcat to allow all servlets to work.
Yes, I know that this is a security risk, however since I'm going through a textbook that supplies code for many, many servlets... I don't want to add mapping for each of them since this isn't for production (or even development) but for training purposes. However I find myself in a bind-when I save HelloWorld.java and HelloWorld.class file to root/web-inf/classes and then try to call the servlet by:
http://localhost:8080/servlet/HelloWorld I get the infamous: The requested resource (/servlet/HelloWorld) is not available.
so, what could be wrong? I should be correct in assuming that by uncommenting the servlet invoker that I should be able to type in:
http://localhost ort/servlet/servletName and access the servlet, no?
I've been all over the Jakarta site, and to tell you the honest truth,
Java Ranch is a lot more user friendly... which is how I ended up here (again).
I've even tried to place it in the servlets-examples directory, and modified the appropriate web-xml file with the following mapping:
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
and even this:
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>/servlet/HelloWorld</servlet-class>
</servlet>
But still, no love. Unfortunately, its too late at this hour to head out to the bookstore and reference one of the Sun Core
JSP and Servlet texts, so I thought to ask here. Any ideas?
Thanks,
Michael