Solved

Question about Tomcat 7.x   regarding Alowed HTTP verbs

Posted on 2014-07-27
5
115 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

734 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