*
The moose likes Servlets and the fly likes How to update a image using servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
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: 206

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: 206

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: 60785
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to update a image using servlet?
 
Similar Threads
How to configure Bonecp in java project without breaking connection when more than connection
image is not uploaded into the database
Creating Directories using Servlet outside the web app
NumberFormatException : null
ResultSet Exhausted Error