permaculture playing cards*
The moose likes Struts and the fly likes bean: write tag,, simple but Big prob :( please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean: write tag,, simple but Big prob :( please help" Watch "bean: write tag,, simple but Big prob :( please help" New topic
Author

bean: write tag,, simple but Big prob :( please help

s mahen perera
Ranch Hand

Joined: Mar 08, 2005
Posts: 101
Hi all

This is qhat i am trying to do.....

I am generating a piece of JavaScript Code on the fly (in other words in the Action class I am generating this piece of Java Script using the values from the DB). I need to set this piece of Java Script in the JSP Page wo which I am fowarding the request.

So what I am doing is,, setting the Java script in a Form property like form.setJS(<Java Script Code> . I am doing this in the Action class,, and in the forwarding JSP file

in the place i need to have the JS code i am putting
<bean:write name="someform" property="jS"/>

I am geting the required Java Script on the page,, (i did a "View Source" on the resulting html to find out ) But the prob is all "'" are replaced with this --> '

i checked when i am setting the form property in the action class whether the correct JS is there. It was there.. in otherwords, the 's (single quote symbols) were there. But in the browser it gets replaced with '

please help me .. i am clueless abt this...

I can clarify more if my problem is not clear..

Thanks in advance
s mahen perera
Ranch Hand

Joined: Mar 08, 2005
Posts: 101
identified the problem... hehe after posting in this forum only i identified the prob cos it displayed the correct "'" (single quote) hehe

by using the filter="false" property in the bean:write tag solved the prob
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bean: write tag,, simple but Big prob :( please help
 
Similar Threads
JavaScript Validation in struts
Selecting which bean to use
Form not getting submitted from Javascript function in a JSP
about struts
bean value persists on clicking back