Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:04:40+00:00 2026-05-15T23:04:40+00:00

I am making a small website as my first project. I have finalized to

  • 0

I am making a small website as my first project. I have finalized to use Java Servlets and JSP for my Server-side scripting. I am learning it from O’Reilly’s HeadFirst Servlets and JSP. I decided to use Apache-Tomcat as my web server and container. I downloaded it. I even have jdk 1.6 update 21.
I unzipped apache in C:
It is running successfully as i get the default Tomcat home page when I type http://localhost:8080 in my browser.

In chapter 3 there is a small project called beer.
So I tried to make it.
I created a directory called beer under webapps C:\apache-tomcat-7.0.0\webapps\beer. Inside it to just check the basics I created a html file called form.html. But when I try to access it via the browser http://localhost:8080/beer/form.html I get the following error:

HTTP Status 404 – /beer/form.html

type Status report

message /beer/form.html

description The requested resource
(/beer/form.html) is not available.

Apache Tomcat/7.0.0

I have even tried using tomcat 6, but to no use.


Thank you for replying…
Actually my doubt is..that here i am trying to access a .html file which is not a servlet so does it even require a Deployment description????

well, there is only 1 servlet i planned to make (initially)….the one which is mentioned in the form (action= “….”) in the html file i made….
so i thought of checking the basic html file before i deployed a servlet….btw…if i have to include the html file also in the DD, then what should i write in place of ServletName in the xml code u gave?
here are the contents of my web.xml (i modified it as u said…but dunno what to write in the Servlet Name)

<?xml version="1.0" encoding="utf-8"?>
 <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>
        <servlet-name>html page</servlet-name>
        <servlet-class>form</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>html page</servlet-name>
      <url-pattern>/beer/form.html</url-pattern>
   </servlet-mapping>


    <servlet>
        <servlet-name>Ch3 Beer</servlet-name>
        <servlet-class>com.example.web.BeerSelect</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Ch3 Beer</servlet-name>
        <url-pattern>/SelectBeer.do</url-pattern>
    </servlet-mapping>
</web-app>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:04:40+00:00Added an answer on May 15, 2026 at 11:04 pm

    It should work just fine. Probably a typo in URL or filename. It’s case sensitive as well. /Beer is not the same as /beer. Doublecheck the URL. Also, don’t you have multiple instances of Tomcat running or extracted from the downloaded zip? You might have placed the new page in the wrong one and/or be running the wrong one. Try shutting down the Tomcat instance you think you’re running and reload the homepage in the webbrowser. If the homepage doesn’t disappear, then it’s a different one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a small calculator (just for JavaScript learning) and I have two
I am designing a small website using HTML + JSP. This is my first
I am making the small finance management website in php. I have to store
I have a posts controller on a small test website I'm making. I want
I am making a small section of an app (phone and website) that can
I'm making a small system for personal use on that I want to handle
I am current making some small JS game in Netbeans and I have started
I developed a (small) company website in Visual Studio, and I'm addicted to learning
I'm making a small website and I'm very new to CSS but whenever I
As I was working on a small website, I decided to use the PageSpeed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.