Dynamic path configuration/resolving

Discussion in 'Java' started by Manish Hatwalne, Sep 11, 2007.

  1. 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 -

    http://xyz.com/people/1234/index.do?someparams=pqr
    http://xyz.com/people/5678/index.do?someparams=pqr
    http://xyz.com/people/1234/photos.do
    http://xyz.com/people/5678/photos.do

    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 -
    http://xyz.com/people/index.do?someparams=pqr 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 http://xyz.com/people/1234/index.do?someparams=pqr
    should resolve to http://xyz.com/people/index.do?someparams=pqr 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!

    TIA,
    - Manish
    Manish Hatwalne, Sep 11, 2007
    #1
    1. Advertising

  2. Manish Hatwalne

    GArlington Guest

    On 11 Sep, 11:26, "Manish Hatwalne" <> wrote:
    > 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 -
    >
    > http://xyz.com/people/1234/index.do...photos.dohttp://xyz.com/people/5678/photos.do
    >
    > 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 -http://xyz.com/people/index.do?someparams=pqrand 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 thishttp://xyz.com/people/1234/index.do?someparams=pqr
    > should resolve tohttp://xyz.com/people/index.do?someparams=pqrand 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!
    >
    > TIA,
    > - Manish


    Search for "url rewriting" on google and how it is achieved on your
    particular web server.
    GArlington, Sep 11, 2007
    #2
    1. Advertising


  3. > Search for "url rewriting" on google and how it is achieved on your
    > particular web server.
    >


    Sorry, I forgot to add that I am trying to acieve this with Servlet filter,
    for some reasons can't use Apache's mod_rewrite
    Any pointers?

    - Manish
    Manish Hatwalne, Sep 11, 2007
    #3
  4. Manish Hatwalne

    GArlington Guest

    On 11 Sep, 12:39, "Manish Hatwalne" <> wrote:
    > > Search for "url rewriting" on google and how it is achieved on your
    > > particular web server.

    >
    > Sorry, I forgot to add that I am trying to acieve this with Servlet filter,
    > for some reasons can't use Apache's mod_rewrite
    > Any pointers?
    >
    > - Manish


    What can you do with web server? You will need some sort of rewrite
    rule in order for you requests not to get 404 responses. Or, is your
    servlet alone listening on port 80?
    GArlington, Sep 11, 2007
    #4
  5. "GArlington" <> wrote in message
    news:...
    > On 11 Sep, 12:39, "Manish Hatwalne" <> wrote:
    >> > Search for "url rewriting" on google and how it is achieved on your
    >> > particular web server.

    >>
    >> Sorry, I forgot to add that I am trying to acieve this with Servlet
    >> filter,
    >> for some reasons can't use Apache's mod_rewrite
    >> Any pointers?
    >>
    >> - Manish

    >
    > What can you do with web server? You will need some sort of rewrite
    > rule in order for you requests not to get 404 responses. Or, is your
    > servlet alone listening on port 80?
    >


    I have got this to work with ServletFilter. I only needed that redirection
    within my context, so it was kind of easy!

    - Manish
    Manish Hatwalne, Sep 13, 2007
    #5
  6. Manish Hatwalne

    GArlington Guest

    On 13 Sep, 08:39, "Manish Hatwalne" <> wrote:
    > "GArlington" <> wrote in message
    >
    > news:...
    >
    > > On 11 Sep, 12:39, "Manish Hatwalne" <> wrote:
    > >> > Search for "url rewriting" on google and how it is achieved on your
    > >> > particular web server.

    >
    > >> Sorry, I forgot to add that I am trying to acieve this with Servlet
    > >> filter,
    > >> for some reasons can't use Apache's mod_rewrite
    > >> Any pointers?

    >
    > >> - Manish

    >
    > > What can you do with web server? You will need some sort of rewrite
    > > rule in order for you requests not to get 404 responses. Or, is your
    > > servlet alone listening on port 80?

    >
    > I have got this to work with ServletFilter. I only needed that redirection
    > within my context, so it was kind of easy!
    >
    > - Manish


    Sorry, did you succeed? Then please share with us how you did that.
    GArlington, Sep 13, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Narayanan Sankaranarayanan

    Resolving ~ During Design-time in ASP.Net

    Narayanan Sankaranarayanan, Dec 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    403
    Narayanan Sankaranarayanan
    Dec 27, 2004
  2. senthil
    Replies:
    1
    Views:
    3,273
    Egbert Molenkamp
    Feb 27, 2004
  3. Chris

    "Resolving" LocalHost ??

    Chris, Aug 27, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    493
    Jason \(MFT1\)
    Aug 28, 2003
  4. Mark
    Replies:
    0
    Views:
    809
  5. Manish
    Replies:
    1
    Views:
    435
Loading...

Share This Page