File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write not working

 
namrata suri
Ranch Hand
Posts: 31
  • 0
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • 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
  • 0
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic