This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Ajax+ image+ servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax+ image+ servlet" Watch "Ajax+ image+ servlet" New topic
Author

Ajax+ image+ servlet

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Not sure whether to put it under Ajax or servlet forum. Anyways, I want to push an image(dynamically generated one) from server to client and update it inside a div or may be as it is. How do I render it in through Ajax & servlet, because ajax can only help me receive text or xml.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There really is no reason to use Ajax to update an image if that is the only thing that is being updated. All you need to do is set the source.



Eric
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Originally posted by Eric Pascarello:
There really is no reason to use Ajax to update an image if that is the only thing that is being updated. All you need to do is set the source.



Eric


Will this piece of code hit the server?
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
Originally posted by Akhilesh Trivedi:


Will this piece of code hit the server?


Yes it did, had to transfer my server-side code from doPost to doGet.
 
wood burning stoves
 
subject: Ajax+ image+ servlet
 
Similar Threads
Image cropping in jsp
servlet is not working because of ajax
Can I make a POST request for a new window?
Can I use requestDispatcher.forward while using AJAX for Loading image
Show images dynamically from DB