Welcome to CodeRanch! I added [ code ] tags to make the post easier to read.
Can you try a few debugging things?
2) Add alert("here"); before var P="123"; to see if it is even entering your jQuery code.
3) Look at the server log to see if there is a Servlet configuration error.