java - storing image as physical file on server -


i getting problem in storing images fetched url.the problem store image on server , path given on database.how store images on server physical files , later on retrieve image on jsp page.

you should make folder in project, use folder store physical files , give path in action.

online example here store image database specific folder.

download code here - project url

your modification not store in db store in folder, example if have stored files in folder "images"

system.out.println(request.getrealpath("/")+"images\"+"yourfilename"+".jpg");

above code give path of physical path on server.

your question possible duplicate of

struts2: how store images outside of webapp , save path db?

storing images in java project dynamically


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -