Are we good to go?

śr., 25 maj 2022 o 18:42 Lukasz Lenart <lukaszlen...@apache.org> napisał(a):
>
> I would suggest moving this expression into Java code, into "bean" -
> this is then easy to cover with a unit test.
>
> śr., 25 maj 2022 o 14:52 i...@flyingfischer.ch <i...@flyingfischer.ch>
> napisał(a):
> >
> > Besides incrementing or disabling this arbitrary limit with
> >
> > <constant name="struts.ognl.expressionMaxLength" value="360" />
> >
> > You may also work with a most ugly hack by defining a variable in your jsp
> >
> > <s:set var="v1" value="%{ognl.expression.value}"/>
> >
> > and then use this very short variables in your too long OGNL expression.
> >
> > Ugly, does add to code complexity and increases the overall failure
> > rate.But may help to break down extraordinarily long expressions in a
> > few cases, that force you to increment the limit.
> >
> >
> > Markus
> >
> >
> >
> > Am 25.05.22 um 14:38 schrieb Greg Huber:
> > > I will have others longer than this, is there an override on the length?
> > >
> > > On 25/05/2022 13:34, Lukasz Lenart wrote:
> > >> śr., 25 maj 2022 o 14:22 Greg Huber <gregh3...@gmail.com> napisał(a):
> > >>> Would there have been any changes to the validator?
> > >>>
> > >>> This is now not working:
> > >>>
> > >>>       <validator type="expression">
> > >>>           <param name="expression"><![CDATA[
> > >>>             !( (bean.address.postcode1 == null ||
> > >>> bean.address.postcode1.trim().length() == 0) and (bean.address.postcode2
> > >>> != null && bean.address.postcode2.trim().length() > 0)
> > >>>                || (bean.address.postcode1 != null &&
> > >>> bean.address.postcode1.trim().length() > 0) and (bean.address.postcode2
> > >>> == null || bean.address.postcode2.length() == 0)
> > >>>             )
> > >>>           ]]></param>
> > >>>           <message key="postcodes.error.bothpostcodes">unspecified
> > >>> key</message>
> > >>>       </validator>
> > >> OGNL expression max length has been defined by default to 256
> > >> characters, the above has 351
> > >> https://issues.apache.org/jira/browse/WW-5179
> > >>
> > >>
> > >> Regards
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: dev-h...@struts.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
> > For additional commands, e-mail: dev-h...@struts.apache.org
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to