struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject ConfigHelper.getActionMapping
Date Thu, 04 Mar 2004 23:09:32 GMT
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.


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 =
ConfigHelper helper = new ConfigHelper(context, request, response);
int posFileExt = requestedUrl.lastIndexOf(".");
String strippedUrl = requestedUrl.substring(0, posFileExt);
ActionMapping actionMapping =
ActionServlet actionServlet = (ActionServlet)
     context.getAttribute(Globals.ACTION_SERVLET_KEY);"getting form for '" + strippedUrl + "', " +
             "actionMapping==" + actionMapping);
ActionForm form =
     RequestUtils.createActionForm(request, actionMapping,
                                   moduleConfig, actionServlet);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message