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

<s:url tag is not working after Struts 2.5.10.1 migration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: 2.5.12
    • Component/s: Core Tags
    • Labels:
      None

      Description

      Sample code used in my source

      <div>
        <a href='<s:url action="msSummary"/>'></a>
      </div>
      

        Activity

        Hide
        newton_dave Dave Newton added a comment -

        Please define "doesn't work" and include enough info to reproduce the issue.

        Show
        newton_dave Dave Newton added a comment - Please define "doesn't work" and include enough info to reproduce the issue.
        Hide
        gd_suresh Suresh Dhanapal added a comment - - edited

        Hi Dave,
        I have migrated Struts 2.3.29 to 2.5.10.1, I have changed configuration and dependency as per migration recommendation , finnaly project got deployed succefully , only where ever the link <s:url action="msSummary"/> does not work.

        Block of JSP code:
        <div class="call-to-action-shadowOne" style="margin-left: 7px;">
        <a style="CURSOR: pointer;" accesskey="i" href='<s:url action="msSummary"/>'>
        <div class="call-to-action inner-shadow">
        <h2>Release Invoices <br> (ALT + i)</h2>
        <div class="rightArrowImage"></div>
        <ul>
        <li>Search Invoices. Release Invoices.</li>
        </ul>
        </div>
        </a>
        </div>

        Show
        gd_suresh Suresh Dhanapal added a comment - - edited Hi Dave, I have migrated Struts 2.3.29 to 2.5.10.1, I have changed configuration and dependency as per migration recommendation , finnaly project got deployed succefully , only where ever the link <s:url action="msSummary"/> does not work. Block of JSP code: <div class="call-to-action-shadowOne" style="margin-left: 7px;"> <a style="CURSOR: pointer;" accesskey="i" href='<s:url action="msSummary"/>'> <div class="call-to-action inner-shadow"> <h2>Release Invoices <br> (ALT + i)</h2> <div class="rightArrowImage"></div> <ul> <li>Search Invoices. Release Invoices.</li> </ul> </div> </a> </div>
        Hide
        newton_dave Dave Newton added a comment -

        How is the action configured? Do you have a minimal example that reproduces the issue somewhere accessible, like GitHub?

        Show
        newton_dave Dave Newton added a comment - How is the action configured? Do you have a minimal example that reproduces the issue somewhere accessible, like GitHub?
        Hide
        gd_suresh Suresh Dhanapal added a comment -

        In Struts.xml
        <action name="msSummary" class="abc.xys.msa.action.MSProcessAction" method="searchInvoiceDetails">
        <result name="invoiceDistributionsPage">/WEB-INF/jsps/msa/Q3InvoiceDistributions.jsp</result>
        </action>

        Show
        gd_suresh Suresh Dhanapal added a comment - In Struts.xml <action name="msSummary" class="abc.xys.msa.action.MSProcessAction" method="searchInvoiceDetails"> <result name="invoiceDistributionsPage">/WEB-INF/jsps/msa/Q3InvoiceDistributions.jsp</result> </action>
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        Can you post the source of generated page? What link was produced?

        Probably you have been hit by the SMI
        http://struts.apache.org/docs/action-configuration.html#ActionConfiguration-StrictMethodInvocation

        Show
        lukaszlenart Lukasz Lenart added a comment - Can you post the source of generated page? What link was produced? Probably you have been hit by the SMI http://struts.apache.org/docs/action-configuration.html#ActionConfiguration-StrictMethodInvocation
        Hide
        gd_suresh Suresh Dhanapal added a comment - - edited
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
        
        
        
        <!DOCTYPE html>
        <html>
          <head>
        <meta http-equiv="X-UA-Compatible" content="IE=9"/>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
            <link href="css/basic.css" rel="stylesheet" type="text/css" />
            <script src="js/jquery-1.11.1.js" type="text/javascript"></script>
            <script src="js/jquery-ui.js" type="text/javascript"></script>
            <title>Mandated Services Application</title>  </head>
          <body align="center">
            <div style="text-align: center; color: #000; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; background-color: rgb(255, 255, 255);" >
            <div class="confDiv menuHomeDiv">
                <form id="MSAMenu" name="MSAMenu" action="/voucherpayment/appMenu.nysed" method="post">
                    <div class="topNav">MANDATED SERVICES APPLICATION</div>
                    <div class="div2"><div class="loginUser">
          <span>You are now logged in<label style="color:#a20000;font-size:120%"> TEST ENVIRONMENT </label>as <b></b>.</span>  <span class="spanR">Click <a href="logout">here</a> to logout</span></div>
        </div><div class="loginHRdiv"><hr width="100%"/></div>
                   
                    <div class="div3" style="overflow: auto;margin: 0 auto;" align="center">
                        <div id="main" class="clearfix" role="main" style="float: none;">
                         
                             <div class="call-to-action-shadowOne" style="margin-left: 7px;">
                                <a style="CURSOR: pointer;" accesskey="i" href='/voucherpayment/msInvoiceloadInvoiceSummary.nysed'>
                                    <div class="call-to-action">
                                        <h2>Release Invoices <br> (ALT + i)</h2>
                                        <div class="rightArrowImage"></div>
                                        <ul>
                                           <li>Search Invoices. Release Invoices.</li>
                                        </ul>
                                    </div>
                                </a>
                            </div>
                        </div> 
                     </div>
                    
                     <div align="right">
                        <a align="right" style="CURSOR: pointer;" href='/voucherpayment/appMenunavPageLoad.nysed'><b>Main Menu</b></a>
                   </div>
                </form>
        
        
        
            </div>
            <div style="clear: both;" height="20px">    </div>
            </div>
          </body>
        </html>
        
        Show
        gd_suresh Suresh Dhanapal added a comment - - edited <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" > <!DOCTYPE html> <html> <head> <meta http-equiv= "X-UA-Compatible" content= "IE=9" /> <meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" /> <link href= "css/basic.css" rel= "stylesheet" type= "text/css" /> <script src= "js/jquery-1.11.1.js" type= "text/javascript" > </script> <script src= "js/jquery-ui.js" type= "text/javascript" > </script> <title> Mandated Services Application </title> </head> <body align= "center" > <div style= "text-align: center; color: #000; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; background-color: rgb(255, 255, 255);" > <div class= "confDiv menuHomeDiv" > <form id= "MSAMenu" name= "MSAMenu" action= "/voucherpayment/appMenu.nysed" method= "post" > <div class= "topNav" > MANDATED SERVICES APPLICATION </div> <div class= "div2" > <div class= "loginUser" > <span> You are now logged in <label style= "color:#a20000;font-size:120%" > TEST ENVIRONMENT </label> as <b> </b> . </span> <span class= "spanR" > Click <a href= "logout" > here </a> to logout </span> </div> </div> <div class= "loginHRdiv" > <hr width= "100%" /> </div> <div class= "div3" style= "overflow: auto;margin: 0 auto;" align= "center" > <div id= "main" class= "clearfix" role= "main" style= "float: none;" > <div class= "call-to-action-shadowOne" style= "margin-left: 7px;" > <a style= "CURSOR: pointer;" accesskey= "i" href='/voucherpayment/msInvoiceloadInvoiceSummary.nysed'> <div class= "call-to-action" > <h2> Release Invoices <br> (ALT + i) </h2> <div class= "rightArrowImage" > </div> <ul> <li> Search Invoices. Release Invoices. </li> </ul> </div> </a> </div> </div> </div> <div align= "right" > <a align= "right" style= "CURSOR: pointer;" href='/voucherpayment/appMenunavPageLoad.nysed'> <b> Main Menu </b> </a> </div> </form> </div> <div style= "clear: both;" height= "20px" > </div> </div> </body> </html>
        Hide
        lukaszlenart Lukasz Lenart added a comment -

        but there is no msSummary in the provided source

        Show
        lukaszlenart Lukasz Lenart added a comment - but there is no msSummary in the provided source
        Hide
        gd_suresh Suresh Dhanapal added a comment -

        Hi Lukasz, Thanks for your help, issue is because of SMI.

        Show
        gd_suresh Suresh Dhanapal added a comment - Hi Lukasz, Thanks for your help, issue is because of SMI.
        Hide
        gd_suresh Suresh Dhanapal added a comment -

        Because of SMI.Issue resolved after correcting wildcard action name in Struts.xml

        Show
        gd_suresh Suresh Dhanapal added a comment - Because of SMI.Issue resolved after correcting wildcard action name in Struts.xml

          People

          • Assignee:
            lukaszlenart Lukasz Lenart
            Reporter:
            gd_suresh Suresh Dhanapal
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development