I have two apps deployed in my app server. Let's say they have the following urls
- localhost:9080/App1
- localhost:9080/App2
I have a filter in App2 which catches a certain request. When I catch this request I would want to forward it to a url in App2.
I know this can be done by
response.sendRedirect("http://somewhere");
but what if I do not want to hardcode "localhost:9080" in my codes since this would be dynamic and would change later on.
how can i do this?