• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web.xml DD not mapping fake name to actual class

 
Rohit Gaikwad
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i am trying to built and application from head first servlets and jsp 3rd chapter. right now i am no 3rd step where a BeerExpert is sending data to servlet (not yet using jsp).
but i dont know whats going wrong the web.xml is

and when i am deleting <servlet> and <servlet-mapping> tab and placind <welcome-file-list> form.html</> is working fine and displaying the html

i am using tomcat 7 tried the same on eclipse and also on notepad
its giving me error 404 file not found
form.htm


Thanks in advance
 
Tim Moores
Bartender
Posts: 3137
50
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the package really named "com.exapmle.web"?
 
Rohit Gaikwad
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes




Error once clicked Submit button


HTTP Status 404 - /BeerSelect1/%E2%80%9DSelectBeer.do%E2%80%9D


type Status report

message /BeerSelect1/%E2%80%9DSelectBeer.do%E2%80%9D

description The requested resource is not available.
 
Tim Moores
Bartender
Posts: 3137
50
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the package really named "com.exapmle.web"?


yes




It seems "no" would have been more accurate. Small things matter - a typo in your servlet mapping is apparently causing the problem.
 
Rohit Gaikwad
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked it and it was good before but still was getting class not found error
now i am trying this without using Package (default package)
and the web.xml is


error on Tomcat--



Html Index page



BeerSelector class--



And Finally the Console log Stating that class not found
 
Rohit Gaikwad
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the Solution Finally Actually there was Bug in Building work space So followed simple steps
1) Exit Eclips
2) Delete .lock file in workspce\.metadata\.lock
and then tried it again
but really thanks for your help

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic