Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

bean:write not working

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using the html:image tag and am passing values to a jsp using the property and value attributes. Here is the code:

<html:image onclick="javascript:popUp('success1.jsp')" src="images/images.jpg" property="key" value="<bean:write name="mapVals" property="key"/>" />

Am catching this value in success1.jsp as
request.getParameter("key");

But only null is getting passed.

Help.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Struts, even though it might be a pure JSP question.

That JSP won't even compile--you can't nest tags like that.

If you're in a JSP2+ container, use JSP EL, otherwise use the EL version of the Struts tags.

 
namrata suri
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.I downlaoded the struts-html-el.tld library and included it in my web-inf folder and used it in my code

<html-el:image .....................property='key' value="${mapVals.key}"

I am getting the following error "The tag handler class for html-el:image (org.apache.strutsel.taglib.html.ELImageTag) was not found on the build path"

I have been using libraries from different versions of struts but predominantly struts2. Is that a problem since this struts-html-el library i am using from struts 1.1
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't randomly mix-and-match tag libraries from different versions of Struts. I'm quite confused now--what version of Struts are you using?
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic