Announcement Announcement Module
Collapse
No announcement yet.
Is there a conflict between MultipartHttpServletRequest and JSON with Spring 3.0.1? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a conflict between MultipartHttpServletRequest and JSON with Spring 3.0.1?

    I don't know if it's only me but I have been testing my codes for a day now. It seems that there's a problem between MultipartHttpServletRequest and several JSON implementations (MappingJacksonJsonView, JsonView in spring-json or json-lib). I have a form that has several fields including an input of type="file". After submitting the form, my JSON callback function in JavaScript gets executed if I commented out the input field with type="file". But if I put it back on, the callback function is not executed at all. Additionally, the JSON data is streamed to the client. The behavior is like you're downloading an HTML file that contains the JSON data returned from the server. I happened to observe this only on Spring 3.0.1. But with my other project that uses Spring 2.5.1, this is not an issue at all. The following is my setup:

    1. (JAR) spring 3.0.1
    2. (JAR) spring-json 1.3
    3. (JavaScript library) jQuery 1.4.2
    4. (JavaScript library) jQuery form plugin 2.43

    Could someone enlighten me on this? Thanks.
    Last edited by fredsnest; Mar 25th, 2010, 12:35 PM. Reason: Additional information

  • #2
    Nah, I just found out that the issue is really on spring-json. Or it is on JSON-lib since the other JSON libraries I mentioned are built on top of JSON-lib. I tried using lower versions of this library and found out that the maximum version that this issue won't occur is on spring-json 1.0.

    Comment

    Working...
    X