Struts Error while loading a page
Hi Friends,
In our aplication when i try to load a page am getting the following error , please throw some light if you have come across any such exception:
<Error> <HTTP> <101017> <[ServletContext(id=22376268,name=QS,context-path=/QS)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot find bean null in any scope
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:274)
It is very strange that the same .EAR file is workign fine in the dev and the UAT environment but in production it is throwin this error. Am sure its some environment problem, but still searching.If any of you have come across such erro please help.
Thanks
Vishy
Hi,
You have to see your jsp page.
It is usually seen in association with a problematic Struts HTML SELECT custom tag. The Struts
<html:select >
tag behaves differently depending whether one or both of the name and property attributes is specified for its encompassed
<html:options> tags.
If the name attribute is specified, whether or not if the property attribute is specified, then a bean matching the specified name will be expected in some scope (such as page, request, session, or application). If the matching bean is not found in any available scope, the error above will be seen.
There are two ways to address this. The first approach is to put a bean in one of the scopes so that the html:options might be associated with it. The second approach is to not specify the name attribute and instead use only the property attribute.
It would be help out you.
Thanks and Regards
Maruthi.
Hi Maruthi,
Thanks for the reply,
This is not happening while development, the application is workign fine int he development and UAT environment , but gettign screwed up in Production.
Hence ithoguth it must be somethign related to environment problem which may throw such exception/
ITs exacelty hapenign the place where in forward the request to a URI. Precisely when i do this
doForward(uri, request, response);
So can you suggest somethign in this line
Thanks
Vishy