wood burning stoves*
The moose likes Servlets and the fly likes The requested resource () is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "The requested resource () is not available" Watch "The requested resource () is not available" New topic
Author

The requested resource () is not available

yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
Hi all,
I am writing an servlet app, in webapps folder of Tomcat, build an environment as attachment picture.
But when I started tomcat and type

in the browser, the 404 error occurs "The requested resource () is not available".
Here are my index.html and web.xml




web.xml was put in WEB-INF folder.
I did as guide
please help me!

Much appreciated!


[Thumbnail for untitled.JPG]



I love Mozart (^o^)
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9307
    
  17

Did you write this


or

this?? If its the first case, change it to a forward slash i.e. the one that I showed. Also I'm not sure if this will solve the problem that you are having. Are you sure your applications Context Path is "Test"??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
I typed back slash, but when I did as you told, nothing changed, 404 error did occur
Test is my application name as you can see in the picture
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9307
    
  17

Were there any deployment errors in your app. Which servlet container are you using?? If its tomcat, then can you go at http://localhost:8080/manager/html/ and see if the Test application is actually running or not...
shaiksha vali
Greenhorn

Joined: Jul 12, 2009
Posts: 11
your given the url pattern with (\) don't give with that and try with (/) forward slash.
Even thought it was not working the give url pattern with the root directory ex: /test/print.do
.

404 exception means ClassNotFoundException it is not finding the action path corretlly. Check once
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 688

Hi,

you don't need to explain your other configuration..... you get the error at the first stage... When you start tomcat and simply call your index page you didn't get your index page.... So, I think you made mistake with create your web application.... other configuration comes after make another resource page request...

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
thanks all, I've solved my problem
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: The requested resource () is not available