• Post Reply Bookmark Topic Watch Topic
  • New Topic

struts2+json mapping issue...  RSS feed

Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am passing values via json to select box...

Currently I am in cules.jsp...

I have a button 'Click' which takes me to tabtest.jsp which contains the 2 select boxes...

First select has countries list...

On selection of a country,I make an ajax call which goes to culesModelAction class to get all cities in that country which should be populated in 2nd select box...

In culesModelAction, I managed to prepare values

in tabtest.jsp after the Ajax call,

I added this for json in struts.xml...

<package name="default1" extends="json-default" >
<action name="Cules" class="CulesModelAction" >
<result type="json">
<param name="root">jsonData</param>

I also have the normal one...

<include file="struts-default.xml"/>
<!-- Configuration for the default package. -->
<package name="default" extends="struts-default">


<action name="cules" class="CulesModelAction">
<result name="success">/jsp/tabtest.jsp</result>
<result name="failure" >/jsp/cules.jsp</result>

Now the problem is before I go to tabtest.jsp to select a country,when i click the button 'Click'(as said above) I get a window and I have no clue about this....

opening rules.action

You have choosen to open rules.action

firefox is allowing you to open or save this file [Browse]

OK Cancel buttons

instead of being directed to tabtest.jsp as it was before adding that json mapping in struts.xml

I get this one...
Current policy properties
thread.thread_num_limited: true
file.write.state: disabled
mmc.sess_cab_act.block_unsigned: false
mmc.sess_cab_act.action: validate
mmc.sess_pe_act.block_blacklisted: false
mmc.sess_pe_act.block_invalid: true
jscan.sess_applet_act.stub_out_blocked_applet: true
jscan.sess_applet_act.block_all: false
window.num_limited: true
file.read.state: disabled
jscan.session.origin_uri: http://jsonplugin.googlecode.com/files/jsonplugin-0.32.jar
file.nondestructive.state: disabled
net.connect_other: false
thread.thread_num_max: 8
jscan.sess_applet_act.sig_invalid: block
mmc.sess_cab_act.block_invalid: true
jscan.session.policyname: TU1DIERlZmF1bHQgUG9saWN5
mmc.sess_pe_act.action: validate
thread.threadgroup_create: false
net.bind_enable: false
jscan.sess_applet_act.sig_trusted: pass
jscan.sess_applet_act.sig_blacklisted: block
jscan.session.daemon_protocol: http
net.connect_src: true
jscan.sess_applet_act.unsigned: instrument
mmc.sess_pe_act.block_unsigned: false
file.destructive.state: disabled
mmc.sess_cab_act.block_blacklisted: true
window.num_max: 5

what could be it? If I remove that json mapping,I dont get this .Anything wrong with the mapping?I can't make it a single mapping,can
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this making any sense at all?Experts kindly look into it. David, this is the new post of the previous issue...
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this totally unclear???
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!