-2

Hello every one I have a register jsp and I need to send two object(Compte,Personne) please there is any way to send the two to the controller

3
  • Take a look at this: stackoverflow.com/questions/13242394/… Commented Nov 22, 2015 at 16:33
  • You take the different attributes from your request and dispatch them to the correct objects. To send them via the request, you use a form for the post method or the url for the get method... Commented Nov 22, 2015 at 16:34
  • please can you make an example with jsp and post mehod thank you Commented Nov 22, 2015 at 16:36

1 Answer 1

0

You can put your objects: Compte and Personne into: Map<String, Object> objectsMap = new HashMap();. Then in your controller get them by key: objectsMap.get("personne");

Also, try to use Spring Forms and receive object via @ModelAttribute.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.