Post请求中的Struts 2问题

时间:2016-10-13 07:07:44

标签: struts2

我的表单中有各种字段。我通过将表单作为get类型交叉检查所有字段,并交叉检查所有查询字符串参数。

现在假设查询字符串中有10个参数,并且在进行操作时有效,我只使用5或6个字段,其余4个字段不在查询字符串中。

现在的问题是,如果我想跟踪我的代码中断的位置,那么如果我在操作开始时放置日志或SOP,它甚至不显示SOP。

只是想清除一些未进入查询且未使用的参数我认为我的代码不应该破坏。或者如何追踪代码破坏的位置

我甚至调试了我的代码,即使是不能正常工作

###################parameters in Query String ###########################

changeReadingFlag=false
&__multiselect_GroupSelect=
&outletId=15
&monthYear=2016-10
&dates%5B0%5D=01%2F10%2F2016
&newMeterReading%5B1%5D=01-Oct-2016
&dates%5B0%5D=01%2F10%2F2016
&newMeterReading%5B1%5D=
&outlettransactionmeterList%5B0%5D.runId=23
&outlettransactionmeterList%5B0%5D.meterReading=500.0
&outlettransactionmeterList%5B0%5D.calculatedMeterUnits=500.0
&hiddenFlag=true
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.change=Add+New+Week+Reading
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.weekno=0
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.customerId=30
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.newMeterId=17
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.outlettransactionmeterList%5B0%5D.meterReading=1200
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.newMeterId=17
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.customerId=30
&meterArrayList%5B1%5D.outletTransactionMeterBeanList%5B0%5D.outlettransactionmeterList%5B0%5D.isClosedAccount=false

在我的action inside方法中,我只使用那些值来自查询字符串的参数。我没有在行动中使用validate()方法。

现在如果我在此功能的开头打印,我是否会得到日志。其实我没有得到日志。

0 个答案:

没有答案
相关问题