Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1483

AssetPathConstructorImpl should use BaseURLSource

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.2
    • 5.3
    • tapestry-core
    • None

    Description

      Asset paths should be constructed using the BaseURLSource rather than just the request context path to match the behavior for pages, etc. Currently, to get absolute URL's including domain portion for assets, you need to override the AssetPathConstructor.

      Apart from contributing the BaseURLSource, it is a small change from:
      StringBuilder builder = new StringBuilder(request.getContextPath());
      to
      StringBuilder builder = new StringBuilder(baseURLSource.getBaseURL(request.isSecure()));
      builder.append(request.getContextPath());

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mlusetti Massimo Lusetti
            jabarker Jonathan Barker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment