• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

redirecting all request

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What's brown and sticky? ... a stick. Or a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic