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

  • SEARCH
  • Home
  • 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 6764237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:34:13+00:00 2026-05-26T14:34:13+00:00

Just creating my first IntelliJ web application that runs on tomcat. The project ran

  • 0

Just creating my first IntelliJ web application that runs on tomcat.

The project ran fine, and it rendered the index.jsp just fine.

How come the index.jsp rendered even though the web.xml doesn’t have a reference to it btw? Does it first look for psychical files (.jsp’s), if present, it executes them? Or is web.xml just for servlets?

The real issue was I created a TestServlet in my /src folder, and it can’t seem to find the javax.servlet jar:

package javax.servlet.http does not exist

Reference:

web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
          http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
           version="2.5">

    <servlet>
        <display-name>Test1</display-name>
        <servlet-name>TestServlet</servlet-name>
        <servlet-class>TestServlet</servlet-class>
    </servlet>
</web-app>

TestServlet.java:

import java.io.IOException;

package hello_world.Servlets

/**
 * Created by IntelliJ IDEA.
 * User: snad
 * Date: Oct 29, 2011
 * Time: 9:19:27 AM
 * To change this template use File | Settings | File Templates.
 */
public class TestServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {

    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {

    }
}
  • 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-26T14:34:13+00:00Added an answer on May 26, 2026 at 2:34 pm
    • You are missing the servlet-api.jar on your build path.
    • jsp’s are picked automatically without the need to register them. web.xml is for servlets, filters, listeners and other settings.
    • Don’t use the default package. Always give a package to your classes. So it better be test.TestServlet
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just finished creating my first major application in C#/Silverlight. In the end the
I am just simply creating a web application. I wanted to insert a line
I'm creating my first project with ASP. This project is just making a basic
I'm just starting C#, and creating my first game, but just ran into a
I just found myself creating a class called InstructionBuilderFactoryMapFactory. That's 4 pattern suffixes on
I just noticed while creating a RESTful WCF service that the Method parameter on
I am just getting started creating an AJAX application using server side push. I
I've just started creating my first MVC website; what's the best practice to prevent
I'm currently creating my first Chrome extension, so far so good. It's just a
I'm creating my first linq based project. The DAL consists of LinqToSQL classes. And

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.