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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:51:59+00:00 2026-06-01T03:51:59+00:00

I am creating an application which produces some files/directories in my WebContent folder and

  • 0

I am creating an application which produces some files/directories in my WebContent folder and I would like Tomcat to serve these static files (logs of some background jobs).

However Tomcat does not seem to recognize new files (maybe files in new folders), and it keeps returning 404 for them. After Tomcat restart, the files are served Ok.

I am using Tomcat 7.0, form within the Eclipse. The files are served by the default servlet.

I assume that Tomcat somehow traverses WebContent initially and it just uses this cached list of files for faster operation. Is there a way to disable such a behavior (or maybe: what is the right way to serve new files generated by other processes)?

Thanks for help/suggestions. I am quite newbie to Tomcat, so I might be overlooking something basic.

Update (based on accepted solution)

There seems to be some duality in the webapp folder. One is in the Eclipse project (and is returned by getServletContext().getRealPath, the other is by default somewhere in Eclipse metadata and can be seen in launch config in wtp.deploy property. The files are somehow copied from Eclipse to the deploy dir. When I started to generate my files under wtp.deploy, the problem got fixed.

However, I still don’t know, how to solve this in proper way, which will work both under Eclipse WTP and in normal Tomcat conditions.

Update

The final solution was to avoid DefaultServlet at all. I used FileServlet based on http://balusc.blogspot.com/2009/02/fileservlet-supporting-resume-and.html and it works fine.

  • 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-01T03:52:00+00:00Added an answer on June 1, 2026 at 3:52 am

    I had similar experince with Netbeans- it usually places compiled files into new folder and works with that folder. Not sure if that’s the case with you; but files should be available if placed in the right folder.

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

Sidebar

Related Questions

I am attempting to create an application which, at some point, I would like
I am creating small django application which holds some few questions (and answers for
I'm creating an iPad application which needs a UIPopoverController like this one (I mean,
I am creating an application which will expire after some particular time limit. means
I am currently creating a application and would like to add a AJAX feature,
I'm creating an application which has a home screen that looks like the native
I'm creating an application which communicates with the device via FT2232H USB/RS232 converter. For
I am creating an application which tracks the users location using GPS, stores the
I am creating an application which involves so many web-service calls. I am using
I am creating Facebook application which get insights for user's page for multiple metric.

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.