Search:

Type: Posts; User: kblair; Keyword(s):

Search: Search took 0.04 seconds.

  1. Perhaps when the return type is Object they...

    Perhaps when the return type is Object they default to using toString(). The toString() for a ModelAndView does not return the view name.

    If you specified the return type, which you should, then...
  2. Lookup URI templates in the manual. ...

    Lookup URI templates in the manual.



    @RequestMapping("name/{name}/course/{course}")
    public void doSomething(@PathVariable String name, @PathVariable String course) {}
  3. Replies
    2
    Views
    450

    You have your servlet and thus your controller...

    You have your servlet and thus your controller mapped to http://localhost:8080/ not http://localhost:8080/FantasyPro/.
  4. I did exactly that using composition. This seems...

    I did exactly that using composition. This seems to work so far.



    package com.hcareers.web.view;

    import java.util.Locale;
    import org.springframework.core.Ordered;
    import...
  5. Replies
    5
    Views
    1,322

    Post your XML configuration, the request mapping...

    Post your XML configuration, the request mapping and the view you're returning.

    It's impossible for someone to tell you why your view resolution doesn't work if you haven't posted anything showing...
  6. Is there a way to selectively override a view?

    I would like to use view "a" if it exists and if it does not default to view "b". I've been scouring the MVC documentation and Google and I don't see any way to do this without writing a custom...
  7. You can use "redirect:" or "forward:" for this. ...

    You can use "redirect:" or "forward:" for this.



    @Controller
    @RequestMapping("/")
    public class MyController {

    @RequestMapping("logout")
    public String logout() {
  8. Replies
    5
    Views
    1,322

    Have you tried using "/" instead of "/*"? ...

    Have you tried using "/" instead of "/*"?



    <servlet-mapping>
    <servlet-name>MyServlet</servlet-name>
    <url-pattern>/</url-pattern>
    </servlet-mapping>
  9. Replies
    4
    Views
    1,327

    Is a view not getting resolved or is the...

    Is a view not getting resolved or is the expression language not working? In my case the view resolved fine, the problem was the page output "${test}" instead of "This is a test." which is...
  10. Replies
    4
    Views
    1,327

    I actually have both working now. I'm not sure...

    I actually have both working now. I'm not sure what changed, it might have been setting the viewClass to JstlView. I've been working on so many different frameworks and application servers the last...
  11. Found a solution. Create a controller that...

    Found a solution.

    Create a controller that will handle unmapped requests. In my case it needs to forward to a legacy servlet that handles pages not yet converted to Spring MVC.



    @Controller...
  12. Replies
    4
    Views
    1,327

    JSP doesn't load attributes from model

    I would dearly like to know what I'm missing here. Expressions in my JSP only seem to work when returning a ModelAndView.

    Controller:


    @Controller
    public class TestController {

    ...
  13. I would like to do exactly this as well. This...

    I would like to do exactly this as well. This thread isn't very old -- is there no way to accomplish this in Spring MVC? I basically just need a "catch all" controller that then forwards to...
Results 1 to 13 of 13