This is an automated email from the ASF dual-hosted git repository.

fpapon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 0eb4fcbcd added character encoding docs (#242)
0eb4fcbcd is described below

commit 0eb4fcbcd2cbe63cf8e43f152c6dc141aad2305c
Author: Lenny Primak <[email protected]>
AuthorDate: Tue Oct 14 14:28:33 2025 -0500

    added character encoding docs (#242)
---
 src/site/content/jakarta-ee.adoc | 18 ++++++++++++++++++
 src/site/content/web.adoc        |  1 +
 2 files changed, 19 insertions(+)

diff --git a/src/site/content/jakarta-ee.adoc b/src/site/content/jakarta-ee.adoc
index 6cf77973a..7d16dc994 100644
--- a/src/site/content/jakarta-ee.adoc
+++ b/src/site/content/jakarta-ee.adoc
@@ -180,6 +180,24 @@ The module adds `ShiroFilter` to the Servlet 
configuration. For most cases, the
 </filter-mapping>
 ... other filters ...
 ----
+Shiro Jakarta EE filter forces request encoding to UTF-8. This is the desired 
outcome for most, if not all cases. However, if this is not desired, you can 
disable it by adding the following parameter to `web.xml`:
+[source,xml]
+.Note: this parameter is only available in Shiro 2.0.6 or later
+----
+<context-param>
+    <param-name>org.apache.shiro.ee.disable-character-encoding</param-name>
+    <param-value>true</param-value>
+</context-param>
+----
+If you need to set a different encoding than UTF-8, add the following 
parameter to `web.xml`:
+[source,xml]
+.Note: this parameter is only available in Shiro 2.0.6 or later
+----
+<context-param>
+    <param-name>org.apache.shiro.ee.character-encoding</param-name>
+    <param-value>ISO-8859-2</param-value>
+</context-param>
+----
 
 ==== Shiro.ini file locations
 The module finds shiro.ini in the same manner as 
link:web.html#custom_configuration_locations[Web Configuration] 
(WEB-INF/shiro.ini by default). Additionally, configuration is enhanced to 
merge two separate configuration files:
diff --git a/src/site/content/web.adoc b/src/site/content/web.adoc
index a0b12bd14..83677ecd3 100644
--- a/src/site/content/web.adoc
+++ b/src/site/content/web.adoc
@@ -93,6 +93,7 @@ By default, the `EnvironmentLoaderListener` will create an 
`IniWebEnvironment` i
 
 This allows you to customize how a configuration format is parsed and 
represented as a `WebEnvironment` instance. You could subclass the existing 
`IniWebEnvironment` for custom behavior, or support different configuration 
formats entirely. For example, if someone wanted to configure Shiro in XML 
instead of INI, they could create an XML-based implementation, e.g. 
`com.foo.bar.shiro.XmlWebEnvironment`.
 
+[#custom_configuration_locations]
 ===== Custom Configuration Locations
 
 The `IniWebEnvironment` class expects to read and load INI configuration 
files. By default, this class will automatically look in the following two 
locations for the Shiro `.ini` configuration (in order):

Reply via email to