File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes 503 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "503 error" Watch "503 error" New topic
Author

503 error

Alamu Vinai
Greenhorn

Joined: Feb 01, 2001
Posts: 19
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

Joined: Jan 31, 2000
Posts: 1467
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
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

Joined: Feb 01, 2001
Posts: 19
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

Joined: Jan 31, 2000
Posts: 1467
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://aspose.com/file-tools
 
subject: 503 error