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

  • Home
  • SEARCH
  • 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 6157129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:43:58+00:00 2026-05-23T20:43:58+00:00

I am working on ajax using struts 2 frame work. Application has two text

  • 0

I am working on ajax using struts 2 frame work.
Application has two text boxes “name” and “age”.
On submitting , those two values should be updated using div tag on the same page itself.

<sx:div id="div2" executeScripts="true" theme="ajax">Value</sx:div>


<sx:submit targets="div2"  value="submit">

when i use “targets” attribute in sx:submit ,getting some exception. when i remove “targets” no exception has been thrown.But application needs “targets” attribute to update the div tag.Do i need to any handle exception ?
I am trying this as a sample exmple , my application needs this kind of functionality.
Help me.

Source code as follows :

<%@taglib  uri="/struts-tags"  prefix="s"  %>

<%@taglib uri="/struts-dojo-tags" prefix="sx" %>

<html>

<head><title>Ajax_Div_Tag_Example</title>

</head>

<body><h1>Ajax_Div_Tag_Example</h1><hr>

<sx:div id="div2" executeScripts="true" theme="ajax">Value</sx:div>

<s:form action="resultAction">

<s:textfield name="name" label="Name"></s:textfield>

<s:textfield name="age" label="Age"></s:textfield>

<sx:submit value="submit" targets="div2"> </sx:submit>

</s:form>

</body>

</html> 

struts.xml

<action  name="resultAction"  class="ActionClasses.AjaxDivAction">
        <result name="success">/resultPage.jsp</result>
        </action>

resultPage.jsp

<%@taglib  uri="/struts-tags"  prefix="s"  %>

<html>

<head><title>Ajax_Div_Tag_Example</title>

</head>

<body><hr>Name : <s:property value="name"/><br>

Age : <s:property value="age"/><hr>

</body>

</html> 

AjaxDivAction.java

package ActionClasses;
import  com.opensymphony.xwork2.ActionSupport;

public class AjaxDivAction extends ActionSupport{

/**
     * 
     */
    private static final long serialVersionUID = 1L;

private String name;

private String age;

public String getAge() {

return age;

}

public void setAge(String age) {

this.age = age;

}

public String getName() {

return name;

}

Exception thrown is give below

org.apache.jasper.JasperException: An exception occurred processing JSP page /AjaxDemo.jsp at line 21

18: 
19: <s:textfield name="age" label="Age"></s:textfield>
20: 
21: <sx:submit value="submit" targets="div2"> </sx:submit>
22: 
23: </s:form>
24: 


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:519)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

root cause

javax.servlet.ServletException: java.lang.AbstractMethodError
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
    org.apache.jsp.AjaxDemo_jsp._jspService(AjaxDemo_jsp.java:94)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

root cause

java.lang.AbstractMethodError
    org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:65)
    org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
    org.apache.jsp.AjaxDemo_jsp._jspx_meth_sx_005fsubmit_005f0(AjaxDemo_jsp.java:242)
    org.apache.jsp.AjaxDemo_jsp._jspx_meth_s_005fform_005f0(AjaxDemo_jsp.java:168)
    org.apache.jsp.AjaxDemo_jsp._jspService(AjaxDemo_jsp.java:82)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

Thanks

Jagan

  • 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-05-23T20:43:58+00:00Added an answer on May 23, 2026 at 8:43 pm

    There was a problem with strut2-core-2.jar file.I downloaded latest version and tried.It is working fine now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on on an AJAX chat application using php, mysql. It's
I am working on an application which sends an AJAX POST request (I'm using
I am using ajax animation extender in my application. It is working perfectly in
I am using Ajax in my application. It is working fine in all the
I am working on ajax-page using PageMethods (web service) to interact with server. I
I'm using the MS AJAX AutoCompleteExtender on a textbox. It's working fine, except when
i was working ajax auto completeextender witha text box in asp.net and c#.net. i
I am working on website using ajax and C#. I started learning these languages
I managed to get Ajax working in Rails, specifically using remote_form_for tag to add
I am working on a comment script using ajax, json and jquery. I have

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.