随笔分类 -  Struts

struts2开启调试模式的几种方式
摘要:1.开启调试模式: <constant name="struts.devMode" value="true"></constant>2.调试方式: 2.1 使用标签调试: 在要调试的jsp页面body下,使用<s:debug></s:debug>标签,运行时即可在页面看到一个debug链接。点击进去可查看valueStack的所有信息 2.2 使用url后缀方式: 在每个要请求的url地址后面,添加参数:debug=xml 或 debug=console 或debug=browser xml表示debug结 阅读全文

posted @ 2013-04-07 10:04 qinxike 阅读(1193) 评论(0) 推荐(0)

struts2配置json,警告:no result type defined for type 'json'
摘要:以下讨论struts2返回类型为json时,指定与不指定json对象的根的问题:转自:http://www.worlduc.com/blog2012.aspx?bid=1927439假设在struts.xml中有如下action定义:<action name="product_group" class="customers.products" method="getGroups"> <result type="json"> <param name="root"> 阅读全文

posted @ 2012-12-14 18:08 qinxike 阅读(434) 评论(0) 推荐(0)

导航