aspose file tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Basic Question-hfsj-scwcd Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Basic Question-hfsj-scwcd" Watch "Basic Question-hfsj-scwcd" New topic
Author

Basic Question-hfsj-scwcd

Ajit Sawant
Ranch Hand

Joined: Nov 26, 2008
Posts: 33
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
Thiago V Palmeir
Greenhorn

Joined: Jul 23, 2012
Posts: 1

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}
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Basic Question-hfsj-scwcd
 
Similar Threads
Head First Servlet JSP: BeerSelect example: requested resource not available
Having trouble doing the first example in SCWCD
FIRST EXAMPLE NOT WORKING..!!
Problems with the Example from HF Servlets & JSP in Chapter 3
Help with Head first sample code