3 Replies Latest reply on Apr 4, 2011 8:28 PM by Udo

    Need to make an app URL as default for a domain

      I am having:

      Glassfish + ApexListener

      I need to make it so that requests for a domain are transfered to a spesific apex application:

      hellowrld.com - > hellowrld.com/apex/f?p=105:7

      I Searched all around the internet I cant find a solution. Maximum I found was:

      1) Edit portal-ext.properties file and set company.default.home.url option
      But as I am a glassfish noob I cant find the location on that file (if you know please tell me there it is on windows platform)

      2) Change the default module for glassfish virtual server to apex . This allowed me to make a
      hellowrld.com - > hellowrld.com/apex/f?p=4550:1:.. transfer. Modification of the "Default Web Page" Apex Listener parameter did no good if I changed the value to f?p=105:7 or apex/f?p=105:7

      Please help me find a solution and make a redirect
      hellowrld.com - > hellowrld.com/apex/f?p=105:7
      Maybe there is some kind of glassfish module that I can install that would corectly change the Default Web Page to hellowrld.com/apex/f?p=105:7?
        • 1. Re: Need to make an app URL as default for a domain

          there seem to be two possible solutions for your problems:
          - using a proxy, as discussed here: {thread:id=2163446}
          - using url rewriting, e.g. provided by [url http://www.tuckey.org/urlrewrite ]Tuckeys UrlRewriteFilter, as discussed here: {thread:id=2193952}

          Both solutions have its pros and cons, but you'll certainly get your mapping with both solutions.


          Edited by: Udo on 04.04.2011 10:36
          fixed broken references
          • 2. Re: Need to make an app URL as default for a domain
            Thanks Udo.

            I made a quik, ugly and noob-like solution for the time beeng (if enyone needs a quick solution to the above problem):

            I went to glassfish/docroot/index.html file and added a <meta http-equiv="Refresh" content="0;url=/apex/f?p=105:7"> tag:

            <!--Arbortext, Inc., 1988-2008, v.4002-->
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
            <html lang="en">

            Copyright (c) 2009, 2010 Oracle and/or its affiliates. All rights reserved.

            Use is subject to License Terms
            <meta http-equiv="Refresh" content="0;url=/apex/f?p=105:7">
            <body bgcolor="#ffffff" text="#000000" link="#594fbf" vlink="#1005fb" alink="#333366"><br> <table width="100%" border="0" cellspacing="0" cellpadding="3">
            BONDS PORTAL</body></html>

            I will repeat that this an ugly temporary solution witch will be replaced by one of the ones that Udo spesified.
            • 3. Re: Need to make an app URL as default for a domain
              Well, if it's doing what you need ... ;)

              For me, the simplest approach would actually be the proxy, but perhaps this is because it is so familiar for me.
              Let us know which solution you used for the (final) implementation of that mapping.