jQuery in Action, 3rd edition
The moose likes Tomcat and the fly likes HTTP Status 404 - /Beer-v1/form.html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "HTTP Status 404 - /Beer-v1/form.html" Watch "HTTP Status 404 - /Beer-v1/form.html" New topic

HTTP Status 404 - /Beer-v1/form.html

Tom Nishan

Joined: Feb 04, 2011
Posts: 7
HTTP Status 404 - /Beer-v1/form.html

Hello everyone,

I have a problem when I trying to open form.html file.
I installed Tomcat 5.5 and when I run tomcat I can see welcome page.

Tomcat5/webapps/Beer-v1/WEB_INF/web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

<servlet-name>Ch3 Beer</servlet-name>

<servlet-name>Ch3 Beer</servlet-name>



<h1 align="center">Beer Selection Pages</h1>
<form method="POST"
Select beer characteristics<p>
<select name="color" size="1">
<option value="light"> light </option>
<option value="amber"> amber </option>
<option value="brown"> brown </option>
<option value="dark"> dark </option>
<input type="SUBMIT">

Please help. Thank you in advance.
Tom Reilly

Joined: Jun 01, 2010
Posts: 618
What URL are you using to access form.html? And what error are you getting?
Tom Nishan

Joined: Feb 04, 2011
Posts: 7
Thank you for your quick response.
I'm using the following URL:


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Is the context even running? Use the Tomcat Manager app to find ut.

See the Tomcat FAQ if you don't already have the Manager app configured.

[Asking smart questions] [About Bear] [Books by Bear]
ankittt agarwala
Ranch Hand

Joined: Jan 19, 2011
Posts: 42
i think there is a little error in html coding part
you didnot use '>' in form line
..................where is '>'
but besides that there is some more error which is not making you open this page
do one thing if you are able to see the welcome page on entering http://localhost:8080/ then your tomcat is configured rightly
use the latest version of tomcat as it has removed many bugs of previous versions
Tom Nishan

Joined: Feb 04, 2011
Posts: 7
Thank you guys!

I installed Tomcat 7 and I got welcome page.
I still got the same error.

HTTP Status 404 - /Beer-v1/form.html

type Status report

message /Beer-v1/form.html

description The requested resource (/Beer-v1/form.html) is not available.

Apache Tomcat/7.0.5
ankittt agarwala
Ranch Hand

Joined: Jan 19, 2011
Posts: 42
i think your form.html is not a html file actually its a notepad file with name form.html
do you get a webpage on opening it directly by double clicking it??
if yes then do the following thing
write the following code in a notepad file and click save as
there name it as form.html and in type press "all files" and then save it
in tomcat webapps directory make a new folder t and paste the above form.html file in t
now start tomcat and open the link http://localhost:8080/t/form.html
now it should open.

<h1 align ="center">this is a page</h1>
<form method="post"
action ="selecttea.do">
select tea characteristics<p>
<select name ="color" size="1">
<option value="light"> light </option>
<option value="amberr"> amberr </option>
<option value="orange"> orange </option>
<option value="green"> green </option>
<input type="submit">
dont define any xml file thats dd or anything else this is just to check your form.html
remember the form.html should appear to you as only form(without the html extension) in the t directory after saving
Tom Nishan

Joined: Feb 04, 2011
Posts: 7
You were right, Ankittt. I got the result as shown in the book. Thank you Ankittt. I really appreciate it.
I agree. Here's the link: http://aspose.com/file-tools
subject: HTTP Status 404 - /Beer-v1/form.html
It's not a secret anymore!