aspose file tools*
The moose likes Struts and the fly likes bean:write not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write not working" Watch "bean:write not working" New topic
Author

bean:write not working

namrata suri
Ranch Hand

Joined: Oct 22, 2009
Posts: 31
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Oct 22, 2009
Posts: 31
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

Joined: Sep 29, 2008
Posts: 12617

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
 
subject: bean:write not working