Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean:write Not working

 
chetan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I am using the below struts tag in Application, As you can see i am using script function showMsgPop in which i am using bean:write tag.But this tag is not able to display the message.

Please let me know where i am doing wrong?..

>jsp Page
-----------
The form tag
<html:form name="submitOpex" action="uploadOpexXcel.do" type= "c4.form.UploadOpexForm" method= "post" scope="session" >


<logic:messagesPresent message="true">
<html:messages id="submitCosmessage" message="true">
<script>
showMsgPop("OPEX Submission Result", "<bean:write name='submitCosmessage' />");
</script>
</html:messages>
</logic:messagesPresent >

Struts-config.xml
-----------------
<action
path="/submitOPEX"
type="c4.action.SubmitOpexAction"
name="submitOpex"
scope="session" >
<!-- input="subOpex"> -->
<forward contextRelative="true" name ="subOpexPage" path="subOpex" />
</action>

Thanks

Chetan Durg
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

The attributes of struts tags(even custom tags) needs to be wrapped in a double quotes rather than single as u had done..

so u change the script to function("df" ,'<bean:write name=""/>') and single r double quotes doesnt matter for javascript
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"chetandurg",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic