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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:34:11+00:00 2026-05-14T18:34:11+00:00

I have a java web application that generates and displays graphical pictures based upon

  • 0

I have a java web application that generates and displays graphical pictures based upon some user parameters.

I used to store the graphics in the Session map, but that is generally not a good idea (you want to keep the session data as small as possible).

So instead, I only want to generate a file on the server and refer to it via an URL that I will store in the session map.

The question is: How can I remove the generated file after the session expires? I do not want to be stuck with a lot of graphics and I do not like the idea of just cleaning the folder with generated graphics at midnight as a user may be using my website at that time.

It could also be that there are other means to accomplish what I want. I’m interested what’s the best practice for this kind of retrieval from the server.

  • 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-14T18:34:12+00:00Added an answer on May 14, 2026 at 6:34 pm

    Create a session listener HttpSessionListener and remove the file in

     public void sessionDestroyed(HttpSessionEvent se);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java enum that is used in my web application. I also
I have a Java Google App Engine web application that allows user upload of
I have a .Net web application that needs to interact with a Java-based system
I have a web application based on Java/Spring that uses Oracle 11g. Currently, the
We have a Java web service that we call from our application. When we
I have built a web application using Java EE platform that sells one of
i have three java based web application app1,app2 and app3 at production. All 3
I have a Java based web-application using Java Server Faces and Facelets. I am
I have a java web application based on Spring MVC. The task is to
All, I am having some trouble running a java web start application that has

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.