Questions tagged [url-pattern]

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.

379 questions
191
votes
5 answers

Difference between / and /* in servlet mapping url pattern

The familiar code: main /* main / My…
Candy Chiu
  • 6,579
  • 9
  • 48
  • 69
141
votes
3 answers

REST API DESIGN - Getting a resource through REST with different parameters but same url pattern

I have a question related to REST URL design. I found some relevant posts here Different RESTful representations of the same resource and here RESTful url to GET resource by different fields but the responses are not quite clear on what the best…
shahshi15
  • 2,772
  • 2
  • 20
  • 24
92
votes
1 answer

Spring: Difference of /** and /* with regards to paths

What's the difference between two asterisks instead of one asterisk when we refer to paths? Earlier I was debugging my Spring 3 project. I was trying to add a .swf using With my…
mpmp
  • 2,409
  • 4
  • 33
  • 46
89
votes
2 answers

Giving multiple URL patterns to Servlet Filter

I am using a Servlet Filter in my JSF application. I have three groups of Web pages in my application, and I want to check Authentication for these pages in my Servlet Filter: my Folders /Admin/ *.xhtml /Supervisor/*.xhtml /Employee/*.xhtml and I…
Raju Boddupalli
  • 1,789
  • 4
  • 21
  • 29
60
votes
1 answer

Sometimes I see JSF URL is *.jsf, sometimes *.xhtml and sometimes /faces/*. Why?

Been try to learn JSF, and sometimes I see the URL is *.jsf and sometimes is *.xhtml or /faces/*. Can someone fill my knowledge, please? When I create a JSF using Facelet, the file extension is .xhtml, so where does .jsf URL extension come from?
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
52
votes
2 answers

What is the significance of url-pattern in web.xml and how to configure servlet?

I have manually configured web.xml for my application. Now, I'm facing issues while running my application. I'm trying to access my servlet from my jsp page. But, it is throwing error as page not found. The servlets are placed under below folder…
gkumar
  • 521
  • 1
  • 4
  • 4
47
votes
1 answer

Django, name parameter in urlpatterns

I'm following a tutorial where my urlpatterns are: urlpatterns = patterns('', url(r'^passwords/$', PasswordListView.as_view(), name='passwords_api_root'), url(r'^passwords/(?P[0-9]+)$', PasswordInstanceView.as_view(),…
Leonardo
  • 4,046
  • 5
  • 44
  • 85
35
votes
4 answers

Spring-Security: Difference Between /** and /* url pattern in Spring-Security

I am little bit confuse with URL-pattern in spring security. Because, in servlet core http security, the / and /* url patterns are used for specify one or more directories. / is use for one directory and /* is used of many directories. But in…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
23
votes
4 answers

In Django, How do you write the url pattern for '/' and other root-based urls

I'm new to django, and one of the things that I'm still learning is url_patterns. I set up a pages app to handle the root path (http://www.mysite.com) as well as some static pages such as the about page. I figured out how to set up the url pattern…
jay
  • 12,066
  • 16
  • 64
  • 103
20
votes
2 answers

@WebFilter exclude url-pattern

I use a filter to check URL patterns for the logged in user. But I have many URL patterns I need to filter. { "/table/*", "/user/*", "/contact/*", "/run/*", "/conf/*", ..., ..., ...} It's becoming unmaintainable. It will be simpler just to…
user2492364
  • 6,543
  • 22
  • 77
  • 147
19
votes
3 answers

Django 1.6 and django-registration: built-in authentication views not picked up

I am trying to upgrade my webapp from Django 1.5 to Django 1.6 and as part of my set of django apps I am using django-registration 1.0. After upgrading to Django 1.6 my app does not recognize the built-in authentication views any more. They are…
yellowcap
  • 3,985
  • 38
  • 51
17
votes
5 answers

Add a prefix to URL patterns

I have a Django application that has several entries in URL patterns (urls.py): urlpatterns = patterns( '', # change Language (r'^i18n/', include('django.conf.urls.i18n')), url('^api/v1/', include(router.urls)), …
QLands
  • 2,424
  • 5
  • 30
  • 50
16
votes
1 answer

Why FacesServlet cannot have a url-pattern of /*.?

This is my web.xml : Faces Servlet /* When I navigate to: http://localhost:8080/LearningRoot/index.xhtml I can see the page just fine, however when I…
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
15
votes
2 answers

Mapping a specific servlet to be the default servlet in Tomcat

I am trying to implement a servlet that gets raw requests, and decide either to process them, or forward them to another backend server. It is similar to a load-balancer, where a received request is forwarded to one of the (in my case 2)…
Virtually Real
  • 1,572
  • 4
  • 16
  • 20
14
votes
2 answers

Getting part of request url inside servlet

I have an EmailVerification Servlet mapped with /ev/* url-pattern. http://example.com/ev/ce52320570 How can I get this ce52320570 part of the URL in my Servlet? protected void doPost(HttpServletRequest request, HttpServletResponse response) …
JAVAGeek
  • 2,674
  • 8
  • 32
  • 52
1
2 3
25 26