leetgeezer
Mar 26th, 2007, 01:02 PM
Hello,
Let's say I have a server: "test.com", a web-app named "testapp" running on Tomcat 5.5
I can't really figure out how to configure my <servlet-mapping> and/or the controller mapping(s) so that the address
http://server.com/testapp/login
gets mapped to the LoginController.
The problem is that all the examples use something like
<url-pattern>/app/*</url-pattern>
which introduces a redundant (for me) URL fragment. I mean, the URL
becomes then
http://server.com/testapp/app/login
In that case there is no problem to configure the controller.
I tried several configurations of <url-pattern>, namely *, /*, */** etc, but none of them seems to work for me. The request is not redirected to the controller.
How to make it work without the '/app' part?
Let's say I have a server: "test.com", a web-app named "testapp" running on Tomcat 5.5
I can't really figure out how to configure my <servlet-mapping> and/or the controller mapping(s) so that the address
http://server.com/testapp/login
gets mapped to the LoginController.
The problem is that all the examples use something like
<url-pattern>/app/*</url-pattern>
which introduces a redundant (for me) URL fragment. I mean, the URL
becomes then
http://server.com/testapp/app/login
In that case there is no problem to configure the controller.
I tried several configurations of <url-pattern>, namely *, /*, */** etc, but none of them seems to work for me. The request is not redirected to the controller.
How to make it work without the '/app' part?