Dynamic path configuration/resolving

M

Manish Hatwalne

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
 
G

GArlington

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

Manish Hatwalne

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
 
G

GArlington

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?
 
M

Manish Hatwalne

GArlington said:
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
 
G

GArlington

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top