RE: Struts URL Pattern

2006-08-20 Thread Paul Benedict
Awesome find. Thanks David! David Friedman <[EMAIL PROTECTED]> wrote: My bad, what was I thinking? LOL. Try this: servlet.getServletConfig().getServletContext().getAttribute(Globals.SERVLET_ KEY)); As in this example where I print out an error message: public class DavidAction extends Action {

RE: Struts URL Pattern

2006-08-19 Thread David Friedman
My bad, what was I thinking? LOL. Try this: servlet.getServletConfig().getServletContext().getAttribute(Globals.SERVLET_ KEY)); As in this example where I print out an error message: public class DavidAction extends Action { @Override public ActionForward execute(ActionMapping ma

RE: Struts URL Pattern

2006-08-19 Thread David Friedman
If you are in a time crunch for an answer, you could always load the resourceAsStream "/WEB-INF/web.xml" with a SAX parser, first findi your servlet name, and then iterate through the mappings to match the servlet name so you can obtain the mapping. Personally, I tried to discover the same thing