ZeroTurnaround Support Forum » JRebel Support

Does JRebel support Spring MVC controller to add handling method?

(8 posts)

No tags yet.


  1. gogogo

    guest

    handling method:

    public ModelAndView go(HttpServletRequest request, HttpServletResponse response)

    i found it can't support that.

    Posted 9 months ago #
  2. toomasr

    CoreRebel
    Posts: 482

    Can you elaborate more on it? What are you trying to do, what is expected and what is the actual result.

    Posted 9 months ago #
  3. gogogo

    guest

    1. code sample():
    public class TestController extends MultiActionController{
    public ModelAndView add(HttpServletRequest request, HttpServletResponse response) {
    System.out.println("add");
    return new ModelAndView ("add");
    }

    }

    <bean id="simpleUrlhandlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/test.do">testController </prop>
    </props>
    </property>
    </bean>

    2. then startup tomcat.
    access in IE browser: http://localhost:8080/demo/test.do?doAction=add
    response add.jsp successfully

    3. add a handling method in class TestController:

    public ModelAndView go(HttpServletRequest request, HttpServletResponse response){
    return new ModelAndView ("add");
    }

    4. access url: http://localhost:8080/demo/test.do?doAction=go
    At this time i got a log info in Tomcat console:...handleNoSuchRequestHandlingMethod... No request handling method with name 'go' in class....

    Posted 9 months ago #
  4. gogogo

    guest

    project environment:

    JDK 1.5
    Spring 2.5

    Posted 9 months ago #
  5. gogogo

    Member
    Posts: 2

    Tomcat 6.0.18

    Posted 9 months ago #
  6. toomasr

    CoreRebel
    Posts: 482

    From the source I can tell that this is just something that our JRebel Spring plugin does not reload yet. The SimpleUrlHandlerMapping caches the mappings and does not reload them. I've added a feature request to our system for it.

    Posted 9 months ago #
  7. gogogo

    Member
    Posts: 2

    more info:

    The 'NoSuchRequestHandlingMethodException' exception is throwed by class MultiActionController, code snippet below(copy from class MultiActionController):

    protected final ModelAndView invokeNamedMethod(String methodName, HttpServletRequest request, HttpServletResponse response) throws Exception {

    Method method = (Method) this.handlerMethodMap.get(methodName);
    if (method == null) {
    throw new NoSuchRequestHandlingMethodException(methodName, getClass());
    }
    ......
    }

    Posted 9 months ago #
  8. ubzzcpko

    guest

    G6A3dE apomtvmrrfes, [url=http://mknrwneuyghq.com/]mknrwneuyghq[/url], [link=http://nnewobfqvmnu.com/]nnewobfqvmnu[/link], http://vuthljskulzy.com/

    Posted 7 months ago #

RSS feed for this topic

Reply

(required)

(required)

(optional)

(required)

Allowed markup: a blockquote code em strong ul ol li.
Put code in between `backticks`.

Olark Livehelp