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 Requested resource() not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Requested resource() not found" Watch "Requested resource() not found" New topic
Author

Requested resource() not found

Suhas Aithal
Greenhorn

Joined: Aug 10, 2011
Posts: 7
Hi,
I'm totally new to this. I've started head first servlets and Jsp, and am having trouble with very first example Beer-v1. I've done everything as the book suggested. Form.html is working on tomcat, but when i click submit and reroute to servlet i get Error 404 resource not found error. I have compiled and placed the BeerSelect.class file at "webapps\Beer-v1\WEB-INF\Classes\com\example\web" in the tomcat folder.

I've seen my topics related to this, and i've tried all the suggestions. Still i'm getting the same error message.

I'm using jdk1.6.0_18, installed in C: drive, program files.. Appropriate class path have been set.
tomcat version is apache-tomcat-6.0.32, its installed in F: drive.. Is this causing any problem? should i install tomcat in C: drive itself?


stupid question right?? yeah thats me..
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
Darth Noob wrote:Is this causing any problem? should i install tomcat in C: drive itself?

That should not be a problem.
Please post your code here so that people can help. Also give the URL you are using
Suhas Aithal
Greenhorn

Joined: Aug 10, 2011
Posts: 7
this is the Html form: its in the folder "tomcat_home/webapps/Beer-v1/"


this is the web.xml file : its in the folder "tomcat_home/webapps/Beer-v1/WEB-INF/"


I get the Tmcat home page when i use this url in my browser "http://localhost:8080"

i'm trying to run this application using this url: "http://localhost:8080/Beer-v1/form.html"

Html form gets displayed, but when i hit submit i get the error report.

i've compiled the servlet and placed the BeerSelect.class file at :" tomcat_home\webapps\Beer-v1\WEB-INF\Classes\com\example\web\" folder.

please help, as i have no clue what so ever on whats happening
Rameshwar Soni
Ranch Hand

Joined: Feb 03, 2011
Posts: 247
hi i am also new to java, i also don't find anything wrong...i don't know why the servlet is not being called when everything is correct ??? Ya but the <body> tag in the HTML file is not closed properly .......it should be </body> and you have written <?body> I don't know whether this has any affect.but i am just pointing it out
Suhas Aithal
Greenhorn

Joined: Aug 10, 2011
Posts: 7
Thanks for pointing it out.. that is exactly the type of mistakes i do and the reason i call myself as Darth Noob. As you said it does not make any difference. I'm still getting the same error.

I've seen many threads with this same problem and i dont find any conclusive solutions for this. Its been 2 days since i'm stuck here.
You are the experts and i'm just a noob, please tell me where i messed up.. I want to get this over with as soon as possible and then head over to struts and springs. phew talk about climbing mt.everest in a day.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
:" tomcat_home\webapps\Beer-v1\WEB-INF\Classes\com\example\web\" folder.


Did you really use Classes - Java is case sensitive, try classes

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Requested resource() not found
 
Similar Threads
Tomcat WebApp Deployment
HFS: Problem with deploying and testing Beer-v1 App
Problems with the Example from HF Servlets & JSP in Chapter 3
Application not Available
Package does not exist ?