The moose likes Struts and the fly likes Dynamic path configuration/resolving Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic path configuration/resolving" Watch "Dynamic path configuration/resolving" New topic

Dynamic path configuration/resolving

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

I have a strange requirement herem, not sure if I can explain it properly, but let me try - I need to display different set of sites with dyamic paths such as -

Now - the NOS here (1234 or 5678) will be generated dynamially and the action will be requested - but they should resolve to the same action say - and the action should also get the requested number in the path. Obviously it is not possible to add configurations for all those dynamic numbers, so there has to be only one action mapped here.

So what I want is this should resolve to and it should also get "1234" as part of the info.

How can I achieve this?? I have not done this before but I think this sort of path manipulation should be possible.

Any pointers, help would be highly appreciated!

- Manish
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One possibility would be to create a Servlet Filter. By doing so, you can read the URI, examine it, and then forward to a different URI. So, for example, you could read a URI like
and then forward to

For more information on Servlet Filters, see chapter 11 of the Sun J2EE 1.4 Tutorial.

Consultant, Sima Solutions
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

Hey, that should help!! Thanks a ton!!!

- Manish
I agree. Here's the link:
subject: Dynamic path configuration/resolving
It's not a secret anymore!