Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4733

No default parameter defined for result [json] of type [org.apache.struts2.json.JSONResult]

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.8
    • Fix Version/s: 2.5.10
    • Component/s: Core, Plugin - JSON
    • Labels:
      None
    • Environment:

      jdk7, tomcat 7

      Description

      When I start my Struts2 app I see this warning :

      22:30:33  WARN [com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults] - No default parameter defined for result [json] of type [org.apache.struts2.json.JSONResult]
      

      I can't find any information about that in the documentation.

      What am I doing wrong in my struts config file ?

      In my app I use configuration by annotation and by xml.

      1. struts.xml
        4 kB
        COMBEAU
      2. struts-external.xml
        1 kB
        COMBEAU

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Struts-JDK7-master #585 (See https://builds.apache.org/job/Struts-JDK7-master/585/)
        WW-4733 Reduces noise in the logs (lukaszlenart: rev 20c54df03a4e2f7be53a4f08061b658ae76fc847)

        • (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Struts-JDK7-master #585 (See https://builds.apache.org/job/Struts-JDK7-master/585/ ) WW-4733 Reduces noise in the logs (lukaszlenart: rev 20c54df03a4e2f7be53a4f08061b658ae76fc847) (edit) core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        It isn't defined in a file, it's a developer's choice when developing a new result type
        https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java#L124

        Show
        lukaszlenart Lukasz Lenart added a comment - It isn't defined in a file, it's a developer's choice when developing a new result type https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/result/StrutsResultSupport.java#L124
        Hide
        walkn COMBEAU added a comment -

        Lukasz Lenart Thank you very much

        We can see the default param in which file ?

        Show
        walkn COMBEAU added a comment - Lukasz Lenart Thank you very much We can see the default param in which file ?
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        A pram used when no param was defined, e.g. <result name="success">/WEB-INF/index.jsp</result> in this case location will be used as it is defined as a default param, it's the same as

        <result name="success">
          <param name="location">/WEB-INF/index.jsp</param>
        </result>
        
        Show
        lukaszlenart Lukasz Lenart added a comment - A pram used when no param was defined, e.g. <result name="success">/WEB-INF/index.jsp</result> in this case location will be used as it is defined as a default param, it's the same as <result name= "success" > <param name= "location" > /WEB-INF/index.jsp </param> </result>
        Hide
        walkn COMBEAU added a comment -

        What is this default param ?

        Show
        walkn COMBEAU added a comment - What is this default param ?
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Nothing wrong, Struts warns about missing default param. I will reduce level to debug.

        Show
        lukaszlenart Lukasz Lenart added a comment - Nothing wrong, Struts warns about missing default param. I will reduce level to debug.

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            walkn COMBEAU
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development