Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 28th, 2012  |  syntax: None  |  size: 1.28 KB  |  views: 218  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. http://localhost:9090/app/login2.xhtml
  2.        
  3. @Controller
  4. @RequestMapping("/auth")
  5. public class LoginController {
  6.  
  7.  
  8.  @RequestMapping(value = "/login", method = RequestMethod.GET)
  9.  public String getLoginPage(@RequestParam(value="error", required=false) boolean error,
  10.    ModelMap model) {
  11. return "login2.xhtnml";
  12. }
  13.  
  14. }
  15.        
  16. <servlet>
  17. <servlet-name>spring</servlet-name>
  18. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  19. <init-param>
  20.         <param-name>contextConfigLocation</param-name>
  21.         <param-value>
  22.                 classpath:META-INF/spring-servlet.xml
  23.         </param-value>
  24.     </init-param>
  25. <load-on-startup>1</load-on-startup>
  26. </servlet>
  27.  
  28. <servlet-mapping>
  29. <servlet-name>spring</servlet-name>
  30. <url-pattern>/*</url-pattern>
  31. </servlet-mapping>
  32.        
  33. http://localhost:9090/app/login2.xhtml
  34.        
  35. WARN org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/app/login2.xhtml] in DispatcherServlet with name 'spring'
  36.        
  37. <servlet-mapping>
  38. <servlet-name>spring</servlet-name>
  39. <url-pattern>/app/*</url-pattern>
  40. </servlet-mapping>
  41.        
  42. http://localhost:9090/app/auth/login
  43.        
  44. http://localhost:9090/app/app/auth/login
  45.        
  46. <servlet-mapping>
  47.     <servlet-name>spring</servlet-name>
  48.     <url-pattern>/app/*</url-pattern>
  49.     </servlet-mapping>
clone this paste RAW Paste Data