I removed the slash in the file.
In the URL window, I typed in
http://localhost/examples/servlet/AlamuServlet.coreservlet.ch04.PPage It gives me the error
Error: 404
Location: /examples/servlet/AlamuServlet.coreservlet.ch04.PPage
But I changed the web.xml to
<servlet>
<servlet-name>PPage</servlet-name>
<servlet-class>AlamuServlet.coreservlet.ch04.ProtectedPage</servlet-class>
<init-param>
<param-name>passFile</param-name>
<param-value>
D:\\passwords.properties
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>PPage</servlet-name>
<url-pattern>/PPage</url-pattern>
</servlet-mapping>
Instead of the URL
pattern <url-pattern>/AlamuServlet.coreservlet.ch04.PPage</url-pattern>
I changed to
<url-pattern>/PPage</url-pattern>
Anyone know why it does not seem to work within package.
Thanks,
Alamu.