I'm creating an ActionForm for my request under certain circumstances in a filter, because if I do a redirect in the filter, I want to save the original request parameters in the correct actionform and stick it in the session for later.

But I just upgraded from struts 1.1 to 1.2, and I'm getting null action mapping returned for my URLs when I call ConfigHelper.getActionMapping(url).

Is what I'm doing for some reason now not struts compatible?

I'm going to check out the source code, but if anyone knows immediately, you could save me some time.

Thanks
Adam

PS Here's the way I'm doing it in the filter:

HttpSession session = request.getSession();
ServletContext context = session.getServletContext();
ModuleUtils moduleUtils = ModuleUtils.getInstance();
ModuleConfig moduleConfig =
    moduleUtils.getModuleConfig(request, context);
ActionConfig actionConfig =
    moduleConfig.findActionConfig(requestedUrl);
ConfigHelper helper = new ConfigHelper(context, request, response);
int posFileExt = requestedUrl.lastIndexOf(".");
String strippedUrl = requestedUrl.substring(0, posFileExt);
ActionMapping actionMapping =
    helper.getActionMapping(strippedUrl);
ActionServlet actionServlet = (ActionServlet)
    context.getAttribute(Globals.ACTION_SERVLET_KEY);
logger.info("getting form for '" + strippedUrl + "', " +
            "actionMapping==" + actionMapping);
ActionForm form =
    RequestUtils.createActionForm(request, actionMapping,
                                  moduleConfig, actionServlet);


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



Reply via email to