• 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

Resource not available

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was trying the example given in head first servlets & jsp book in the ch 3(mini mvc tutorial).
the form .html is working fine but when i click the submit button the following error is returned...

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.
files are as follows..
form.html


web.xml


BeerSelect.java

I have the following directory structure under webapps/beerv1
form.html
WEB-INF
|_ web.xml
classes
|_ com
|_ example
|_web
|_ BeerSelect.class
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ankur tyagi wrote:

classes
|_ com
|_ example
|_web
|_ BeerSelect.class



you mean the class file is in web folder which under com/example ?

try this : <form method=”POST” action=”${pageContext.request.contextPath}SelectBeer.do”>

 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, that is how it was supposed to be...
i tried the way you said but the problem still exists
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sorry!in my previous post, action=”${pageContext.request.contextPath}SelectBeer.do”> it is missing "/" before the SelectBeer.do


 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
still not working....
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm suspicious of the quotes in the HTML page--what did you use to create the file?

My suspicions are even *more* aroused by the nature of the error message--see all those special, URL-encoded characters? See in your post how the quotes in the JSP code are different than in the Java code?

Boo ya!
 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excellent catch man..
i created that file in notepad...
i don't know why that was a problem (different quotes in different editors.)
it works now...after i changed quotes in textpad.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chalk up another victory over those accursed MS "smart" punctuation characters.

reply
    Bookmark Topic Watch Topic
  • New Topic