File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Requested Resource() not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Requested Resource() not available" Watch "Requested Resource() not available" New topic
Author

Requested Resource() not available

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Hi !
I am getting the error of "requested resource not available" while trying out the code of HFSJ pg. 30.
I had the same problem earlier, but it worked after I changed the coding from encoding="ISO-8851-1" to encoding="ISO-8859-1".
Some one had mentiioned that earlier in java ranch.
I know, usually this problem occurs when there is some problem with the web.xml file or mapping.

Tried checking everything including the location of the files and all ,but still couldnt get it right.
Can any one help me to what I may be overlooking..

My web.xml file is


Location for the web.xml file is C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ch1\WEB-INF
Location for Ch1Servlet.java files is C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ch1\WEB-INF\classes

I read a number of posts which had exactly the same problem but still couldn't find the solution for mine

thanks!


The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Frank Eichfelder
Ranch Hand

Joined: Aug 25, 2003
Posts: 33
Can you see in your Tomcat logs whether your application was deployed correctly after Tomcat startup?
Which url do you enter in your browser to call your servlet?
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3851

First of all it's good to have the classes (or servlets) in a user defined package rather than default. And how are you accessing the servlet (URL in the browser)?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
My url to access the servlet is http://localhost:8080/ch1/Serv1
I am not sure how to access the Tomcat Log .
If some one can help me , may be i can check it out ..
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3851

Change url pattern to /Serv1 in web.xml. Restart the context and chaeck again.
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
I tried that as well ...
It didn't work
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3851

Have you move the servlet to a package and try it with all the necessary modifications in web.xml?
Frank Eichfelder
Ranch Hand

Joined: Aug 25, 2003
Posts: 33
You can find the log files in the directory C:\Program Files\Apache Software Foundation\Tomcat 5.5\logs.
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Well, I haven;t tried moving to a different package... I am still new at this and haven't gotten a hang of it. I have more chances of messing up trying something new ,when I am unable to get the stuff written on the book right!
I checked out the logs - looked ok to me (not sure what i was supposed to be looking for )
but from what i did make out it looked fine...


Anway, I ll just keep searching tilll i find the error
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Can some one tell me how to delete a post!?!
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
I got it right!!!

I think i had two different web.xml files , and I was looking at the wrong one!


Thanks alot for all your suggestions!
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3851

Glad you solve it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Requested Resource() not available