It's not a secret anymore!
The moose likes JSP and the fly likes how to change image using jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "how to change image using jsp" Watch "how to change image using jsp" New topic
Author

how to change image using jsp

maznorlia syafina
Greenhorn

Joined: Mar 20, 2006
Posts: 2
I'm having a problem on how to change an image using logic.Let say that the logic is like this.If year profit is over 50% I want the image to display in green box and if the year profit is below 20% the image will be displayed in red.How can I do that?Can somebody help.Please..
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

The easiest approach would be to have 2 images, one green and other red and display one of the images based on your 'if' logic.

ram.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56224
    
  13

Check out the JSTL <c:if> tag.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
maznorlia syafina
Greenhorn

Joined: Mar 20, 2006
Posts: 2
thanks ram..got it
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to change image using jsp
 
Similar Threads
how to draw lines without change background's image?
Transform BufferedImage or Image in Graphics
How to invest money wisely
how to give path for image in eclipse
Draw margin for Image