2 sinat 16203995 sinat_16203995 于 2015.06.17 13:55 提问

springmvc jquery传递数组,

代码目的是把前台被选中的选项的id存入数组,再将数组传给input.通过form提交,在控制器拦截到并接收这个数组.
但是我现在接收到的是一个字符串.
同样的前台页面与拦截器代码.在另外一台笔记本上接收的是一个id数组.搞不清为啥
恳请各位解答
以下是源码.前台
1.<!DOCTYPE html >



<!--zui.js,jQuery.js用于菜单的展现-->



问卷详情

${survey.description}


$(document).ready(function(){ $("#tijiao").click(function(){ var c=[]; // $("input[type=checkbox]:checked").each(function(){ $("input:checked").each(function(){ c.push($(this).attr('value')); }) $("#data").val(c); alert($("#data").val()); }); });

<#if questions??>

  1. ${question.description}


  2. ${answer.options}.${answer.description}
    #list> ${answer.options}.${answer.description}
    #list> #if> 其他其他#if> #if>
    #list>

</#if>



<#---->
点我


拦截器代码如下
@RequestMapping("/surveyResult")
public String surveyResult(
String[] answerids) {
System.out.println(answerids.length);
return "/admin/success";
}

输出的数值为1.

debug日志如下

5个回答

sinat_16203995
sinat_16203995   2015.06.17 13:56

2015-06-17 13:46:48,235 DEBUG (org.springframework.web.servlet.DispatcherServlet:845) - DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/background/surveyDetail]
2015-06-17 13:46:48,237 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:297) - Looking up handler method for path /background/surveyDetail
2015-06-17 13:46:48,237 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:302) - Returning handler method [public java.lang.String com.springapp.mvc.web.AdminController.surveyDetail(int,org.springframework.ui.ModelMap) throws java.net.UnknownHostException]
2015-06-17 13:46:48,237 DEBUG (org.springframework.web.servlet.DispatcherServlet:931) - Last-Modified value for [/background/surveyDetail] is: -1
2015-06-17 13:46:48,358 DEBUG (org.springframework.web.servlet.DispatcherServlet:1225) - Rendering view [org.springframework.web.servlet.view.freemarker.FreeMarkerView: name 'back/surveyDetail'; URL [back/surveyDetail.ftl]] in DispatcherServlet with name 'mvc-dispatcher'
2015-06-17 13:46:48,358 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'CharacterEncodingFilter.FILTERED' with value [true] to model
2015-06-17 13:46:48,358 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER' with value [org.springframework.web.servlet.support.SessionFlashMapManager@286684] to model
2015-06-17 13:46:48,358 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE' with value [WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Jun 17 10:21:03 CST 2015]; parent: Root WebApplicationContext] to model
2015-06-17 13:46:48,358 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER' with value [org.springframework.web.servlet.theme.FixedThemeResolver@1bf0b4a] to model
2015-06-17 13:46:48,359 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.CONTEXT' with value [WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Jun 17 10:21:03 CST 2015]; parent: Root WebApplicationContext] to model
2015-06-17 13:46:48,359 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.core.convert.ConversionService' with value [ConversionService converters =
@org.springframework.format.annotation.DateTimeFormat java.lang.Long -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008,@org.springframework.format.annotation.NumberFormat java.lang.Long -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.DateTimeFormat java.util.Calendar -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
@org.springframework.format.annotation.DateTimeFormat java.util.Date -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
@org.springframework.format.annotation.NumberFormat java.lang.Byte -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Double -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Float -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Integer -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Short -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.math.BigDecimal -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.math.BigInteger -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.Boolean -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1d79d84
java.lang.Character -> java.lang.Number : org.springframework.core.convert.support.CharacterToNumberFactory@f3d93d
java.lang.Character -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1215260
java.lang.Enum -> java.lang.String : org.springframework.core.convert.support.EnumToStringConverter@83c633
java.lang.Long -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$LongToCalendarConverter@33794f
java.lang.Long -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$LongToDateConverter@14fae2a
java.lang.Number -> java.lang.Character : org.springframework.core.convert.support.NumberToCharacterConverter@a759ba
java.lang.Number -> java.lang.Number : org.springframework.core.convert.support.NumberToNumberConverterFactory@14fa2b3
java.lang.Number -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@798009
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.lang.Long: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008,java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Long: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Calendar: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Date: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Byte: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Double: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Float: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Integer: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Short: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigDecimal: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigInteger: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> java.lang.Boolean : org.springframework.core.convert.support.StringToBooleanConverter@13b43ab
java.lang.String -> java.lang.Character : org.springframework.core.convert.support.StringToCharacterConverter@c4eeea
java.lang.String -> java.lang.Enum : org.springframework.core.convert.support.StringToEnumConverterFactory@a66e0f
java.lang.String -> java.lang.Number : org.springframework.core.convert.support.StringToNumberConverterFactory@142c49a
java.lang.String -> java.util.Locale : org.springframework.core.convert.support.StringToLocaleConverter@1497d1b
java.lang.String -> java.util.Properties : org.springframework.core.convert.support.StringToPropertiesConverter@1e4e7b8
java.lang.String -> java.util.UUID : org.springframework.core.convert.support.StringToUUIDConverter@a1b248
java.util.Calendar -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToLongConverter@1a74f6d
java.util.Calendar -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToDateConverter@17b5381
java.util.Date -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$DateToLongConverter@1597a76
java.util.Date -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$DateToCalendarConverter@176e807
java.util.Locale -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1b4a983
java.util.Properties -> java.lang.String : org.springframework.core.convert.support.PropertiesToStringConverter@128e828
java.util.UUID -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1bfa8c8
org.springframework.core.convert.support.ArrayToArrayConverter@18288ea
org.springframework.core.convert.support.ArrayToCollectionConverter@1e20431
org.springframework.core.convert.support.ArrayToObjectConverter@a2e9dc
org.springframework.core.convert.support.ArrayToStringConverter@8b9e88
org.springframework.core.convert.support.ByteBufferConverter@13c007e
org.springframework.core.convert.support.ByteBufferConverter@13c007e
org.springframework.core.convert.support.CollectionToArrayConverter@1813415
org.springframework.core.convert.support.CollectionToCollectionConverter@eae88f
org.springframework.core.convert.support.CollectionToObjectConverter@1388e18
org.springframework.core.convert.support.CollectionToStringConverter@dd52d8
org.springframework.core.convert.support.FallbackObjectToStringConverter@2d40c2
org.springframework.core.convert.support.IdToEntityConverter@447cf0,org.springframework.core.convert.support.ObjectToObjectConverter@66832a
org.springframework.core.convert.support.MapToMapConverter@4a08db
org.springframework.core.convert.support.ObjectToArrayConverter@1a793df
org.springframework.core.convert.support.ObjectToCollectionConverter@1f8e3ed
org.springframework.core.convert.support.StringToArrayConverter@552f85
org.springframework.core.convert.support.StringToCollectionConverter@69f0af
] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping' with value [/background/surveyDetail] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER' with value [org.springframework.web.context.request.async.WebAsyncManager@10d5616] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.resource.ResourceUrlProvider' with value [org.springframework.web.servlet.resource.ResourceUrlProvider@472108] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP' with value [FlashMap [attributes={}, targetRequestPath=null, targetRequestParams={}]] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.uriTemplateVariables' with value [{}] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.bestMatchingPattern' with value [/background/surveyDetail] to model
2015-06-17 13:46:48,363 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER' with value [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver@a8d33e] to model
2015-06-17 13:46:48,364 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'ip' of type [java.lang.String] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,365 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'a' of type [java.lang.Integer] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,365 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'ausers' of type [java.util.ArrayList] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,369 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'questions' of type [java.util.ArrayList] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,369 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'survey' of type [com.springapp.mvc.entity.Survey] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,369 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.validation.BindingResult.survey' of type [org.springframework.validation.BeanPropertyBindingResult] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,369 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'request' of type [org.springframework.web.servlet.support.RequestContext] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'CharacterEncodingFilter.FILTERED' of type [java.lang.Boolean] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER' of type [org.springframework.web.servlet.support.SessionFlashMapManager] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE' of type [org.springframework.web.context.support.XmlWebApplicationContext] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER' of type [org.springframework.web.servlet.theme.FixedThemeResolver] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.CONTEXT' of type [org.springframework.web.context.support.XmlWebApplicationContext] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.core.convert.ConversionService' of type [org.springframework.format.support.DefaultFormattingConversionService] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping' of type [java.lang.String] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,370 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER' of type [org.springframework.web.context.request.async.WebAsyncManager] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,371 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.resource.ResourceUrlProvider' of type [org.springframework.web.servlet.resource.ResourceUrlProvider] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,371 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP' of type [org.springframework.web.servlet.FlashMap] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,371 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.uriTemplateVariables' of type [java.util.LinkedHashMap] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,373 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.bestMatchingPattern' of type [java.lang.String] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,373 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER' of type [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,373 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'springMacroRequestContext' of type [org.springframework.web.servlet.support.RequestContext] to request in view with name 'back/surveyDetail'
2015-06-17 13:46:48,374 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:279) - Rendering FreeMarker template [back/surveyDetail.ftl] in FreeMarkerView 'back/surveyDetail'
2015-06-17 13:46:48,377 DEBUG (org.springframework.web.servlet.DispatcherServlet:996) - Successfully completed request
2015-06-17 13:46:48,393 DEBUG (org.springframework.web.servlet.DispatcherServlet:845) - DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/dist/css/zui.css]
2015-06-17 13:46:48,393 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:297) - Looking up handler method for path /dist/css/zui.css
2015-06-17 13:46:48,395 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:305) - Did not find handler method for [/dist/css/zui.css]
2015-06-17 13:46:48,395 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:169) - Matching patterns for request [/dist/css/zui.css] are [/dist/**]
2015-06-17 13:46:48,395 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:194) - URI Template variables for request [/dist/css/zui.css] are {}
2015-06-17 13:46:48,395 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:124) - Mapping [/dist/css/zui.css] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/dist/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@629153]]] and 1 interceptor
2015-06-17 13:46:48,396 DEBUG (org.springframework.web.servlet.DispatcherServlet:931) - Last-Modified value for [/dist/css/zui.css] is: -1
2015-06-17 13:46:48,396 DEBUG (org.springframework.web.servlet.DispatcherServlet:845) - DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/dist/lib/jquery/jquery.js]
2015-06-17 13:46:48,396 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:297) - Looking up handler method for path /dist/lib/jquery/jquery.js
2015-06-17 13:46:48,396 DEBUG (org.springframework.web.servlet.DispatcherServlet:1018) - Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
2015-06-17 13:46:48,396 DEBUG (org.springframework.web.servlet.DispatcherServlet:996) - Successfully completed request
2015-06-17 13:46:48,398 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:305) - Did not find handler method for [/dist/lib/jquery/jquery.js]
2015-06-17 13:46:48,399 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:169) - Matching patterns for request [/dist/lib/jquery/jquery.js] are [/dist/**]
2015-06-17 13:46:48,399 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:194) - URI Template variables for request [/dist/lib/jquery/jquery.js] are {}
2015-06-17 13:46:48,399 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:124) - Mapping [/dist/lib/jquery/jquery.js] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/dist/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@629153]]] and 1 interceptor
2015-06-17 13:46:48,399 DEBUG (org.springframework.web.servlet.DispatcherServlet:931) - Last-Modified value for [/dist/lib/jquery/jquery.js] is: -1
2015-06-17 13:46:48,400 DEBUG (org.springframework.web.servlet.DispatcherServlet:1018) - Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
2015-06-17 13:46:48,400 DEBUG (org.springframework.web.servlet.DispatcherServlet:996) - Successfully completed request
2015-06-17 13:46:48,404 DEBUG (org.springframework.web.servlet.DispatcherServlet:845) - DispatcherServlet with name 'mvc-dispatcher' processing GET request for [/dist/js/zui.js]
2015-06-17 13:46:48,404 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:297) - Looking up handler method for path /dist/js/zui.js
2015-06-17 13:46:48,407 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:305) - Did not find handler method for [/dist/js/zui.js]
2015-06-17 13:46:48,408 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:169) - Matching patterns for request [/dist/js/zui.js] are [/dist/**]
2015-06-17 13:46:48,408 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:194) - URI Template variables for request [/dist/js/zui.js] are {}
2015-06-17 13:46:48,408 DEBUG (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping:124) - Mapping [/dist/js/zui.js] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/dist/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@629153]]] and 1 interceptor
2015-06-17 13:46:48,408 DEBUG (org.springframework.web.servlet.DispatcherServlet:931) - Last-Modified value for [/dist/js/zui.js] is: -1
2015-06-17 13:46:48,409 DEBUG (org.springframework.web.servlet.DispatcherServlet:1018) - Null ModelAndView returned to DispatcherServlet with name 'mvc-dispatcher': assuming HandlerAdapter completed request handling
2015-06-17 13:46:48,409 DEBUG (org.springframework.web.servlet.DispatcherServlet:996) - Successfully completed request
2015-06-17 13:46:54,192 DEBUG (org.springframework.web.servlet.DispatcherServlet:845) - DispatcherServlet with name 'mvc-dispatcher' processing POST request for [/background/surveyResult]
2015-06-17 13:46:54,192 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:297) - Looking up handler method for path /background/surveyResult
2015-06-17 13:46:54,193 DEBUG (org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping:302) - Returning handler method [public java.lang.String com.springapp.mvc.web.AdminController.surveyResult(java.lang.String[])]
1
2015-06-17 13:46:54,194 DEBUG (org.springframework.web.servlet.DispatcherServlet:1225) - Rendering view [org.springframework.web.servlet.view.freemarker.FreeMarkerView: name '/admin/success'; URL [/admin/success.ftl]] in DispatcherServlet with name 'mvc-dispatcher'
2015-06-17 13:46:54,195 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'CharacterEncodingFilter.FILTERED' with value [true] to model
2015-06-17 13:46:54,195 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER' with value [org.springframework.web.servlet.support.SessionFlashMapManager@286684] to model
2015-06-17 13:46:54,195 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE' with value [WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Jun 17 10:21:03 CST 2015]; parent: Root WebApplicationContext] to model
2015-06-17 13:46:54,196 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER' with value [org.springframework.web.servlet.theme.FixedThemeResolver@1bf0b4a] to model
2015-06-17 13:46:54,196 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.CONTEXT' with value [WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Jun 17 10:21:03 CST 2015]; parent: Root WebApplicationContext] to model
2015-06-17 13:46:54,197 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.core.convert.ConversionService' with value [ConversionService converters =
@org.springframework.format.annotation.DateTimeFormat java.lang.Long -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008,@org.springframework.format.annotation.NumberFormat java.lang.Long -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.DateTimeFormat java.util.Calendar -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
@org.springframework.format.annotation.DateTimeFormat java.util.Date -> java.lang.String: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
@org.springframework.format.annotation.NumberFormat java.lang.Byte -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Double -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Float -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Integer -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.lang.Short -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.math.BigDecimal -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
@org.springframework.format.annotation.NumberFormat java.math.BigInteger -> java.lang.String: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.Boolean -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1d79d84
java.lang.Character -> java.lang.Number : org.springframework.core.convert.support.CharacterToNumberFactory@f3d93d
java.lang.Character -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1215260
java.lang.Enum -> java.lang.String : org.springframework.core.convert.support.EnumToStringConverter@83c633
java.lang.Long -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$LongToCalendarConverter@33794f
java.lang.Long -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$LongToDateConverter@14fae2a
java.lang.Number -> java.lang.Character : org.springframework.core.convert.support.NumberToCharacterConverter@a759ba
java.lang.Number -> java.lang.Number : org.springframework.core.convert.support.NumberToNumberConverterFactory@14fa2b3
java.lang.Number -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@798009
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.lang.Long: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008,java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Long: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Calendar: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
java.lang.String -> @org.springframework.format.annotation.DateTimeFormat java.util.Date: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory@f69008
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Byte: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Double: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Float: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Integer: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.lang.Short: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigDecimal: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> @org.springframework.format.annotation.NumberFormat java.math.BigInteger: org.springframework.format.number.NumberFormatAnnotationFormatterFactory@16a1447
java.lang.String -> java.lang.Boolean : org.springframework.core.convert.support.StringToBooleanConverter@13b43ab
java.lang.String -> java.lang.Character : org.springframework.core.convert.support.StringToCharacterConverter@c4eeea
java.lang.String -> java.lang.Enum : org.springframework.core.convert.support.StringToEnumConverterFactory@a66e0f
java.lang.String -> java.lang.Number : org.springframework.core.convert.support.StringToNumberConverterFactory@142c49a
java.lang.String -> java.util.Locale : org.springframework.core.convert.support.StringToLocaleConverter@1497d1b
java.lang.String -> java.util.Properties : org.springframework.core.convert.support.StringToPropertiesConverter@1e4e7b8
java.lang.String -> java.util.UUID : org.springframework.core.convert.support.StringToUUIDConverter@a1b248
java.util.Calendar -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToLongConverter@1a74f6d
java.util.Calendar -> java.util.Date : org.springframework.format.datetime.DateFormatterRegistrar$CalendarToDateConverter@17b5381
java.util.Date -> java.lang.Long : org.springframework.format.datetime.DateFormatterRegistrar$DateToLongConverter@1597a76
java.util.Date -> java.util.Calendar : org.springframework.format.datetime.DateFormatterRegistrar$DateToCalendarConverter@176e807
java.util.Locale -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1b4a983
java.util.Properties -> java.lang.String : org.springframework.core.convert.support.PropertiesToStringConverter@128e828
java.util.UUID -> java.lang.String : org.springframework.core.convert.support.ObjectToStringConverter@1bfa8c8
org.springframework.core.convert.support.ArrayToArrayConverter@18288ea
org.springframework.core.convert.support.ArrayToCollectionConverter@1e20431
org.springframework.core.convert.support.ArrayToObjectConverter@a2e9dc
org.springframework.core.convert.support.ArrayToStringConverter@8b9e88
org.springframework.core.convert.support.ByteBufferConverter@13c007e
org.springframework.core.convert.support.ByteBufferConverter@13c007e
org.springframework.core.convert.support.CollectionToArrayConverter@1813415
org.springframework.core.convert.support.CollectionToCollectionConverter@eae88f
org.springframework.core.convert.support.CollectionToObjectConverter@1388e18
org.springframework.core.convert.support.CollectionToStringConverter@dd52d8
org.springframework.core.convert.support.FallbackObjectToStringConverter@2d40c2
org.springframework.core.convert.support.IdToEntityConverter@447cf0,org.springframework.core.convert.support.ObjectToObjectConverter@66832a
org.springframework.core.convert.support.MapToMapConverter@4a08db
org.springframework.core.convert.support.ObjectToArrayConverter@1a793df
org.springframework.core.convert.support.ObjectToCollectionConverter@1f8e3ed
org.springframework.core.convert.support.StringToArrayConverter@552f85
org.springframework.core.convert.support.StringToCollectionConverter@69f0af
] to model
2015-06-17 13:46:54,198 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping' with value [/background/surveyResult] to model
2015-06-17 13:46:54,198 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER' with value [org.springframework.web.context.request.async.WebAsyncManager@58a7a] to model
2015-06-17 13:46:54,198 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.resource.ResourceUrlProvider' with value [org.springframework.web.servlet.resource.ResourceUrlProvider@472108] to model
2015-06-17 13:46:54,199 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP' with value [FlashMap [attributes={}, targetRequestPath=null, targetRequestParams={}]] to model
2015-06-17 13:46:54,199 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.uriTemplateVariables' with value [{}] to model
2015-06-17 13:46:54,199 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.HandlerMapping.bestMatchingPattern' with value [/background/surveyResult] to model
2015-06-17 13:46:54,200 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:128) - Exposing request attribute 'org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER' with value [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver@a8d33e] to model
2015-06-17 13:46:54,214 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'request' of type [org.springframework.web.servlet.support.RequestContext] to request in view with name '/admin/success'
2015-06-17 13:46:54,214 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'CharacterEncodingFilter.FILTERED' of type [java.lang.Boolean] to request in view with name '/admin/success'
2015-06-17 13:46:54,214 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER' of type [org.springframework.web.servlet.support.SessionFlashMapManager] to request in view with name '/admin/success'
2015-06-17 13:46:54,215 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE' of type [org.springframework.web.context.support.XmlWebApplicationContext] to request in view with name '/admin/success'
2015-06-17 13:46:54,215 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER' of type [org.springframework.web.servlet.theme.FixedThemeResolver] to request in view with name '/admin/success'
2015-06-17 13:46:54,215 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.CONTEXT' of type [org.springframework.web.context.support.XmlWebApplicationContext] to request in view with name '/admin/success'
2015-06-17 13:46:54,215 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.core.convert.ConversionService' of type [org.springframework.format.support.DefaultFormattingConversionService] to request in view with name '/admin/success'
2015-06-17 13:46:54,218 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.pathWithinHandlerMapping' of type [java.lang.String] to request in view with name '/admin/success'
2015-06-17 13:46:54,218 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER' of type [org.springframework.web.context.request.async.WebAsyncManager] to request in view with name '/admin/success'
2015-06-17 13:46:54,218 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.resource.ResourceUrlProvider' of type [org.springframework.web.servlet.resource.ResourceUrlProvider] to request in view with name '/admin/success'
2015-06-17 13:46:54,218 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP' of type [org.springframework.web.servlet.FlashMap] to request in view with name '/admin/success'
2015-06-17 13:46:54,218 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.uriTemplateVariables' of type [java.util.LinkedHashMap] to request in view with name '/admin/success'
2015-06-17 13:46:54,219 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.HandlerMapping.bestMatchingPattern' of type [java.lang.String] to request in view with name '/admin/success'
2015-06-17 13:46:54,219 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER' of type [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver] to request in view with name '/admin/success'
2015-06-17 13:46:54,219 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:432) - Added model object 'springMacroRequestContext' of type [org.springframework.web.servlet.support.RequestContext] to request in view with name '/admin/success'
2015-06-17 13:46:54,222 DEBUG (org.springframework.web.servlet.view.freemarker.FreeMarkerView:279) - Rendering FreeMarker template [/admin/success.ftl] in FreeMarkerView '/admin/success'
2015-06-17 13:46:54,225 DEBUG (org.springframework.web.servlet.DispatcherServlet:996) - Successfully completed request

bulusli3
bulusli3   Ds   Rxr 2015.06.17 14:33

你的这句$("$data").val(c)其实是把调用了$("$data").val(c.toString()),而c.toString()会将数组中的内容按照逗号进行隔开,形成一个字符串。

sinat_16203995
sinat_16203995 xiexie
2 年多之前 回复
beacon_2011
beacon_2011   Rxr 2015.06.17 21:40

没粘全啊,看不到传值的部分

cuiwei1026522829
cuiwei1026522829   Ds   Rxr 2015.06.17 23:50

感觉页面的代码没有粘贴完全啊

wojiushiwo945you
wojiushiwo945you   Ds   Rxr 2015.11.10 21:21

一般的传递多个id通常都是使用字符串以“,”隔开,然后后台接受到后再split解析成id数组的。
你是怎么将数组数据存入input的呢?有没有可能存储的不是数组,而就是字符串呢?

Csdn user default icon
上传中...
上传图片
插入图片