• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

503 error

 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alamu Vinai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, it's my typing error on posting.

Actual url was http://10.10.21.112:8080/examples/servlet/AlamuServlet.coreservlet.ch04.PPage
Even Now, it does not seem to work.
Thanks for the reply.
Alamu.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic