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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:00:45+00:00 2026-06-12T01:00:45+00:00

We have a web application that allows users to upload photos which will then

  • 0

We have a web application that allows users to upload photos which will then be displayed in a specified page after upload. The upload module places the images inside the exploded war directory, e.g. webapp-root/uploads/ such that once the image is uploaded, it can be viewed instantly, as in http://mydomain.com/uploads/123.png.

This was working with one application server, but as it turns out, we were to deploy this app to 2 load-balanced servers. So I coded a quick file-sync module that syncs files between servers using FTP, whenever users upload images. Basically when a user uploads an image on server1/uploads/, I immediately copy it via FTP to server2/uploads/.

Edit (added upload process): The upload goes something like this:

  • User selects and submits image
  • Server saves file in server1/uploads/
  • Background thread does an FTP sync from server1 to server2/uploads/ (done async)
  • Vice versa for server2

At this point, I’m running into problems.

The url http://mydomain.com uses a hardware load balancer to point to either server1 or server2. If a user uploads an image test-image.png to server1 (which is then synced to server2), I assume that I can access the image through http://mydomain.com/uploads/test-image.png regardless of whether the load balancer directs me to server1 or server2.

This isn’t the case however. Continuing with the example, an image uploaded when the domain is pointed to server1 can only be viewed when http://mydomain.com/uploads/test-image.png is redirected to server1, and it appears as a broken link if a second user accesses the same url but the load balancer directs him to server2.

So it seems like JBoss isn’t refreshing the second server whenever I FTP-copy an image inside its war directory. Which is kind of weird since if I upload an image to server1, the JBoss instance on that server serves up the image file without any problems.

Any way to manually tell JBoss that “hey, we have a new image file here”?

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

    I’ve narrowed the issue to corrupted files on the receiving server. It would seem like the file permissions/encryption on the particular drive are preventing my FTP server from copying the images successfully which is why all my synced images cannot be viewed in any image viewer.

    I’ll have to try and resolve these user permission problems. Meanwhile I’ll keep this question open in case anyone can shed some more light on other probable causes.

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

Sidebar

Related Questions

Let say, I have a web application that allows users to upload images and
I have a ASP.NET web application that allows end users to upload a file.
I have a web application that allows users to upload certain documents relevant to
We have created a web application, using ASP.NET, that allows users to upload documents
I have a web application that allows users to enter search criteria and the
I have a web application that allows users to create an account, and in
I have a web application that allows users to build a 'client list.' We
I have a web service which allows the users to upload and keep track
We have an asp.net application that allows users to upload files, the files are
I have a web application that allows a user to upload an Excel spreadsheet

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.