• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Re, Handling Error using ActionMessages

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to store errors in struts using ActionMessages and display them in my jsp page. I get the following error:

ERROR [org.apache.struts.taglib.tiles.InsertTag] - ServletException in '/genericError.jsp': Cannot find bean: "msg" in any scope

My code snippet is as follows:

ActionClass


genericError.jsp



I checked some of the earlier postings and did not see anything that would help in my case.

Any help is appreciated.

Thanks,
Peter
[ October 19, 2007: Message edited by: Peter Vennel ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a problem similar to this in struts1. This code:

<logic:messagesPresent message="true">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table3D">
<tr>
<td class= "SuccessText" height="25">
<html:messages id="msg" messages="true">
<bean:write name="msg"/>
</html:messages>
</td>
</tr>
</table>
</logic:messagesPresent>

results in the error message:

cannot find bean msg in any scope

If I remove messages="true" then I get no error, but no text appears either. The kicker is that I made this jsp by copying an existing jsp, and this code works in the original, but not in the copy, which only has a few changes. This leads me to believe this is some sort of set-up issue, but I don't know what. Can anyone give me a clue?
 
reply
    Bookmark Topic Watch Topic
  • New Topic