Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for overrides context for portlet contexts #119

Open
bjagg opened this issue May 5, 2020 · 0 comments
Open

Add support for overrides context for portlet contexts #119

bjagg opened this issue May 5, 2020 · 0 comments
Labels

Comments

@bjagg
Copy link
Member

bjagg commented May 5, 2020

uPortal-start promotes the use of overridesContext.xml usage to customize Spring beans. JasigWidgetPortlets does not currently support this -- it's the only standard portlet that does not. This requires customization to context files to copy and overwrite the original context in a location different than expected.

Solution is to add the overrides context to each portlet defintion in portlet.xml.

For example, here is the change for SimpleJspPortlet:

        <init-param>
            <name>contextConfigLocation</name>
            <value>/WEB-INF/context/portlet/simpleJspPortletContext.xml, 
                   classpath:/properties/contextOverrides/simpleJspPortletOverridesContext.xml</value>
        </init-param>

Also, web.xml should be updated to load overridesContext.xml

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/context/applicationContext.xml,
                             classpath:/properties/contextOverrides/overridesContext.xml</param-value>
	</context-param>

Default "empty" overrides context files may need to be added into src/main/resources/properties/contextOverrides/. See https://github.com/Jasig/WebproxyPortlet/blob/master/src/main/resources/properties/contextOverrides/overridesContext.xml as an example.

@bjagg bjagg added the bug label May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant