Results 1 to 3 of 3
  1. #1
    voipp is offline Member
    Join Date
    Oct 2013
    Posts
    51
    Rep Power
    0

    Lightbulb Set Tomcat to redirect all outer connections to certain page

    Hi!
    I work with tomcat from the box, so server properties are default(local virtual host,webapp base directory is webapps, etc.). When i working on my web application , i need non-local connections to access only certain jsp(or servlet) page(page called Under construction), deployed in the webapps folder. How can i get that?

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,004
    Rep Power
    6

    Default Re: Set Tomcat to redirect all outer connections to certain page

    I guess a filter would be an easy solution.

    The Essentials of Filters

    "If url does not contain localhost and the page is not the underconstruction page, redirect to underconstruction page." Note the need for a check to see if it is not the under construction page; that is to prevent an endless redirect loop.

    Probably if you install an Apache HTTPD in front of your Tomcat server this would be a simple configuration matter, but that is out of scope for this forum and I wouldn't really know how to set that up from memory anyway.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    voipp is offline Member
    Join Date
    Oct 2013
    Posts
    51
    Rep Power
    0

    Default Re: Set Tomcat to redirect all outer connections to certain page

    Quote Originally Posted by gimbal2 View Post
    I guess a filter would be an easy solution.

    The Essentials of Filters

    "If url does not contain localhost and the page is not the underconstruction page, redirect to underconstruction page." Note the need for a check to see if it is not the under construction page; that is to prevent an endless redirect loop.

    Probably if you install an Apache HTTPD in front of your Tomcat server this would be a simple configuration matter, but that is out of scope for this forum and I wouldn't really know how to set that up from memory anyway.
    Thanx!

Similar Threads

  1. How to redirect to thank you page
    By rashriaz in forum New To Java
    Replies: 4
    Last Post: 03-07-2012, 08:27 AM
  2. Redirect To Same Page
    By systech44 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 12-08-2009, 11:27 AM
  3. redirect to html page
    By simo_mon in forum Java Servlet
    Replies: 3
    Last Post: 02-12-2009, 05:18 PM
  4. Redirect page in web service
    By bluesheeva in forum Advanced Java
    Replies: 3
    Last Post: 02-03-2009, 11:56 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •