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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:15:22+00:00 2026-05-26T04:15:22+00:00

I am developing a small web application application. The objective is to create one

  • 0

I am developing a small web application application. The objective is to create one welcome index.html page with Ajax + one servlet to handle ajax requests.

Although I thought I would be fine with a web.xml only, I don’t want to deploy to /, but to /MyApp. NetBeans’s project properties offers options to set a context path, which helps me deploying to /MyApp. However, it automatically adds a /META-INF/context.xml file, which is a bit confusing.

My questions are:

1) Do I really need a context.xml file do deploy to /MyApp instead of /?

2) If answer to 1) is no, how to accomplish the same with web.xml only?

3) What is exactly context.xml to web.xml?

  • 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-26T04:15:22+00:00Added an answer on May 26, 2026 at 4:15 am

    /META-INF/context.xml is a Tomcat-specific config file. It’s used to configure how your app is deployed to Tomcat, including, among other things, the context path at which it exists. Other containers have similar files that can be included in a WAR for container configuration. To answer your questions:

    1. No. The embedded context.xml is only one way to set the context path, and as I indicated, it’ll only work in Tomcat. In Tomcat, default behavior is to deploy webapps to a context that has the name of the war file, without the “.war” extension.
    2. You can’t set a context path in web.xml. That’s your application’s deployment descriptor. It configures your application, and the context path is external to your app. It belongs to the server/container you’re deploying the app to. Configuring a context path is always done in the container’s configuration.
    3. If by “config.xml”, you meant “context.xml”, then I think I’ve already answered that. If not, clarify your question.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a small email web application in JSP/Javascript/html. It has a logout
I am developing a small intranet based web application. I have YSlow installed and
I'm developing a small utility application that needs to detect whether another one has
I am developing a small, internal-use only web application. Given its simple nature and
I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin
I'm developing a small web application in ASP.Net (framework version 3.5) using VS2008 and
I am developing a small web application using cherrypy and I would like to
Let's say we are developing an E-Commerce Web application for a small to medium
I'm working at a small company and we are developing a web application. With
I am developing a small web application that uses jquery's drag and drop. Problem

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.