File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Requested resource is not available in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Requested resource is not available in Tomcat" Watch "Requested resource is not available in Tomcat" New topic

Requested resource is not available in Tomcat

Tim Moores

Joined: Sep 21, 2011
Posts: 2417
If you configure the servlet for URL "/Login", then trying to access it at "/Login/Login" is not going to work. Change the action attribute of the HTML form accordingly.

(Edit: looks like there is a bug in the forum software that lists this posts ahead of the others...)
charishma chitti

Joined: Nov 06, 2011
Posts: 1

I have a simple servlet application where a HTML login form directs to my servlet. I have placed the Login app in webapps under Tomcat. Widin Login app , I have created login.html and WEB-INF dir wid web.xml & classes dir. Ihave placed the corresponding servlet class loginsvlt.class in classes directory.


<?xml version="1.0" encoding="UTF-8" ?>

<web-app xmlns=""

<display-name>Login Application</display-name>
This is a simple web application with a source code organization
based on the recommendations of the Application Developer's Guide.




As I dont have any package structure under classes, I have given the servlet-class as loginsvlt.

Started tomcat..http://localhost:8080/Login/login.html

Got 404 error ...Requested resource /Login/Login is not available.

Please help! Im a newbie to servlets. Im struck at this point since yesterday even after restarting tomcat several times.

PS: I have a simple Date application(first app deployed in tomcat) where I followed the same configuration and its working fine.

Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3930

Welcome to JavaRanch.
charishma ps wrote:As I dont have any package structure under classes

You really need to have some packaging structure. Also, you better follow some naming conventions when naming a class - for instance, first letter of every word in the class name must be in upper case. Try packaging your servlet in something like com.pkg, and try using the fully qualified class name under servlet-class element.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
I agree. Here's the link:
subject: Requested resource is not available in Tomcat
It's not a secret anymore!