Skip to content

Commit

Permalink
refactor(config): make web.xml variable substitution compatible with …
Browse files Browse the repository at this point in the history
…Payara 5.2020.6 #6953
  • Loading branch information
poikilotherm committed Mar 25, 2021
1 parent 7d70e1f commit ca35411
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/main/resources/META-INF/microprofile-config.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# DATABASE
dataverse.db.host=localhost
dataverse.db.port=5432
dataverse.db.user=dataverse
dataverse.db.name=dataverse

# WEB.XML / JSF
dataverse.jsf.project-stage=Production
dataverse.jsf.primefaces.theme=bootstrap
dataverse.jsf.empty-string-null=true
dataverse.jsf.skip-comments=true
dataverse.jsf.buffer-size=102400
dataverse.jsf.refresh-period=-1
12 changes: 6 additions & 6 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<!-- <param-value>Development</param-value>-->
<param-value>${MPCONFIG=dataverse.jsf.project-stage:Production}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.project-stage}</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>${MPCONFIG=dataverse.jsf.primefaces.theme:bootstrap}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.primefaces.theme}</param-value>
</context-param>
<!-- example of a hard-coded PrimePush configuration: -->
<!-- context-param -->
Expand All @@ -42,19 +42,19 @@
<param-name>
javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
</param-name>
<param-value>${MPCONFIG=dataverse.jsf.empty-string-null:true}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.empty-string-null}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>${MPCONFIG=dataverse.jsf.skip-comments:true}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.skip-comments}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
<param-value>${MPCONFIG=dataverse.jsf.buffer-size:102400}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.buffer-size}</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>${MPCONFIG=dataverse.jsf.refresh-period:-1}</param-value>
<param-value>${MPCONFIG=dataverse.jsf.refresh-period}</param-value>
</context-param>
<!-- JSF mapping -->
<filter>
Expand Down

0 comments on commit ca35411

Please sign in to comment.