Questions tagged [struts2-json-plugin]

Struts2 JSON Plugin. The JSON plugin provides a JSON support for actions in Struts2.

In latest communication practice across almost all the cross platforms JSON is the best light weight technique.

Struts2-json-plugin provides a "json" result type that serializes actions into JSON. i.e. Whole object will be serialized into JSON format.

Official Documentation : http://struts.apache.org/2.2.3/docs/json-plugin.html

113 questions
23
votes
3 answers

can not access a member of class org.springframework.aop.TruePointcut with modifiers public

I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug): org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException:…
Pradeep Gamage
  • 585
  • 4
  • 8
  • 21
11
votes
2 answers

org.apache.struts2.json.JSONException: Incompatible types for property

I'm receiving a java.util.List via JSON-rpc as a JavaScript array as follows. [ [1, 0.10, 1.00], [2, 0.20, 2.00], [3, 0.30, 3.00], [4, 0.40, 4.00], [5, 0.50, 5.00], [6, 0.60, 6.00], [7, 0.70, 7.00], [8,…
Tiny
  • 27,221
  • 105
  • 339
  • 599
11
votes
1 answer

How to bind JSON to Java object in Struts2 using struts2-json-plugin

I want to deserialize (bind) JSON to java object. How to do it in Struts2? I am trying to do it with struts2-json-plugin as you can see in code below, but sent JSON from frontend is not binding to my java object. Could you help me, please how to…
Roman
  • 1,121
  • 4
  • 23
  • 38
8
votes
2 answers

Retrieve data from handsontable to Struts2 Action via JSON not working

I am using struts2-json plugin to generate JSON data and Ajax to populate table (handsontable) with data from that JSON (according to the source). Now, I need to retrieve data from table to Struts2 Action using Ajax by JSON. First I've implemented…
Roman
  • 1,121
  • 4
  • 23
  • 38
7
votes
4 answers

includeProperties in Json struts2 plugin not working

I am using struts2-json-plugin-2.2.3.jar. and trying to serialize filterList property of class like this: struts.xml code
Jeetu Verma
  • 199
  • 1
  • 5
  • 19
6
votes
2 answers

Struts2 BigDecimal Converter is not converting to String

I have the following code: xwork-conversion.properties java.math.BigDecimal=demo.BigDecimalConverter BigDecimalConverter.java package demo; import java.math.BigDecimal; import java.util.Map; import…
Bilal Mirza
  • 2,576
  • 4
  • 30
  • 57
4
votes
1 answer

Json Plugin and Global exception in Struts

I am trying to return a JSON formatted global exception. This is my current struts.xml. I am not sure what is it that I am missing.
Noman
  • 887
  • 1
  • 15
  • 34
4
votes
1 answer

How To return only array not json object in struts2

commissioner_info\[\d+\]\.fname, …
4
votes
2 answers

How to ignore the root JSON node in struts2 action

I added this method in my struts action, public String execute() { long start = System.currentTimeMillis(); simDetails = new SIMDetails(); return GET_SIM_DETAILS; } and added below action in struts config file,
Said Gamal
  • 65
  • 1
  • 1
  • 13
4
votes
1 answer

Getting json return type and html return in the same action

I'll try be as specific as possible. I have an Action with two methods, one is called via ajax and other one via regular submit. The point is that can't get the request from the regular submit, I'm getting only the action properties. public class…
sferrazjr
  • 315
  • 2
  • 14
4
votes
2 answers

Action errors in struts2-jquery grid view

I wanted to display action errors on top of the grid after doing some server side validations on the values of struts 2 jQuery grid. Any help would be appreciated. here is my action error. addActionError("You can not delete this data"); But…
4
votes
2 answers

org.apache.struts2.json.annotations.JSON doesn't show right format

My web application uses struts2-json-plugin-2.2.1 I have an action that exposes an object loaded from DB (through hibernate). This object contain a java.util.Date field that is so annotated: @JSON(format = "dd-MM-yyyy") @Column(name =…
Ans
  • 71
  • 8
3
votes
1 answer

struts2-json-plugin JSONWriter Injection in Action

I have struts2-json-plugin lib in my project and I want to use JSONWriter to get JSON string and put it to JavaScript for one parameter only (not JSON result for the all Action) only one getter: public String getCarTypesJson() throws JSONException…
sytolk
  • 7,223
  • 3
  • 25
  • 38
3
votes
0 answers

Struts 2: How to add dynamically inputs in jsp from the action?

I'm trying to create a select that for each option of that select I will have specified inputs. For example select has A,B,C options; if I select A, one textfield and one file upload field will appear; if I select B instead, two textfields will…
3
votes
1 answer

Unable to send back array of in struts2 json plugin

I am using json plugin to handle json request and response in struts2. I want to send an array data in response in form of json but i am unable to do. At FE I always get an empty array. below is my Action class, struts.xml and…
Waqas Ali
  • 1,642
  • 4
  • 32
  • 55
1
2 3 4 5 6 7 8