File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error when submitting form using SpringMVC and REST

 
James Dekker
Ranch Hand
Posts: 221
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

Created an online form in JSP using SpringMVC tag libraries. The controller for my form is a RESTful web service.

The RESTful web service has two calls:

(1) http://localhost:8080/myapp/applications/new

This brings up the online form in the browser (this works).

(2) http://localhost:8080/myapp/applications/create

This saves the form data to a database (handles submit). This is where it breaks.

Followed the conventions from the sample demo petclinic app which comes with the Spring Framework.

Online form:



The RESTful web service which serves as form controller:



Exception thrown when I click on submit:



Does anyone know why I am getting this exception?

Would really appreciate it if someone could help me with this issue...

Happy programming and thank you for taking the time to read this.
 
James Dekker
Ranch Hand
Posts: 221
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found the solution!

It was a RESTEasy problem... The fix was putting the @Form Application App inside the parameter list and prepending the domain model object's setters with @FormParam("name").

Source: Integrating RESTEasy with SpringMVC
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic