I created the following in the web.xml file. <servlet> <servlet-name>PPage</servlet-name> <servlet-class>/AlamuServlet.coreservlet.ch04.ProtectedPage </servlet-class> <init-param> <param-name>passFile</param-name> <param-value> D:\\tomcat\\jakarta-tomcat\\webapps\\examples\\WEB- INF\\classes\\passwords.properties</param-value> </init-param> </servlet>
<servlet-mapping> <servlet-name>PPage</servlet-name> <url-pattern>/AlamuServlet.coreservlet.ch04.PPage </url-pattern> </servlet-mapping> I tried to type in the URL window of the browser as: http://10.10.21.112:8080/examples/servlet/AlamuServlet.coreservlet.ch04.ProtectedPage I get the following error: Error: 503 Location: /examples/servlet/AlamuServlet.coreservlet.ch04.ProtectedPage Any suggestions would be helpful.
Alamu, I just had a glance at your web.xml content. Why there is a forward slash in 3rd line. I think we should remove the slash. <servlet-class>/AlamuServlet.coreservlet.ch04.ProtectedPage regds maha anna
Alamu Vinai
Greenhorn
Joined: Feb 01, 2001
Posts: 19
posted
0
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.
Did you put your PPage.class file like this? //sample C:\jakarta-tomcat\webapps\examples\WEB-INF\classes\AlamuServlet\coreservlet\ch04\PPage.class regds maha anna
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.