Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Ankit _
Using JSON in struts2 portlet
February 7, 2013 8:40 PM

Ankit _

Rank: Junior Member

Posts: 46

Join Date: October 18, 2012

Recent Posts

Hi All,

As struts2 feature, we can directly access the Struts2 Action class variable in to jsp if their getter method is there.
My struts.xml file's package statement is below
2<package name="default" namespace="/view" extends="struts-portlet-default">

Its working fine for me till,
but when i use JSON including struts2-json-plugin and for JSON response i just changed my package statement as below
2<package name="default" namespace="/view" extends="struts-portlet-default,json-default">

after appending json-default in my package statement, i can't access all my Action class instance variable in my jsp.
maybe that after appending json-default , it will try to return json format, i am not sure, how can i figure it out ?

Thanks in advance.
sri p
RE: Using JSON in struts2 portlet
July 30, 2014 1:59 PM

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

Hello Ankit,

I am trying to do some ajax validation and trying to extend "json-default" apart from "struts-portlet-default".
But, I am not able to succeed, could you please let me know configurations, if it worked for you ?
I really appreciate your response.

Thank you,