Win a copy of Rust Web Development this week in the Other Languages forum!
    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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

resource not available

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi I am having a bit of a problem that I can't seem to figure out. I have Java SE 6, tomcat 6 installed on ubuntu 9.04 and have been working through the head first servlets & jsp book. I have got to ch 3 and attempted the mini mvc tutorial but I get the following error when I submit the form.

type Status report

message /beer-example/Select.do

description The requested resource (/beer-example/Select.do) is not available.

I have the following web.xml file


I have the following directory structure under webapps/beer-example
form.html
WEB-INF
|_ web.xml
classes
|_ com
|_ example
|_web
|_ BeerSelect.class

form.html is returned fine and I am able to select an option and submit it which gives me the error above.

and just for completeness the source for BeerSelect.java


I have had a look around and come across a few possibilities including something about the invoker servlet. As far as I can see the mapping should work, any help.
 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Welcome to Java Ranch!

As far as I can see the mapping should work


You have a mapping mismatch in your Servlet. You make a request for 'Select.do' where in the DD it is declared 'SelectBeer.do'
 
Leon Glass
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

ahmed yehia wrote:Welcome to Java Ranch!

As far as I can see the mapping should work


You have a mapping mismatch in your Servlet. You make a request for 'Select.do' where in the DD it is declared 'SelectBeer.do'

Well I should have seen that. Thanks
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I am having the same problem but i have rechecked and there is no mismatch error
but the error i returned is:
type Status report

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

description The requested resource (/beerv1/%E2%80%9DSelectBeer.do%E2%80%9D) is not available.
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic