Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8831275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:16:23+00:00 2026-06-14T08:16:23+00:00

i have a jsp page with struts2 jquery grid. I want to show errors

  • 0

i have a jsp page with struts2 jquery grid. I want to show errors in the jsp page from my action class.
To show error i am adding error messsage using

addActionError("You can not delete this  data");

code in my action class. And to display it i am using

<s:if test="hasActionErrors()">
   <div class="errors">
       <s:actionerror/>
    </div>
 </s:if>

code in my jsp page. But unfortunately ,I am unable to show error in my jsp page.
Please share your knowladge regarding this issue.

-Thank you
Ashutosh

Full Code:

index.jsp:

.....
.....

    <body>  

    <s:if test="hasActionErrors()">
               <div class="errors">
                  <s:actionerror/>
               </div>
            </s:if>

        <div id="setpage"> <s:url id="editurl" action="nedit"/>
            <s:url id="editurl" action="nedit"/>
            <s:url  id="remoteurl" action="ntable"/>  

            <sjg:grid
               id="gridtable"
                caption="List of Subject Details"
                dataType="json"
                href="%{remoteurl}"
                pager="true"
                gridModel="gridModel"
                rowList="50,100,5000"
                rowNum="20"
 .....
 ...... 

My action.java

                  .........
                  .........
                  else
               {
                   addActionMessage("Unable to delete row");
                      return ERROR;
               }  
               return SUCCESS;
                   .........
                   .........

struts.xml

                 <package name="gridedition" extends="struts-default,json-default"> 
                            <action name="editionntableshow" class="v.esoft.actions.actionfile" >
                                <result name="success" type="json"/> 
                                                         <result name="error" type="json"/> 
                            </action>  

                       <action name="editionedit" class="v.esoft.actions.editiondetails.EditiondetailsEditAction"> 
                            <result name="success" type="json"></result>          
                        </action>
                 </package>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:16:25+00:00Added an answer on June 14, 2026 at 8:16 am

    This solved my problem…

    <s:if test="hasActionErrors()">
      <div class="errors">
       <s:actionerror theme="jquery"/>
       </div>
     </s:if>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this error when I try to include the tag ( http://code.google.com/p/struts2-jquery/wiki/HeadTag )
I want to have a fixed table structure on my jsp page (3row, 4column).
I'm Using Struts2 in jsp page i have iterator values for checkbox. how to
I am creating a project in struts2 I have created a Registration.jsp page like
I have developed a web application on Struts2 and used JSP. I want to
I am working on struts2. I have 3 checkbox in my jsp page (say
I am using struts2 and hibernate. I have a jsp page which is loaded
I have a struts2 page which uses a shared action using <s:action> with executeResult=true
i am calling struts2 action from jquery ajax on success it returns string and
I have a jsp page with two radio tags. The page contains a struts2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.