• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

redirecting all request

 
Gibu John
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I redirect all the request to my application. and also map all the urls which pointing to a my box to my application

following url should be redirected

http://localhost:8080
http://localhost:8080/<any other application which is not mine>
[ March 25, 2008: Message edited by: Gibu John ]
 
Ankush Bhargava
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create a jsp that redirects all requests to the application welcome page. place this jsp in the root folder for tomcat.
 
Samuel Behrman
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Redirect requests to your application with the HttpRedirection module
The HttpRedirection module allows you to configure regular expression-based rules that redirect clients from url A to url B using http redirection.

When clients make a request to your server, and the url matches one of the redirection rules you have configured, the server will respond with a redirection response, telling the client to go to your redirected url to complete the request. It will look something like this (standard redirection response):

HTTP/1.1 302 Found\r\n
Date: Thu, 24 May 2007 21:32:05 GMT\r\n
Location: /redirection/users/mike/\r\n


\r\n
<html><head><title>Object moved</title></head><body>\r\n
<h2>Object moved to <a href="/redirection/users/mike/">here</a>.</h2>\r\n
</body></html>\r\n

The Location response header will indicate the redirected url to which the client will automatically redirect. Some older browsers that don’t support this behavior (I don’t know of any at this point) will see the hyperlink and the user will be able to manually click it to go to the new url.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic