Hi,
ich muss in ein großes bestehendes Projekt einen Controller einfügen.
@Controller
@RequestMapping("/lab")
public class labController {
@ResponseBody
@RequestMapping(value = "/login/{username}&{password}", method = RequestMethod.GET)
public login(@PathVariable(value = "username") final String username,
@PathVariable(value = "password") final String password) throws Exception { [... ]
Die context.xml Datei:
<?xml version="1.0" encoding="UTF-8"?> <Context path="/webportal"/>
web.xml
<!-- SERVLET MAPPING FOR REST start --> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <!-- SERVLET MAPPING FOR REST end -->
Ich weiß aber nicht wie die URL zur ActionMethode Login geht. Wie finde ich das raus?
Ich habe schon folgendes probiert erhalte aber immer eine 404:
http://localhost:8080/webportal/lab/login/
http://localhost:8080/webportal/services/lab/login/
http://localhost:8080/webportal/lab/services/login/
Hat noch jemand eine Idee?