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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:31:20+00:00 2026-06-10T01:31:20+00:00

I have a file upload page that takes a file and parses it. Order

  • 0

I have a file upload page that takes a file and parses it.

Order of Events

  1. user uploads file
  2. uploaded file gets copied
  3. copied file gets it’s encoding checked, with CPDetector
  4. determined encoding from the copied file is used to parse the original uploaded file
    • FileNotFoundException on Solaris Test Server during BufferedReader creation.
  5. copied file is deleted
  6. uploaded file is parsed/verified
  7. parsed data is saved to a database
  8. uploaded file is deleted (I can’t remember if I’m doing this or Tomcat is.)

The Whole process works on my Windows 7 workstation. As noted above it does not work on my Solaris Test Server. Something(I Suspect Tomcat) is deleting the uploaded file before I can finish parsing it.

I’ve watched the directory during the process and an uploaded file does indeed get created, but it lasts less than a second before being deleted. Also It’s supposed to go into /opt/tomcat/ but seems be getting created in the /var/opt/csw/tomcat6/temp/ directory instead.

Thanks for any help

  • 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-10T01:31:21+00:00Added an answer on June 10, 2026 at 1:31 am

    I realize it’s probably bad form to answer my own question like this but I wanted to leave this here in-case it helps someone else.

    The Problem turned out to be How I was accessing the files.

    I had hard-coded file paths, for windows, and Database loaded ones for the test server.
    I switched those to using System.getProperty("catalina.home")+"/temp/" + filename
    I’m also copying the temp file a second time so I end up with:

    Order of Events (changes are in bold)

    1. user uploads file
    2. uploaded file gets copied
    3. copied file gets it’s encoding checked, with CPDetector
    4. uploaded file gets copied again to ensure a copy survives to be parsed
    5. determined encoding from the copied file is used to parse the original uploaded file
    6. copy used for encoding detection is deleted
    7. copy for parse is parsed/verified
    8. parsed data is saved to a database
    9. parsed file is deleted.
    10. uploaded file is deleted (I’m not sure if I’m doing this or Tomcat is.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page where the user can dynamically add file upload boxes. Adding
I have a page where a user can upload a file along with some
I have a very simple page with which a user uploads a file. Using
I am attempting to have a file upload page that allows for an arbitrary
I have a file upload page with an AsyncFileUpload control. When the user browses
In the web page, I have file upload widget. I need to show this
I have a file upload control <input id=File1 type=file /> in my page... How
I have an ASP.NET MVC page with multiple file uploads. After a failed post,
I've got a documents upload page in an MVC3 application that lets the user
I have a vbscript which takes a csv file and uploads its content to

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.