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
2
votes
2 answers
@WebServlet Annotation and servlet-mapping differences
In my servlet class, I have annotated the class with:
@WebServlet("/OnlinePostListener/testFromAnnotation")
public class OnlinePostListener extends HttpServlet {
...
}
My web.xml contains the following:
…

Steve C
- 322
- 1
- 5
- 11
2
votes
1 answer
RESTful servlet URLs - servlet-mapping in web.xml
I feel like this is a common problem but nothing I've researched has worked yet...
In my web.xml I have a mapping for all REST calls -
springmvc
/rest/*
…

John Strickler
- 25,151
- 4
- 52
- 68
1
vote
0 answers
Not Found in ExternalContext as a Resource whilst running .xhtml in JSF
I created a dynamic web project in Eclipse and added the JSF jars manually to the lib (instead using maven). I provided faces servlet configuration in web.xml.
I am trying to see the hello.xhtml output of the file placed webinf folder. But it is…

droidsites
- 1,035
- 4
- 16
- 29
1
vote
2 answers
Spring MVC url-mapping
I made a simple web application by Spring mvc.
I want to use these URL
/user
/user/{id}
/user/create
/user/edit/{id}
in web.xml
first case
SpringMVC1
/ …

Jaime
- 2,148
- 1
- 16
- 19
1
vote
1 answer
web.xml exclusive url-pattern
I want to restrict access to the whole application
/*
But not to some Servlets. They should be public.
Is there a way to do that easily (I imagine some exclusion or maybe overriding?) or do I have to arrange files in…

niklas
- 2,887
- 3
- 38
- 70
1
vote
0 answers
Filter out / remove extension from spring rest api
I had to upgrade the dependencies of a project from:
org.springframework.boot
spring-boot-starter-parent
2.2.4.RELEASE
To the version…

Jakkins
- 115
- 11
1
vote
1 answer
ImportError: cannot import name 'urlpatterns' from 'django'
I am trying to run my first Django application and when I run server I get the following error:
ImportError: cannot import name 'urlpatterns' from 'django'…

c2000
- 11
- 3
1
vote
0 answers
How to handle GET requests when there are no matching resources?
Given a resource called pets, there should be two ways of retrieving the resource with the pet endpoint:
GET .../pets/{petId} - retrieve a pet by its id
GET .../pets/ - retrieves all pets
How should the API respond when the database doesn't find…

zaza
- 892
- 1
- 18
- 37
1
vote
0 answers
django.core.exceptions.ImproperlyConfigured ,The included URLconf 'simplesocial.urls' does not appear
django.core.exceptions.ImproperlyConfigured: The included URLconf 'simplesocial.urls' does not appear to have any patterns in it. If you
see the 'urlpatterns' variable with valid patterns in the file then the issue is probably caused by a circular…

Arnab Laha
- 11
- 1
1
vote
1 answer
URL pattern for query string parameters Django REST Framework
This is my current url path is as http://localhost:8000/api/projects/abcml/2021
and in the urls.py page I am passing as path("api/projects//", functionname...) and in the view, I accept this parameters with…

Hardik Patil
- 515
- 1
- 4
- 16
1
vote
1 answer
Firebase Dynamic Link Url patterns
I need to add url patterns for a domain that has multiple subdomains in the Url.
For example:
https://demo.site1.mybrand.company/ Where .company is the top-level domain and mybrand is the domain.
The problem is that the demo subdomain can change…

WrightsCS
- 50,551
- 22
- 134
- 186
1
vote
1 answer
javax.ws.rs.Path how to intercept just the project root without compromising all the other paths
I have this web.xml, don't want a suffix for the url-pattern so I'm using a /* pattern:

madx
- 6,723
- 4
- 55
- 59
1
vote
1 answer
How to execute fetch paths without interfering with webpage pathname?
I am working on a Django project and got stuck on url patterns and routes.
On index.html, the pathname is "" and the JS functions are working great. The fetch url tweets/${tweetid} is matching with Django API route url pattern tweets/…

abhiramrp
- 99
- 6
1
vote
1 answer
Configuring URL patterns for servlet filters
We are trying to use spring security in our application.
IN the below code, How do we configure the URL pattern to say
"intercept all the URLs except the URLs of pattern '/xyz/' " ?
Basically I want the filter to intercept all the URLs,but if an URL…

Vinoth Kumar C M
- 10,378
- 28
- 89
- 130
1
vote
0 answers
Django Redirect from one app to another after login
I want to redirect my userauth app to userarea app after login. The login happens in the view inside userauth. I want to go to userarea urls to acces my view there.
MainProject/urls.py
urlpatterns = [
path('admin/', admin.site.urls),
…

ReaL_HyDRA
- 314
- 1
- 18