[jboss-jira] [JBoss JIRA] (WFLY-2533) Add ability to set default character encoding on a subsystem level

Markus Karnik (JIRA) issues at jboss.org
Sun Dec 22 08:19:33 EST 2013


    [ https://issues.jboss.org/browse/WFLY-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933050#comment-12933050 ] 

Markus Karnik edited comment on WFLY-2533 at 12/22/13 8:18 AM:
---------------------------------------------------------------

I got an error "Message: JBAS014788: Unexpected attribute 'default-encoding' encountered" when try to configure "default-encoding" server-wide by setting:
{code:title=standalone.xml|borderStyle=solid}
<servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only" default-encoding="UTF-8">
{code}

Stacktrace
{noformat}
12:46:02,285 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
	at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112) [wildfly-controller-8.0.0.CR1.jar:8.0.0.CR1]
	at org.jboss.as.server.ServerService.boot(ServerService.java:331) [wildfly-server-8.0.0.CR1.jar:8.0.0.CR1]
	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256) [wildfly-controller-8.0.0.CR1.jar:8.0.0.CR1]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[346,137]
Message: JBAS014788: Unexpected attribute 'default-encoding' encountered
{noformat}

probably you missed adding ServletContainerDefinition.DEFAULT_ENCODING to undertow/src/main/java/org/wildfly/extension/undertow/UndertowSubsystemParser_1_0.java? Line 106.  jboss-web.xml method works fine.
                
      was (Author: markus.karnik):
    I got an error "Message: JBAS014788: Unexpected attribute 'default-encoding' encountered" when try to configure "default-encoding" server-wide by setting:
{code:title=standalone.xml|borderStyle=solid}
<servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only" default-encoding="UTF-8">
{code}

Stacktrace
{noformat}
12:46:02,285 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
	at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:112) [wildfly-controller-8.0.0.CR1.jar:8.0.0.CR1]
	at org.jboss.as.server.ServerService.boot(ServerService.java:331) [wildfly-server-8.0.0.CR1.jar:8.0.0.CR1]
	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256) [wildfly-controller-8.0.0.CR1.jar:8.0.0.CR1]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[346,137]
Message: JBAS014788: Unexpected attribute 'default-encoding' encountered
{noformat}

propably you missed adding ServletContainerDefinition.DEFAULT_ENCODING to undertow/src/main/java/org/wildfly/extension/undertow/UndertowSubsystemParser_1_0.java? Line 106!  jboss-web.xml method works.
                  
> Add ability to set default character encoding on a subsystem level
> ------------------------------------------------------------------
>
>                 Key: WFLY-2533
>                 URL: https://issues.jboss.org/browse/WFLY-2533
>             Project: WildFly
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Web (Undertow)
>            Reporter: Stuart Douglas
>            Assignee: Tomaz Cerar
>             Fix For: 8.0.0.CR1
>
>
> Stuart: the charset one should be pretty simple, just an attribute on <servlet-container?
> Stuart: ideally we would also have it in jboss-web.xml as well
> Stuart: I should also add an option to use the connector encoding
> Stuart: as connectors have their own encoding set
> Stuart: that is used to decode the URL
> Stuart: we should have an option to use the connector encoding as the default encoding

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list