java - Invocation of Post-Method causes "405 Method not allowed"-Error -


i i've started dynamic web project on eclipse , java ee , try program restful service. operating system windows 7 , server payara. problem is, "get" , "options" allowed http-methods. tried change web.xml accepts post-requests

web.xml nevertheless still not possible make post-request server. "405 method not allowed"-error.and in response header there still standing "allowed: get, options". there else, must done allow server accept post-requests write web.xml-file?

you 405 error because there no method in rest resource accepts post request type. defined method annotated @get , no method annotated @post. try adding @post annotation on method in rest resource class.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -