The URL-pattern element of servlet-mapping or filter-mapping associates a filter or servlet with a set of URLs. When using this tag on implementation heavy questions - tag the code language the implementation is written in.
Questions tagged [url-pattern]
379 questions
1
vote
0 answers
Can we use white spaces in for inside web.xml?
It is part of web.xml from app which runs on JBoss
/*
…

Valdermeyder Hussar
- 119
- 7
1
vote
1 answer
Mapping to a JSON method with url-pattern
I'm creating a Spring MVC application that will have a controller with 'RequestMapping'-annotated methods, including a JSON method. It currently has static content that resides in webapps/static, and the app itself resides in webapps/myapp. I assume…

Brian
- 1,351
- 2
- 15
- 29
1
vote
1 answer
Django url pattern order and regex
There is something I can't understand which is happening with my app.
This is what django documentation says.
Django runs through each URL pattern, in order, and stops at the first one that matches the requested URL.
This is my url pattern which…

foebu
- 1,365
- 2
- 18
- 35
1
vote
1 answer
url-pattern doesn't work in spring mvc application
Spring 3.2 in apache tomcat
web.xml:

user711189
- 4,383
- 4
- 30
- 48
1
vote
2 answers
Similar Django url patterns matches wrong one
It might be a regex issue or rule I'm not familiar with but I essentially have these 2 urls
(r'quote', quote),
(r'email/quote/$', sendQuote),
But when I go to mydomain.com/email/quote it keeps getting caught by the first one. Is there something I'm…

user1561753
- 357
- 2
- 3
- 13
1
vote
1 answer
How do I change the view a URL resolves to after a certain date?
I'm writing a contest app. The contest closes at midnight on a particular date. I want to have the app automatically switch from: using a CookieWizardView, from formtools; to a normal TemplateView, from the generic view library.
Currently the…

0sn
- 13
- 4
1
vote
1 answer
what does passing lambda in urlconf in django mean?
I came across this code inDjangobook. I am not able to understand what this means.
urlpatterns=pattern('django.views.generic',
url(r'^$','simple.direct_to_template',
kwargs={
…

eagertoLearn
- 9,772
- 23
- 80
- 122
1
vote
0 answers
how do I re-write/redirect URLs in Gunicorn web server configuration?
I'm building a Django-based app, and I need it to use secure requests. The secure requests in my site are enabled and manually writing the url gets it through fine.
As I have quite a lot of urls I don't want to do it manually, but instead do…

Sascuash
- 3,661
- 10
- 46
- 65
1
vote
2 answers
Spring controller mapping configuration and static resources
I have an issue with intercepting request to static resources by controller.
Here is web.xml (part related with the problem):
testing
…

Bananan
- 613
- 5
- 19
1
vote
3 answers
The content of element type "servlet-mapping" must match "(servlet-name,url-pattern)"
My file web.xml is
Archetype Created Web…

user2983066
- 80
- 1
- 10
1
vote
1 answer
Omit one parameter from view in Django?
In urls.py urlpatterns I have such declaration:
url(r'^product-(\d+)-([a-zA-Z_]+)$', 'product', name="product"),
Second group in regexp is SEO name not needed in view.
In view I have:
def product(request, product_id, suffix):
but suffix is neither…

pixel
- 24,905
- 36
- 149
- 251
1
vote
4 answers
What's the correct regex for a required string and optional string in Django?
So in my Django URLS I want to be able to support:
mysite.com/section
mysite.com/section/
mysite.com/section/sectionAlphaNum
mysite.com/section/sectionAlphaNum/
I currently have as the URL pattern:
(r'^section/(?P\s?)?', section)
Which should…

Jared Joke
- 1,226
- 2
- 18
- 29
1
vote
3 answers
Django URL Patterns
I've created a very simple blog, but have been running into a couple URL issues. For my tag & specific post views I run into the following issues.
Specific Post View ExampleThese two sites render the same, and would like the second one to render a…

alxmrph
- 99
- 1
- 9
1
vote
1 answer
Tomcat Web xml URL-Pattern does not accept urls with parameters?
I am trying to secure few pages on tomcat6 for a vended application. I was successful with securing using URL-pattern for the most of the URLs except two (marked with double asterisks in the code below). These two URLs are different in that they…

Kalyan
- 488
- 6
- 17
1
vote
1 answer
Serving all REST requests over GET with Tornado
I have a REST (or almost REST) web api,
I want the API users to be able to use all the api, even if for some reason the can only make GET calls, so the plan is to accept a url parameter (query string) like request_method that can be GET (default) or…

Ali
- 18,665
- 21
- 103
- 138