This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

image tag in JSP  RSS feed

 
Mahesh Rud
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

How to call a java class method from src attribute of <IMG> tag. The image is created in a method of utility class.

Regards
Strive

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Mahesh,
Welcome to JavaRanch!

Are you trying to call a Java method when the user clicks on the image or to create the source URL? If the former, you need to submit the web page to a servlet. If that later, you can use a scriptlet (cringe) or call the method in from servlet and set the value in a request attribute.

Showing a bit of code might help with a more specific response.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Ah. I see there is a more specific thread. Closing this copy; please see your other thread
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!