• 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

Basic Question-hfsj-scwcd

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I tried running the basic form.html as per Head First SCWCD (Page 77). The step4 instructs to put web.xml under ../WEB-INF to test form.html. But with web.xml in place, Apache Tomcat(7.0.23) gives the following error

type Status report

message /Beer-v1/form.html

description The requested resource (/Beer-v1/form.html) is not available.
--------------------------------------------------------------------------------------
When I delete the file web.xml (not directory WEN-INF), it works fine. The page can be accessed.

Is it because the resource requested is .html and Apcache Tomcat's Web Server doesn't need web.xml but if it is available it fails to access the html resource?
Can somebody please explain this?

Thanks,
Ajit
 
Greenhorn
Posts: 1
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tries do so,

<form action="${pageContext.request.contextPath}/ServetName" method="post">
<div align="center">
</div>
<div align="center">
<br /><input type="submit" value="Submit" />
</div>
</form>

The secret is in ${pageContext.request.contextPath}
 
reply
    Bookmark Topic Watch Topic
  • New Topic