[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4327
  • Last Modified:

using html:img struts tag, How can I get the Value attribute.

Hi,

I am using struts html:img tag and setting property, value attributes and How can I get the value set for value attribute.

<html:img property="left" src=" " value="leftclick" />, I have to get the value set for the value attribute.

could you please help me out.
0
bsatyam_guptha
Asked:
bsatyam_guptha
  • 2
1 Solution
 
boonlengCommented:
Are you refering to <html:image> tag?
struts <html:img src="..."> is equivalent to html <img src="..."> and does not have attribute "value".
whereas  <html:image property="myImg" src="..."> is <input type="image" name="myImg" src="...">

refer http://struts.apache.org/1.x/struts-taglib/tagreference.html#image
0
 
bsatyam_gupthaAuthor Commented:
I hope you didn't get my question, I knew the tag, but I want to get value attribute which I am assigning to html:image tag.
0
 
boonlengCommented:
> I am using struts html:img tag and setting property, value attributes and How can I get the value set for value
> attribute.
> <html:img property="left" src=" " value="leftclick" />, I have to get the value set for the value attribute.

I get what you mean in your question, just to confirm whether you are posting the wrong info in the question.

Use request.getParameter("left") to retrieve the value.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now