Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Migrated from Standard to flex and lost the mapping of / -> /index.jsp #210

Open

Description

@ludoch

From a customer:

I'm working on migrating my app from standard -> flex and am using the compat image (java 7) and have run into a small inconsistency I thought I'd check in about and see if it's a known issue:
My app has an admin site written in .jsp which when deployed in standard is available at:
https://XXX.appspot.com/admin_console
When deployed in Flex (using true in the .xml descriptor) I need to explicitly call out the jsp path to get the content:
https://XXX.appspot.com/admin_console/index.jsp

Note: There is a filter installed on /admin_console/* which requires authentication. This filter is working properly which is why regardless of the deployment you don't 404. However, if you were able to authenticate, then in the case where this app is deployed on Flex, you would see no content unless you used the second url form. In the case where it's deployed in Standard, it would be business as usual.

Update, Later:
FWIW with the new version it works if you put the / in but not without.
Works:
http://XXX.appspot.com/admin_console/
Doesnt:
http://XXX.appspot.com/admin_console

Activity

  1. gregw commented on Apr 12, 2016

    @gregw
    Contributor

    That update explains a bit.

    For a request to /contextPath there are two actions that take place:

    1. a redirection is performed to /contextPath/, so that relative paths will work correctly
    2. the redirected request to put through the welcome page mapping of the context to locate the actual page.

    So it appears that step 2 is working, but step 1 is not. Step 1 is optional by calling ContextHandler.setAllowNullPathInfo(true), but the default is false and I find it highly unlikely that somebody would have configured this? But we should check.

    Thus is may be some interaction with the authentication redirections at that URI as well?

    So we need to investigate. However, I think there is probably an enhancement we can do to jetty to make it try the welcome page redirections even with a null path info. This wont help us short term but will make this more robust. I have raised jetty/jetty.project#506

  2. gregw commented on Apr 12, 2016

    @gregw
    Contributor

    @ludoch How is the context path being set in this case? It is hard coded to / in root.xml in the images I can see?

  3. ludoch commented on Apr 12, 2016

    @ludoch
    ContributorAuthor

    I think so, ( I guess but will check with the reporter). I doubt he
    customized any of the jetty xml conf files we have.

    On Mon, Apr 11, 2016 at 5:53 PM, Greg Wilkins notifications@github.com
    wrote:

    @ludoch https://github.com/ludoch How is the context path being set in
    this case? It is hard coded to / in root.xml in the images I can see?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #210 (comment)

  4. gregw commented on Apr 12, 2016

    @gregw
    Contributor

    I've been testing 9.3.x and it does correctly map requests to /context to welcome files even if setAllowNullPathInfo(true) has been called. It may be JSP related, but we need to know more about their setup before we do much more.

  5. ludoch commented on Apr 12, 2016

    @ludoch
    ContributorAuthor

    maybe it is the only legacy image with jetty9.2

    On Mon, Apr 11, 2016 at 7:11 PM, Greg Wilkins notifications@github.com
    wrote:

    I've been testing 9.3.x and it does correctly map requests to /context to
    welcome files even if setAllowNullPathInfo(true) has been called. It may be
    JSP related, but we need to know more about their setup before we do much
    more.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #210 (comment)

  6. ludoch commented on Apr 12, 2016

    @ludoch
    ContributorAuthor

    setup:
    do not put 1.8 in the pom.xml
    add true in appengine-web.xml of a standard GAE all

    On Mon, Apr 11, 2016 at 7:39 PM, Ludovic Champenois <
    ludovic.champenois@gmail.com> wrote:

    maybe it is the only legacy image with jetty9.2

    On Mon, Apr 11, 2016 at 7:11 PM, Greg Wilkins notifications@github.com
    wrote:

    I've been testing 9.3.x and it does correctly map requests to /context to
    welcome files even if setAllowNullPathInfo(true) has been called. It may be
    JSP related, but we need to know more about their setup before we do much
    more.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly or view it on GitHub
    #210 (comment)

  7. gregw commented on Apr 12, 2016

    @gregw
    Contributor

    @ludoch still need to checkout how he is setting context path before we deploy anything
    By "a standard GAE all" do you mean master or something prior to that?

    Will check 9.2.x and JSP behaviour shortly for null pathinfo, but that still does not explain why the redirection is not done in the first place.

  8. janbartel commented on Apr 13, 2016

    @janbartel
    Contributor

    jetty/jetty.project#506 was closed, as testing showed that jetty 9.2 and 9.3 handles serving index jsp files with null path info just fine.

    Need more info from reporter about their setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions