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
1
vote
0 answers

JQuery not displaying JSON result via datatable due to Uncaught TypeError

I have a display:table, wrapped up by Jquery datatable, which provides client side processing over pagination, searching and sorting. Now m converting it to ServerSide processing. display:table fetches the data by calling fetchPageVisitReport action…
BST Kaal
  • 2,993
  • 6
  • 34
  • 52
1
vote
0 answers

json generation is incorrect using struts2 json plugin for camelCase fields

private Integer iDisplayLength ; public Integer getIDisplayLength() { return iDisplayLength; } public void setIDisplayLength(Integer iDisplayLength) { this.iDisplayLength = iDisplayLength; } If the request contains…
coding_idiot
  • 13,526
  • 10
  • 65
  • 116
1
vote
2 answers

Struts 2 JSON plugin and wildcard issue

In my struts.xml a convention is followed to call actions for a particular action class like this: struts.xml:
Siddharth Trikha
  • 2,648
  • 8
  • 57
  • 101
1
vote
3 answers

Struts2-JSON plugin working?

I know that Struts2 JSON Plugin converts whole Action class into JSON form and by supplying a root param we can let it convert only one param into JSON form. What if I want out of 5 members of my action class, only 2 or 3 of my members to be…
Siddharth Trikha
  • 2,648
  • 8
  • 57
  • 101
1
vote
0 answers

How to generate JSON in declaration order of fields using struts2-json plugin

class Bean { private String x,y,z,a,b,c; //Getters & Setters } Using struts2 json plugin, the json that gets generated for the above bean is in Lexicographical order This [reference], says that since JDK 6 it is supported in declaration…
coding_idiot
  • 13,526
  • 10
  • 65
  • 116
1
vote
1 answer

Struts2 Junit4 tests accumulate JSON responses with every action execution

I've written a few Junit4 tests, which looks like this : public class TestCampaignList extends StrutsJUnit4TestCase { public static final Logger LOG = Logger.getLogger(TestCampaignList.class.getName()); @Before public void…
coding_idiot
  • 13,526
  • 10
  • 65
  • 116
1
vote
1 answer

strust 2 (jquery plugin) show action exceptions as ajax error

Can you tell me how can I get the action exceptions , convert and send them as json errors. I am using the strust2 jquery plugin to validate my forms with ajax. The framework will do it automatically by defining the sj:submit validate=true and…
Alireza Fattahi
  • 42,517
  • 14
  • 123
  • 173
1
vote
1 answer

Modifying JSON variable name Struts 2

I have a pre defined json that has the following variable assigned to a JSON Object: { .... "class": "P" .... } Trouble is, I'm using the Struts 2 JSON plugin and the following code: private String class is not allowed, since class is…
jtyler
  • 1,055
  • 2
  • 15
  • 22
1
vote
1 answer

Struts2 AnnotationValidationInterceptor

I am having a frustrating time implementing struts2-jquery-plugin-3.6.0 into a Struts2 2.3.14.3 website. I recently updated the Struts2 version to 2.3.14.3, and all its dependencies, and the website functions fully and properly. I am now trying to…
1
vote
1 answer

struts2 package extends json

I have a package which contains many actions and it extends tiles-default package. Now I have a requirement that, These actions should return json result instead of tiles. Can I use the same actions & package to return both types of result? Is…
1
vote
0 answers

struts 2.3.8 have error

I using struts 2.3.8, it cannot have TextUtils Class in xwork2.util package, but struts 2.2.5 have class Any change from that,.. i used follwing…
Subbiah Sudhan
  • 445
  • 1
  • 6
  • 10
1
vote
0 answers

Struts 2 json plugin error java.lang.ClassNotFoundException:

I am using struts 2 json plugin and jquery ui autocomplete i got error like when i check through the firebug 500 Internal Server Error SEVERE: Servlet.service() for servlet default threw exception java.lang.ClassNotFoundException:…
jackyesind
  • 3,343
  • 14
  • 47
  • 74
1
vote
2 answers

Struts2-Jquery Grid CSS Editing

I have a Struts2-jquery Grid component on my webpage. It works perfectly, but how can I edit the CSS rules for the Struts2-jQuery-Grid plugin ? Can I apply my custom CSS rules to this grid view ?
1
vote
1 answer

I'm using the Struts2-jQuery grid plugin and the action is called twice

I follow the example listed here when I load the page or press any button on the grid the method execute is called twice. I want to call it just once. What can I do?
rvazquezglez
  • 2,284
  • 28
  • 40
1
vote
3 answers

Result is null with JSON and Struts2

I have created a simple form in Extjs4.1. I am sending the request to Struts2 framework, and using the Strtus2JSON plugin, i have to recieve the response. But unfortunately, the response is null. Action class public String execute()throws…
Srinivas B
  • 1,821
  • 4
  • 17
  • 35