This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes UPLOAD IMAGE and OTHER DATA 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 "UPLOAD IMAGE and OTHER DATA " Watch "UPLOAD IMAGE and OTHER DATA " New topic


priti doshi

Joined: Aug 03, 2001
Posts: 6
I am creating an Input form where the user can enter details like say Company detials. Also in that form I want to accept his company logo, ie an image.
Now only on one single Submit, I want to send both these details to the servlet.
I have a seperate servelt for uploading image and another servelt for accpeting the other Company detials.
But as the Image requries multipart do i combine both the details and call the respective servlets...on One single SUBMIT button.
If not this way..pls suggest some other way of doing it.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

My own thought is that it is generally bad practice to have a single Form submission handled by more than one servlet.

By saying "I have one 'servlet' to handle image uploads", you mean you have a chunk of java code that handles multi-part file uploads, then make this a simple java class instead, and use it within the other servlet.
I agree. Here's the link:
Similar Threads
Action form - design issue
Plz tell the detials of Sun Certificate Course
Calling JSP from javascript
Multiple insert into database
Insert image by pressing button