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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:31:19+00:00 2026-06-03T03:31:19+00:00

I am using icefaces, ace:fileEntry component for uploading files from client and those files

  • 0

I am using icefaces, ace:fileEntry component for uploading files from client and those files are being saved in file system, also I have my managedBean marked as sessionScope and it make sense that when user logs out and then log in back, he/she will not see their uploaded files.

I want to do two things:

  1. When user uploads file then I want to save that file to database also along with user Id or user session information.
  2. When user logs out and logs back in again then he/she should be able to see his/her uploaded files, currently files are not saved after user logs out?
  3. User can only see his or her uploaded files and not any random files.

My approach:

I am thinking of creating new table in database with file id, user id and file and so when file gets uploaded from client using ace fileEntry component then via my Hibernate, I would save file and user related information that I get from session to database, now when user logs out and logins back, I make query to database table with userId to get all his or her files.

Any thoughts or better suggestions for implementing this feature?

  • 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-03T03:31:20+00:00Added an answer on June 3, 2026 at 3:31 am

    Create a separate subfolder for every user based on user ID.

    /var/webapp/uploads/[userid]
    

    You can use File#mkdir() to create a subfolder if necessary.

    File uploads = new File("/var/webapp/uploads");
    File userUploads = new File(uploads, String.valueOf(user.getId()));
    userUploads.mkdir();
    // ...
    

    Then to get all uploaded files afterwards, just do

    File[] allUserUploads = userUploads.listFiles();
    // ...
    

    This way you don’t need another DB table and the users will always only see their own files.

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

Sidebar

Related Questions

I am using Icefaces for webapplication development. I wish to read a file from
i am using icefaces select on menu to select a user from list of
I'm using the inputRichText component for composing HTML-formatted messages in a system I'm working
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
I am using JSF 2.1 and ICEFaces 2 and I have a tabset like:
I have a JSF 1.2 dataTable using ICEfaces 1.8. In one column, I would
I am using seam with tomcate and icefaces the problem is when I inject
Resources folder containing js and css file from javax.faces.resource is not referenced in my
I'm working on an ICEfaces 3 application and I have the following XHTML file:
I'm using ICEFaces. I have datatable with multiple columns. One I load the page

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.