Skip to content

Commit

Permalink
docs(config): add docs about JSF parameter configuration for devs
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Mar 18, 2021
1 parent 222d654 commit 617592f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/release-notes/6953-dev-jsf-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Dynamic Java Server Faces Configuration Options

This release includes a new way to easily change JSF settings via MicroProfile Config, especially useful during development.
See the [development guide on "Debugging"](https://guides.dataverse.org/en/5.4/developers/debugging.html).
52 changes: 52 additions & 0 deletions doc/sphinx-guides/source/developers/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,58 @@ Logging

By default, the app server logs at the "INFO" level but logging can be increased to "FINE" on the fly with (for example) ``./asadmin set-log-levels edu.harvard.iq.dataverse.api.Datasets=FINE``. Running ``./asadmin list-log-levels`` will show the current logging levels.

Java Server Faces (JSF) Configuration Options
---------------------------------------------

Some JSF options can be easily changed via MicroProfile Config (using env vars, system properties, etc)
during development without recompiling. Changing the options will require at least a redeployment, obviously depending
how you get these options in. (Variable substitution only happens during deployment and when using system properties
or env vars, you'll need to pass these into the domain, which usually will require a app server restart.)

Please note that since Payara 5.2021.1 supporting MicroProfile Config 2.0, you can
`use profiles <https://download.eclipse.org/microprofile/microprofile-config-2.0/microprofile-config-spec-2.0.html#configprofile>`_
to maintain your settings more easily for different environments.

.. list-table::
:widths: 15 15 60 10
:header-rows: 1
:align: left

* - JSF Option
- MPCONFIG Key
- Description
- Default
* - javax.faces.PROJECT_STAGE
- dataverse.jsf.project-stage
- Switch to different levels to make JSF more verbose, disable caches etc.
Read more `here <https://www.ibm.com/support/pages/changes-xhtml-and-java-sources-jsf-20-web-project-not-refreshed-publish-was-v8-server>`_,
`here <https://docs.oracle.com/javaee/6/tutorial/doc/bnaxj.html#giqxl>`_ and `here <https://javaee.github.io/tutorial/jsf-facelets003.html>`_
- ``Production``
* - javax.faces.INTERPRET_EMPTY
_STRING_SUBMITTED_VALUES_AS_NULL
- dataverse.jsf.empty-string-null
- See `Jakarta Server Faces 3.0 Spec`_
- ``true``
* - javax.faces.FACELETS_SKIP_COMMENTS
- dataverse.jsf.skip-comments
- See `Jakarta Server Faces 3.0 Spec`_
- ``true``
* - javax.faces.FACELETS_BUFFER_SIZE
- dataverse.jsf.buffer-size
- See `Jakarta Server Faces 3.0 Spec`_
- ``102400`` (100 KB)
* - javax.faces.FACELETS_REFRESH_PERIOD
- dataverse.jsf.refresh-period
- See `Jakarta Server Faces 3.0 Spec`_
- ``-1``
* - primefaces.THEME
- dataverse.jsf.primefaces.theme
- See `PrimeFaces Configuration Docs`_
- ``bootstrap``

.. _Jakarta Server Faces 3.0 Spec: https://jakarta.ee/specifications/faces/3.0/jakarta-faces-3.0.html#a6088
.. _PrimeFaces Configuration Docs: https://primefaces.github.io/primefaces/8_0/#/gettingstarted/configuration

----

Previous: :doc:`documentation` | Next: :doc:`coding-style`

0 comments on commit 617592f

Please sign in to comment.