Forums

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
Answer

Ankit _

Rank: Junior Member

Posts: 31

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
1
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
1
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.
Ankit