I had developed a application where there are three drop downs placed adjacent to each other . when i click a value from any drop down a image has been viewed . but the problem i am getting is that the image is viewed or opened in different page. i need to be get the image in the same page where the drop down is placed and if i click another image value from drop down i should get the drop down menu, the image of first one and the image of current one which i had clicked should be seen in same page . how can i do this?. The image i said is the image developed from Jfreechart.
Images in HTML are to be displayed using the <img> element.
The <img> element has a 'src' attribute which should point to a valid and public URL of the image.
If the images are to be generated, the URL should point to a some servlet which writes the image to the outputstream.
Joined: Dec 07, 2008
oops sorry... images have <img> tag.... <iframe> is used for documents....
Joined: Oct 08, 2006
I should add, scriptlets are in any way a sign of a bad practice.
Whenever you feel the need to write a scriptlet, immediately stop with it and rethink the design and approach. In most cases you can use taglibs (JSTL and so on) and/or EL to solve the coding issue. But in extreme (read: very poorly designed) cases you should be using a Java class for this. Such as this case, where in you should be using a Servlet class. Handling binary data using a view technology designed for handling character data makes absolutely no sense. It would only corrupt the binary data and vice versa.