Question & Answer
Question
I am getting the following message in Sterling Business Center when trying to put a special character ($) in the short description of a item:
"Input does not conform to pattern: context=HTTP parameter value
Cause
Sterling Business Center uses Java Regular Expressions to restrict the allowable characters for certain fields.
Answer
The following steps will allow the OOTB regular expressions to be edited.
1. Create a new file <INSTALLDIR>/repository/eardata/sbc/war/WEB-INF/regularexpressions/sbc_override_regularexpressions.xml adding the following text:
<RegularExpressions>
<RegularExpression id="sc-parameter-value-pattern"
javaPattern="^[A-Za-z0-9[-_\s.!,/+=()'\"@\\:;&\$\[\]\u007F-\uFFFF]]*"
jsPattern="^[a-zA-Z0-9-_\s.!,/+=()'\"@\\:;&\$\[\]\u007F-\uFFFF]*" />
<RegularExpression id="open-text-param-value-pattern" jsPattern="^(.*[\s]*)*$"/>
<RegularExpression id="google-analytics-cookie-pattern" javaPattern="^[a-zA-Z0-9.!\-\/+=_ :\^()|]*$"/>
</RegularExpressions>
-The Above regular expression will allow '$' to be used.
-The id 'sc-paramter-value-pattern' is the regular expression which controls the pattern of values which can be used
For more information on Java regular expressions please visit: http://docs.oracle.com/javase/tutorial/essential/regex/
2. Register the newly created regular expressions by adding the following to <INSTALLDIR>/repository/eardata/sbc/extn/web.xml.
<context-param>
<param-name>scui-regex-file-sbc-2</param-name>
<param-value>/WEB-INF/regularexpressions/sbc_override_regularexpressions.xml::501</param-value>
</context-param>
Note: The param-name should be unique and the Id (501) is to be higher than 500.
3. Rebuild the smcfs EAR
Note: The sbc.war will contain the newly created sbc_overide_regularexpressions.xml, in the following directory 'WEB-INF/regularexpressions'
5. Deploy the smcfs EAR
Was this topic helpful?
Document Information
Modified date:
10 May 2022
UID
swg21645696