File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Upload image to database through Servlets and JSP's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Upload image to database through Servlets and JSP Watch "Upload image to database through Servlets and JSP New topic
Author

Upload image to database through Servlets and JSP's

PavanKumar Chamarthi
Greenhorn

Joined: Nov 20, 2012
Posts: 3
Hi all,

Please help me in uploading an image to postgresql database through servlets.i have tried many progrms that was mentioned here, But none of them are working.. please guide me and say if i need to download any other jar files. If you guys can give me the code then it will be so helpful..


Thank You
PavanKumar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61220
    
  66

Did you read the JspFaq entry on file uploading?

If not, please do so and try writing some code.

Then post the code here if you are having problems with it. You will not be given the code.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
PavanKumar Chamarthi
Greenhorn

Joined: Nov 20, 2012
Posts: 3
'Bear Bibeault' Thank you for giving me the reply. but i am designing a code for SHOPPING CART application.. It has to do everything dynamically...
If we save the images in WEB_INF folder, then the user cant always store images in that folder..

I heard that there is a code to convert images into binary format and store in the database.

I dont know the process correctly..Please help me
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

PavanKumar Chamarthi wrote:If we save the images in WEB_INF folder, then the user cant always store images in that folder..

Why? Can you give examples of when user can and when can't store?
Also I don't understand the need of saving/storing user images in a shopping cart application.
PavanKumar Chamarthi wrote:I heard that there is a code to convert images into binary format and store in the database.

Have you heard of BLOB data type as well?


SCJP, SCWCD.
|Asking Good Questions|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Upload image to database through Servlets and JSP's