File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes redirecting all request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "redirecting all request" Watch "redirecting all request" New topic
Author

redirecting all request

Gibu John
Greenhorn

Joined: Mar 26, 2007
Posts: 2
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

Joined: Dec 03, 2004
Posts: 19
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

Joined: Oct 02, 2009
Posts: 49
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.


RAQ Report: Web-based Excel-like Java reporting tool.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: redirecting all request
 
Similar Threads
Passing URL in src attribute
JBoss & Tomcat integration - endless problem
Is it possible, More than one tomcat running in the one system?
Calling a servlet which contains so many different files
Losing session attribute