Re: Wildcard action paths

2005-06-18 Thread Don Brown
You can get a copy in the nightly builds - http://svn.apache.org/builds/struts/nightly/ They are of the 1.3-dev branch so if you haven't already tried a 1.3 build, you might have some other migration issues. Glad to hear it was what you were looking for. Don On 6/18/05, Laurie Harper <[EMAIL PR

Re: Wildcard action paths

2005-06-18 Thread Laurie Harper
Don, that absolutely rocks, you're the man! :-) Really, that's exactly what I expected and wanted to do in the config file, and that code snipet makes things even cleaner. You've just given me the means to collapse an ugly hack into a nice, clean, properly encapsulated solution. Thank you for

Re: Wildcard action paths

2005-06-17 Thread Don Brown
Ok, but even if that is what she was wanting, it could still use the same struts config syntax I pointed out: ... Then in PathInfoForwardAction: for (Iterator i = mapping.getProperties().entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry)i.next(); String key = (

Re: Wildcard action paths

2005-06-17 Thread Van
On 6/17/05, Don Brown <[EMAIL PROTECTED]> wrote: > Ok, what about this: > > I added the ability to pass multiple request-time values to the Action > using the ActionConfig properties. This means, in your case, your > struts config would look like: > > type="...PathInfoForwardAction"

Re: Wildcard action paths

2005-06-17 Thread Don Brown
Ok, what about this: I added the ability to pass multiple request-time values to the Action using the ActionConfig properties. This means, in your case, your struts config would look like: ... In your PathInfoForwardAction, you can now access those values using: ... = mapping.get

Re: Wildcard action paths

2005-06-17 Thread Laurie Harper
I ended up writing an action which let me do this: The action splits the parameter, builds a map from the name=value pairs and sticks it in request scope then resets parameter. Except it doesn't; ActionMapping.setParameter() throws a runtime exception, so I have to painfully construct a du

Re: Wildcard action paths

2005-06-16 Thread Don Brown
To add to your original solution: write your own subclass of ActionConfig which overrides getParameter() to return the tiles-needed part of the parameter attribute. Additional methods will let you retrieve other parts. This way, your Action doesn't have to know about parsing; it can pull clean v

Re: Wildcard action paths

2005-06-15 Thread Laurie Harper
Van wrote: > Okay. So maybe this isn't the only wildcard mapping you will have. Still, you could have one SectionAction class for this particular wildcard mapping. That would be a vast improvement over status quo. How many different wildcard mappings do you have in this application? Almost eve

Re: Wildcard action paths

2005-06-15 Thread Laurie Harper
Michael Jouravlev wrote: On 6/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote: I didn't get any response to this last time so I'm asking again... :-) I'd like to replace URLs like this: /Sections/Subsections/?section=Section1&subsection=SubSection1 with URLs like this: /Sections/Section1

Re: Wildcard action paths

2005-06-14 Thread Van
On 6/14/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > The problem with that approach is duplication of information: you have > to know the URL structure in the action / tag / whatever that does the > URL parsing, as well as in struts-config.xml. And I don't need a single > pattern, there would be

Re: Wildcard action paths

2005-06-14 Thread Michael Jouravlev
On 6/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > I didn't get any response to this last time so I'm asking again... :-) > > I'd like to replace URLs like this: > >/Sections/Subsections/?section=Section1&subsection=SubSection1 > > with URLs like this: > >/Sections/Section1/Subsecti

Re: Wildcard action paths

2005-06-14 Thread Laurie Harper
Van wrote: The problem is, there's then no way to get what the wildcards matched in the view (JSP). For reasons discussed elsewhere I don't want to put a different action in front of each view, so I need a more general solution. This seems so obvious to me that I'm probably missing something ab

Re: Wildcard action paths

2005-06-13 Thread Van
On 6/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > I'd like to replace URLs like this: > > /Sections/Subsections/?section=Section1&subsection=SubSection1 > > with URLs like this: > > /Sections/Section1/Subsections/Subsection1 > > An action mapping like this will match that URL: > >

Re: Wildcard action paths

2005-06-13 Thread Van
Sorry about the typo, I was referring to HttpServletRequest below. -Van On 6/13/05, Van <[EMAIL PROTECTED]> wrote: > On 6/13/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > I'd like to replace URLs like this: > > > > /Sections/Subsections/?section=Section1&subsection=SubSection1 > > > > with U