Solved

Question about Tomcat 7.x   regarding Alowed HTTP verbs

Posted on 2014-07-27
5
111 Views
Last Modified: 2014-08-29
Is it true the webapp controls the allowance of the VERBS if the webservice accepts it then so does Tomcat or is there
a setting to allow say PUT,GET,POST, DELETE   and what about OPTIONS or the other obscure verbs?
0
Comment
Question by:Robert Silver
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40223117
Not sure I'm following you but if your webapp doesn't recognize the verb then it's not going to do anything so it will end there.
0
 
LVL 2

Author Comment

by:Robert Silver
ID: 40248859
My question was really on a Tomcat 7.x or greater version server by default capable of handling PUT,DELETE, HEAD, OPTIONS and all the typical RESTFUL Verbs or is this fully controlled by what Spring MVC Rest controller specifies in each webapp?
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40248869
controlled by what Spring MVC Rest controller - Simple answer is Yes
0
 
LVL 2

Author Comment

by:Robert Silver
ID: 40248977
Any Spring MVC controller I would  write e.g:
within a Conrtoller  class:
  @RequestMapping(method = RequestMethod.DELETE, value = "/{gameId}")
    ResponseEntity<Void> destroyGame(@PathVariable Long gameId) throws GameDoesNotExistException {
        this.gameRepository.remove(gameId);
        return new ResponseEntity<Void>(HttpStatus.OK);
    }
I mean to ask by default are these HTTP verbs enabled   or should I say not disable in versions 7.x and above?
0
 
LVL 2

Author Closing Comment

by:Robert Silver
ID: 40292907
I would have appreciated a bit of history like when in the history of Tomcat these verbs were enabled by default was that always the case?
I know Trace has to be enabled right? Also taking it another step if Mod_JK or  mod_proxy were used to go through an HTTPD apache server would those HTTP verbs  also be enabled by default Or are there additional settings needed on the Apache HTTPD server???
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The viewer will learn how to dynamically set the form action using jQuery.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now