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

How to assign json result to jsp datepickers in struts 2?

I am calling an Action, it returns json as a result in JSP page. My problem is, how to set this json result to my datepickers name varaible. My code is like that.
Jeetu Verma
  • 199
  • 1
  • 5
  • 19
1
vote
1 answer

Struts json result includeProperties regex not working with root present

This question has been asked several times around struts community, the scenario is simple :If you specify myLists in json result definition, the includeProperties won't work if I specify some regEx…
Lopakhin
  • 269
  • 1
  • 3
  • 16
1
vote
2 answers

struts2-rest-plugin: sending json data to PUT/POST

I'm stuck trying to send JSON data to by Struts2 REST server using the struts2-rest-plugin. It works with XML, but I can't seem to figure out the right JSON format to send it in. Anybody has any experience with this? Thanks, Shaun Update: Sorry I…
shaunlim
  • 4,384
  • 6
  • 33
  • 38
1
vote
0 answers

AJAX Call Not Working with Struts2 Spring Plugin

I have a project with Struts2 + Struts2 JQUery + JQ Grid + Struts2 JSON Tags. The project works perfectly and i am able to do most of the JQuery features with AJAX from tabbed panel to Grid. I have multiple struts config file and they are all called…
0
votes
0 answers

Ajax call always going to error function in Struts 2

I am trying to return json from action by ajax call in struts 2 but it's always taking me to the error function. Here i am trying to take the cartsize by ajax call and want to print the cartsize whenever someone click on add to cart but it's taking…
0
votes
1 answer

Not able to display json data on jsp with ajax and struts2 integration

I not able to display the json data on jsp. When i checked for console logs in browser I am able to see the json content in console. Can anyone help me with ajax code to display the data? Web.xml content
0
votes
0 answers

Struts2 Upgrade: Parent package is not defined: json-default

Due to a recent vulnerability identified with Struts 2.33, we are upgrading one of our project to Struts 2.5.10 and while doing this, I see the below error when trying to launch the application. Does anyone know why do I see this? I have below jars…
Prasann
  • 1,263
  • 2
  • 11
  • 18
0
votes
0 answers

How to populate a Calendar object in Struts2

I want to populate a java.util.Calendar field in Struts2 with json data. While trying this I get the following struts error:

Struts Problem Report

Struts has detected an unhandled exception:

Zephir
  • 11
  • 5
0
votes
1 answer

Struts JSON Plug-In doesn't work with Dependency Injection (Spring)

I'm coding a Webapp using Struts 2, Struts 2 JSON Plug-In and Spring(for Dependency Injection). My Problem is that I want to call this Struts Action @Action(value = "preview", results = { @Result(name = "success", type = "json", params = {…
0
votes
0 answers

Java Heap Space Error [Struts2 Json]

I do have a Java web app(strust2) and it does use the struts2-json plugin, for handling json requests. Recently, I came down to an error Java Heap Space which is very strange. This is in my struts.xml
Daler
  • 1,205
  • 3
  • 18
  • 39
0
votes
1 answer

Spring HibernateTemplate using with JSON

I am developing using framework of struts2, spring and hibernate. I used HibernateTemplate of spring. In return data to view by using JSON of struts2 got error (Proxy is detached (i.e session is null)...) in that case when I used struts default…
Aung Thet
  • 3,051
  • 3
  • 13
  • 18
0
votes
1 answer

Struts2JQuery JS Tree generation & binding

How to implement Struts2Jquery js tree to generate a tree and bind a function to the nodes ?
Karthick T
  • 123
  • 1
  • 10
0
votes
0 answers

Struts2 Json-plugin not populating my class

I am trying to send a JSON Object to Struts2 Action with a Java Class, but the Struts not populating the class. I am using JSON Interceptor to do this. I don't receive any error, but the property in the class stay null. My Struts library…
Paulo
  • 101
  • 1
  • 1
  • 6
0
votes
1 answer

How to pass JSON response from struts 2 action class to HTML page

I am working on struts 2 with JSON response Below is my code ACTION CLASS public class JSONDataAction implements ServletRequestAware{ private String firstName; private String lastName; protected HttpServletRequest request; public…
Karthik
  • 1,302
  • 5
  • 25
  • 56
0
votes
1 answer

How to parse received json data in action

I am sending json array data from JSP to Action class for that I have included struts2-json-plugin. I want to parse it to receive it as a ArrayList elements. my code is In JSP: $.ajax({ url: "UpdateNotification", dataType: "json", …
xrcwrn
  • 5,339
  • 17
  • 68
  • 129