java – Error while trying to update data in a form

Controller who performs the action

@RequestMapping (value = "/ post / modifyPost", method = RequestMethod.POST)
public String updatePost (@RequestParam ("title") Title of the string,
@RequestParam ("content") Content of string,
ModelMap m,
HttpSession s) {
Post p = (Post) s.getAttribute ("postData");
System.out.println (title);
System.out.println (content);
p.setTitle (title);
p.setContent (content);
repoPost.save (p);
returns "redirect: /";
}

Form that collects the data

Edit post

Error returned by the console

2018-11-29 09: 05: 18.295 ERROR 7728 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service () for servlet [dispatcherServlet] in the context of the path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with deep cause

java.lang.NullPointerException: null
at the address com.example.demo.controllers.PostController.updatePost (PostController.java:169) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native method) ~[na:1.8.0_161]
    at sun.reflect.NativeMethodAccessorImpl.invoke (Source unknown) ~[na:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (Source unknown) ~[na:1.8.0_161]

The problem is that it gives me a NullPointer trying to update the data, that is to say when I'm doing the setTitle o setContent.
I've tried to show the data with a 'System.out.println'. and recover them, but I still get the "NullPointerException".