You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Pranay Pandey (JIRA)" <ji...@apache.org> on 2016/06/27 13:26:52 UTC

[jira] [Updated] (OFBIZ-7120) Multisite support in specialpurpose/cmssite

     [ https://issues.apache.org/jira/browse/OFBIZ-7120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pranay Pandey updated OFBIZ-7120:
---------------------------------
    Attachment: OFBIZ-7120-2.patch
                OFBIZ-7120-1.patch

Attaching patches for this feature implemented in specialpurpose/cmssite component.

_*OFBIZ-7120-1.patch*_
This patch is for implementation done to support the feature.
# Introduced 3 new fields in WebSite Entity
## hostedPathAlias - For WebSites hosted on webapp using the WebSiteFilter, indicates the path this WebSite will be hosted on
## isDefault - If Y then it is default WebSite
## displayMaintenancePage - If set to Y, redirect user to site maintenance page (When a specific website needs to brought down without interrupting any of the other processes on the same instance)
# Entry for cmssite in specialpurpose build.xml for getting it compiled.
# Updates in RequestHandler for handling requests from MULTI_SITE_ENABLED web app and to append URLs with hostedPathAlias for the corresponding website.
# Removed webSiteEntry from cmssite webapp web.xml as now this app is going to be MULTI_SITE_ENABLED and will serve as a sample for multi-site environment, also updated ControlServlet mapping to /* from /cms/*.
# Added Filter and mapping for WebSiteFilter in web.xml.
# Updates in CmsEvents.cms event to handle case of showing maintenance page when a specific site has brought down.
# WebSiteFilter class for filtering requests for multi-site-enabled webapp having WebSiteFilter entry.
# Prepared class MultiSiteRequestWrapper and overridden getPathInfo() method of HttpServletRequest class which is used to hide the hostPathAlias portion of the URL from OFBiz.

_*OFBIZ-7120-2.patch*_
This patch contains supporting data for demonstration of multi-site setup. 

Made the existing website the default one, so that user lands here whenever no specific hostedPathAlias is supplied. 

Introduced two more websites and added their URLs on default website home page for reference. Anyone can refer the setup to setup the similar environment in hot-deploy application.

Introduced the maintenance page content and associated it with all the 3 sites, but in custom setup, every website can have it’s own.

Any website can be brought down easily by setting up value of displayMaintenancePage to Y from here: https://localhost:8443/content/control/EditWebSite?webSiteId=WebSite2  

Clean build with data load is required prior to testing the feature.

Here are the URLs for accessing these directly-
# CmsSite(Default) = https://localhost:8443/cmssite/
# WebSite-1 = https://localhost:8443/cmssite/website-1
# WebSite-2 = https://localhost:8443/cmssite/website-2

A developer can simply have cmssite component available in specialpurpose and do an entry of WebSiteFilter in hot-deploy webapp web.xml can leverage the feature and can setup a multi-site enabled webapp.

Thanks [~lektran] for the design and implementation, thanks [~rehan.khan] for providing the patch for trunk.

Feedback from the community is welcome, please review and suggest any improvements you see.

> Multisite support in specialpurpose/cmssite
> -------------------------------------------
>
>                 Key: OFBIZ-7120
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7120
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: specialpurpose/cmssite
>    Affects Versions: Trunk
>            Reporter: Pranay Pandey
>            Assignee: Pranay Pandey
>         Attachments: OFBIZ-7120-1.patch, OFBIZ-7120-2.patch
>
>
> Idea is to implement a WebSiteFilter in specialpurose/cmssite component which can demonstrate OFBiz CMS ability to serve multiple websites with single webapp. 
> To demonstrate WebSiteFilter usage, will also be adding sample website data, in addition to the one we already have.
> Originally this idea and implementation is from [~lektran]. I will be providing the patch for review and acceptance by the community.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)