Skip to content

Problem migrating from struts2 2.3 to 2.5 - Maybe struts-jquery-plugin issue #198

@RicardoDias19

Description

@RicardoDias19

I got a problem while using struts2 2.5.9 and struts2-jquery-plugin 4.0.3.
Actionmessages and actionErrors does not show up anymore. FieldError is displayed saying that value type for this fields (actionmessages and actionerrors) are not valid.

I read 2.5 api and nothing changed about it. addActionMessage() and addActionError() still receive a String as argument.
No exception is thrown. I do think the problem - if there is some - may be struts2-jquery-plugin 4.0.3. This jar contains jquery-2.2.4 which is a vulnerable version of jquery, and looking for something in google dev tools I got this:


  1. A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
    To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.
    Note that for performance reasons, only the first access to one of the properties is shown.

  1. Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/ .

AFFECTED RESOURCES:
jquery-2.2.4.min.js:4


  1. One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications.
    Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can add or modify the DOCTYPE to be <!DOCTYPE html> to render the page in No Quirks Mode.

AFFECTED RESOURCES:

Document in the DOM tree Mode URL
document Limited Quirks Mode http://localhost:8080/ProjXXXXX/registerCostumer.action?actionErrors=Client+already+registered.

What the server got is:
xxxxxxxxxx.action?actionErrors=No+results+for+this.+

The message passed to addActionError is ok. But it does not show, instead a fieldError.

Any idea about this? I tried to look for validations for the fields actionmessages and errormessages in the project and found nothing.
It is like some validation is going on and failed because I got the message from messages.properties for every invalid field Value:
xwork.default.invalid.fieldvalue = Invalid Value for this field {0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions