Hi,
I have strange problem in using the tag bean:write. I'm trying to
migrate from sdtruts 1.1 to struts 1.2.9.
In the action I have the following code:
httpServletRequest.getSession().setAttribute("tmp", new Integer(123));
In the correspondat jsp I have
<bean:write name="tmp" />
HOwever this results in an empty page (i can guess that is because
struts cannot find the variable)). Instead if I do the following
everything works fine:
<bean:define id="xyz" name="tmp" />
<%=xyz%>
So I have two question:
1) why I get the blank page instead of the usual exception in the jsp
page?
2) why the variable cannot be printed?
Thanks
Hamvil - 10 Oct 2006 14:44 GMT
Hamvil ha scritto:
> 1) why I get the blank page instead of the usual exception in the jsp
> page?
Ok, I've fixed this (it was a problem with the configuration of the
logger
> 2) why the variable cannot be printed?
In the logger i get the following message:
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE
What I do not understand is why struts looks for a key in the resources
file. It should just print the integer. Am I missing somethink?
BTW if I add the following in the struts-config the problem look fixed.
Is this the right approach?
<message-resources
parameter="MyWebAppResources"
null="false" />
Thanks