Win a copy of Murach's Python Programming this week in the Jython/Python 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
Sheriff
Posts: 36406
454
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
Sheriff
Posts: 36406
454
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
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!