How we set to the image list in Servlet?

Asked By 0 points N/A Posted on -
qa-featured

Hi

I have to show (say user: "A") images, while user "A" chooses his profile from a list of users in jsp. Technologies are used here like Spring, Hibernate, Jsp, Servlet, Ajax, Jquery. But the conditions are:

When a user “A” go for his/her profile from the drop down lists, it will show his/her profile page with a photo of his/her. When a user B picks his/her profile from the drop down lists, it will show his/her profile page with a photo of his/her and so on.

 

In a server drive, every user’s photo is located with a unique ID. The IDs are being sent from Jsp to Servlet.

Servlet gets the ID and investigates on the server directory where thousands of images are loaded. (Images name are exactly the same as ID)

How we set to the image list in Servlet and fix to the server drive?

Is here any other way to find the image against the known unique ID?

Please help me. Thanks.

 

SHARE
Answered By 10 points N/A #97934

How we set to the image list in Servlet?

qa-featured

 

A unique key is used for each of the user using the services. This key is related to used that helps to maintain the record of the user it can be a user ID or some other user info. You can set a key for each user on the server and on other machines to get and set data for a specific user. This key is used as a unique number to see the user accounts. Once assigned it never changes and it can not be assigned to other users on the same system. Then each picture will be on the unique id and will display the data  of user once that key is used in the system. 
 
You can assign a unique number to each image and then you will be able to set it with the user ID there must be some data related to the image or can change it to a key and then you will be able to store your pictures. 
 
 
Michal joran.

Related Questions