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
0
votes
1 answer

Trouble in getting JSON data from PostgreSQL

I have a database table with JSONB datatype as one of the column. My application is in Struts2 which uses struts2-json.jar to map deal the request and response as JSON. The problem I am facing is that i wish to send the JSON data from a table column…
Lalit Rao
  • 551
  • 5
  • 22
0
votes
2 answers

Why can't I get json from struts 2 action?

I want to send ajax post request to my struts action using jquery like this: $.ajax({ type: "POST", url: "ds/query", data :JSON.stringify(data), dataType:"json", contentType: "application/json;…
west farmer
  • 57
  • 1
  • 1
  • 5
0
votes
0 answers

tags of struts-tags-json are unkonwn

Hi everyone i have a problem when i use a struts-tags-json by a prefix "sj", so when i use the tag on the jsp page it tells me that the tag is unknown. For example is unknown however i import the jar file <%@ taglib uri="/struts-json-tags"…
0
votes
1 answer

Adding JSON jar file to my Struts 2 project gives error: 404 resource not found

I am making a Struts 2 application using jTable which requires use of JSON. For this I am adding a Struts 2 JSON plugin jar to my project struts2-json-plugin-2.3.8.jar Without that jar my project is working fine (obviously without json…
sam100rav
  • 3,733
  • 4
  • 27
  • 43
0
votes
0 answers

Struts2 JQuery grid JSON result hijacking

I am using struts2 jquery grid in my current project.The dataType used in jquery grid is json. Everything works like charm. There was a security audit of my application and they pinpointed the JSON Hijacking vulnerability. I searched the internet…
Jibran
  • 873
  • 7
  • 12
0
votes
1 answer

How to display nested properties of a model class in Struts2 grid?

I have a grid provided by the struts2-jquery-grid-3.7.0 plugin as follows.
Tiny
  • 27,221
  • 105
  • 339
  • 599
0
votes
0 answers

Struts2, type conversion and json plugin (struts2-json-plugin-2.3.14.2)

I have created a web application that simulates an excel spreadsheet. I would like to use Spanish number format. Example 2.345,67 and not american format: 2,345.67 In the server side I save these values in a List of BigDecimal numbers…
Wakerboy135
  • 91
  • 1
  • 7
0
votes
1 answer

how to parse json property in strut2

the follow code is working when i save "name" property as simple string data, but now I want save the "name" as JSON data, such as {"en":"White Rice","cn":"白米","th":"ข้าวขาว"}, and display the name value according to locale language. How can I…
0
votes
1 answer

In Struts, Is it possible to add a global 'json' result for a package?

It seems that in order to define a json result for a struts 2 action, you have to define it seperately for each action, in the following way:
Ali
  • 261,656
  • 265
  • 575
  • 769
0
votes
0 answers

Struts2 Jquery plugin chaning dropdown values holding on JSP submission

My question is regarding struts2 jquery plugin for chaining select boxes. I mean by default when the page jsp gets loaded values are already loaded in the dropdown. When we select a value from the first dropdown, based on the selected value the…
0
votes
1 answer

Struts2 json plugin not working

Following is the jsp wherein i have a struts2 jquery plugin select tag that loads its values asynchronously from an action using json: <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
Gaurav Kumar
  • 1,091
  • 13
  • 31
0
votes
1 answer

changing the labels of JSON Grid

I am using JSON Grid to display values with pagination.It shows page 1 and no records to display when no data in grid etc also for same jsp page i have to apply internationalization i.e i18N properties for chinease and spanish So please let me know…
0
votes
1 answer

Using struts2 json plugin

I have an abstract class that looks like the following with appropriate getters and setters for private properties (left out to keep the post sort): public abstract class CityDistanceAwareAction extends BaseAction implements Preparable { private…
buzzsawddog
  • 662
  • 11
  • 32
0
votes
1 answer

Struts 2 JSON Return back JSON array

It seems that the Struts 2 JSON plugin returns back a object structure ({..ect..}) as the base value by default - Is there a way to configure the struts 2 json plugin such that it returns back an array object, like so? [ { "blah1": "1", …
jtyler
  • 1,055
  • 2
  • 15
  • 22