Variable 'app' in url-pattern for servlet mapping
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2010-04-08T17:54:47Z
Indexed on
2010/04/08
18:23 UTC
Read the original article
Hit count: 363
I'm learning Spring MVC (and servlets in general) and following springsource's mvc-ajax example, which uses annotated controller methods. It appears that there is only one url-pattern (in web.xml) mapped to a servlet in that example:
/app/*
I've deployed the app as a WAR file, and the actual, ugly URL I'm requesting is http://127.0.0.1:8080/org.springframework.samples.mvc.ajax-1.0.0-20100407.233245-1/account.
So, it appears that 'app' in '/app/*' is a variable corresponding to 'org.springframework.samples.mvc.ajax-1.0.0-20100407.233245-1', however, it isn't universal because it isn't usable in my own app, and it contradicts my understanding that url-pattern contains the portion of the URL after the app name. So, what is 'app'? Where is it configured?
© Stack Overflow or respective owner