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 8885503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:19:33+00:00 2026-06-14T21:19:33+00:00

I am a newbie to servlets. I created a dynamic web project in eclipse.

  • 0

I am a newbie to servlets. I created a dynamic web project in eclipse. I have following files in my project

home.html
validateServlet.java

I have defined validated servlet as an action in home.html form. However when I run it, I get http status 404. Below is the hierarchy of my project

Project
Java Resources
   src
     com.servlets
    ValidateServlet.java
build
WebContent
    META-INF
    WEB-INF
        web.xml
    hello.html

Contents of my web.xml are as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>Website</display-name>
<servlet>
<description></description>
<display-name>ValidateServlet</display-name>
<servlet-name>validate</servlet-name>
<servlet-class>com.oracle.coen235.servlets.ValidateServlet</servlet-class>
</servlet>
</web-app>

In my hello.html, action is specified as ,

What might be the issue? I guess I am not able to generate the class file for my servlet. Can anyone guide me through this problem?

  • 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-06-14T21:19:34+00:00Added an answer on June 14, 2026 at 9:19 pm

    You seem to mix things up.

    <servlet-class>com.oracle.coen235.servlets.Validate</servlet-class>
    

    Should list the full class name. I don’t see your package name.

    It should be

    <servlet-class>com.oracle.coen235.servlets.ValidateServlet</servlet-class>
    

    or whatever your package name is.

    We are you mapping your servlet to a path? It should be something like:

     <servlet-mapping>
          <servlet-name>validate</servlet-name>
          <url-pattern>/validate</url-pattern>
     </servlet-mapping>
    

    or an annotation directly in your servlet class.

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

Sidebar

Related Questions

I am a newbie to Java Web Application development. So far all I have
Newbie question... The objective: I intend to have an HTML text input field as
Newbie question: There are three types of Asp.Net controls : HTML server controls, Web
newbie doing Java homework here. I have one class named Album which contains the
I've just started working on servlets and i'm a newbie. I have developed a
I am a newbie to Hibernate. I have a school project using MySQL, JDBC,
I've just started working on servlets and i'm a newbie. I have developed a
I am a newbie to writing JSPs. In my JSP I have dynamically created
I am a newbie trying to create a sample web application using; MySQL Java
I'm a newbie when it comes to Java for web application stuff, so forgive

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.