Hi

I have some problems with struts multiple application support. I have build a second struts-config.xml called common-struts-config.xml and I have registered it in the web.xml.

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <init-param>
        <param-name>config/common</param-name>
        <param-value>/WEB-INF/struts-config-common.xml</param-value>
      </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>4</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>4</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

In my Index.jsp I have the folloging tag:

<html:form action="/common/TempException.do" method="post">

and I get an exception. I have debuged struts and I might have found the problem in the html:form tag but in the requestUtils.

In FormTag.java line 713:

moduleConfig = RequestUtils.getModuleConfig(pageContext);

And the procedure in RequestUtils:

public static ModuleConfig getModuleConfig(PageContext pageContext) {
ModuleConfig moduleConfig =
(ModuleConfig) pageContext.getRequest().getAttribute(Globals.MODULE_KEY);
if (moduleConfig == null) { // Backwards compatibility hack
moduleConfig =
(ModuleConfig) pageContext.getServletContext().getAttribute(Globals.MODULE_KEY);
}
return moduleConfig;
}


It searches only in the default module and not in the several modul-configuration. So I think here is one problem.

Just my question: Has anyone have succeed with multiple struts-config-modules. Perhaps I make a mistake.

Manfred


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to