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 How to update a image using servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How to update a image using servlet?" Watch "How to update a image using servlet?" New topic
Author

How to update a image using servlet?

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 194

Hi all,

I am new in image uploading and updating I uploaded an images in my project and want to update a image usingservlet using id which is PK in society table.
But I am not able to get it. Please help me.

this is my code for uploading image:


thanks in advanc.

jeya velan
Greenhorn

Joined: Feb 07, 2011
Posts: 9

Do not understand what your problem is.
If getting the generated PK is the problem, than you can use the below code if you are using Prepared Statement and
your database supports identity columns
Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 194

Hi,

I want to say that this above code for image uploading when I create a society (means residential or commercial area)form but when I want to update this form then what is the process use for updating the only images.

I updated all the form field in one servlet and want to update two images in a seprate servlet because I am using two forms in one jsp........
this is my project task flow when I searching societies then it will show a Update button onclick this button will go on edit_society based on society id e.g. SOC000001 and so on after then this page action will go for UpdateImageSociety servlet which is below after this jsp.

this is the jsp page...





and now the edit_society2.jsp




This is the servlet for all text field updation..



table is here...


So this the flow but I am not able to update only images
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56166
    
  13

Ram Dev chandran,
Your post was moved to a new topic.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to update a image using servlet?
 
Similar Threads
image is not uploaded into the database
ResultSet Exhausted Error
NumberFormatException : null
How to configure Bonecp in java project without breaking connection when more than connection
Creating Directories using Servlet outside the web app