my dog learned polymorphism
The moose likes JSP and the fly likes Image display problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Image display problem" Watch "Image display problem" New topic

Image display problem

Amit Kumar Kaushik

Joined: Jan 12, 2006
Posts: 11
we are using rmi and web server in our application. Flow of the application is :-

client requests web application(tomcat)
web application requests rmi server.

i have a combobox on jsp page containing name of the images, stored on rmi server. I want to display the selected image on jsp. For this client requests the web server and web server requests rmi server. rmi server contains a folder images in which all the images are stored.

How i can get the selected image and display on jsp?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Where is the problem?

- In getting the name of selected image from JSP?
- In passing the name to RMI Server?
- In receiving the image from RMI Server?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13028
How i can get the selected image and display on jsp?

Please remember that JSP is for writing text to a response, NOT binary image data. Your jsp is going to have to write a normal HTML IMG tag with a SRC URL that contains enough information for a servlet to recover the image, properly format the response headers and send the binary content.
I agree. Here's the link:
subject: Image display problem
It's not a secret anymore!