Announcement Announcement Module
Collapse
No announcement yet.
Need the HttpServletRequest in the delete method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need the HttpServletRequest in the delete method

    Hi, I want to overwrite (or push-in) the delete method of the generated controller. In this pushed-in method, I need to access the HttpServletRequest.

    If I add the HttpServletRequest parameter to my method signature, Roo dosen't remove the delete method from the .aj file, leaving me with two delete methods.

    In my Controller.java
    Code:
        @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
        public String delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel, HttpServletRequest request) {
    In Controller_Roo.aj
    Code:
        @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
        public String ApplicationController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
    This used to work in 1.1.2, but it dosen't in 1.1.4.

    So how can I access the HttpServletRequest in my pushed-in delete method?
Working...
X