struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <khan.sa...@wipro.com>
Subject "Configuration is frozen" exception thrown for actionMapping.setScope
Date Wed, 02 Nov 2005 11:41:46 GMT

Hi All,

In our application, we have decided to force all the actions to use the
request scope. So instead of adding scope ="request" in the <action>
element in struts-config.xml for each action, we extended the
RequestProcessor class as below

1.Extend the RequestProcessor class and add the config entry in
struts-config.xml
  <controller>
 <set-property  property="processorClass"
 value="CustomRequestProcessor"/>
</controller>

2.Override the processMapping method of RequestProcessor as below

      ActionMapping actionMapping= super.processMapping(request,
response, path);
      if (actionMapping!= null) {
        actionMapping.setScope("request");
      }
      return actionMapping;

However I get the exception at actionMapping.setScope("request");

java.lang.IllegalStateException: Configuration is frozen
....

I tried looking at the struts mailing list, The cause of the exception
is mentioned , however no workaround is suggested, My questions are

1.Is there any workaround to avoid the "Configuration is frozen"
exception
2.Is there any better way to enforce that all the actions to use some
specific scope (Ex: request)

Awaiting your replies and Thanks in Advance

Sajid





Confidentiality Notice

The information contained in this electronic message and any attachments to this message are
intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information.
If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message