• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Requested resource() not found

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

:" tomcat_home\webapps\Beer-v1\WEB-INF\Classes\com\example\web\" folder.



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

Bill
 
I didn't like the taste of tongue and it didn't like the taste of me. I will now try this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic