• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

web.xml DD not mapping fake name to actual class

 
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 7590
177
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 7590
177
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
reply
    Bookmark Topic Watch Topic
  • New Topic