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
0
votes
1 answer
Next.js 13 webpack "URLPattern is not a constructor"
inside app directory, page.tsx:
import { URLPattern } from "next/server";
const url = new URLPattern();
this is in a typescript file and typescript does not complain. When I hover over URLPattern:
(alias) class URLPattern
import…

Yilmaz
- 35,338
- 10
- 157
- 202
0
votes
2 answers
How do I set up my Django urlpatterns within my app (not project)
Let's say I've got the classic "School" app within my Django project. My school/models.py contains models for both student and course. All my project files live within a directory I named config.
How do I write an include statement(s) within…

the_meter413
- 231
- 3
- 19
0
votes
1 answer
Get array of all named group pattern in URLPattern
Given the following URLPattern:
new URLPattern('/path/example/:name/:age')
I am looking to return an array of all named groups. ['name',…

ThomasReggi
- 55,053
- 85
- 237
- 424
0
votes
1 answer
Wiremock urlPattern with query param regex matching
I have the below wiremock setup & trying to set up the urlPattern matching using regex.
{
"scenarioName": "CPM Get Entitlements:Error - CPM_10000 - DOWNSTREAM_ERROR - Status 500",
"request": {
"method": "GET",
"urlPattern": ""
…

user2232357
- 31
- 5
0
votes
0 answers
Nginx URL Large List Redirect
I have a list of urls. I want to orient this list. But I'm having a problem as I show in the example below.
old link : example.com/test-t123
new link : example.com/test-t456
old link2 : example.com/test-t123
new link2 :…

Furkan Kapukaya
- 1
- 1
0
votes
1 answer
How can I map a url-pattern ending .jsp to a servlet?
I'd like a map a URL that used to point to a JSP directly onto a servlet, but my efforts so far - mapping the following url pattern to my servlet...
/folder/myoldjsp.jsp
have failed, causing a JSP processing error to be…

brabster
- 42,504
- 27
- 146
- 186
0
votes
1 answer
how to unescape special characters in django urlpatterns
So, suppose I have a django app which needs to respond to a url like this: http://127.0.0.1:8000/food%20log/4/up/ . The original parameter is "food log", but it needed to have the space replaced with %20 when it was included in the url. Now the…

rossdavidh
- 1,966
- 2
- 22
- 33
0
votes
0 answers
What causes this hanging command prompt in a Django project
This hanging prompt on any commands that involve migrate, makemigrations etc.
I have other Django projects that work fine and I have no idea what is making it do this on this one.
Since I had no data in any of the models/tables I've completely…

TechnoDiver
- 13
- 8
0
votes
1 answer
Resources won't load with the second url pattern in J2EE
I'm having a strange problem, i have a servlet that is mapped to /home and /home/next with the web annotation as follows:
@WebServlet(urlPatterns= {"/home", "/home/next"})
public class IndexServlet extends HttpServlet {
and it's doGet method send…

telos
- 25
- 6
0
votes
1 answer
Web.xml: why so poor flexibility for url-patterns in security contraints ?
I'm using GlassFish 3.1 and wanted to use container authentication.
When I started writing security constraint in the web.xml I had the feeling that url patterns have very little flexibility.
Chapter 12.2 in the Servlet specification 3.0 describes…

Filippo
- 1,123
- 1
- 11
- 28
0
votes
1 answer
Django url path matching not working as expected
I have problem with Django model get_absolute_url reverse methods.
I have a url pattern that works perfectly but the problem for example
when I visit example.com/blog/python/first-post the path works perfectly, but
when I try a random path like,…

kelvin
- 31
- 4
0
votes
1 answer
DJANGO how to REMOVE url parameters?
What would be the best way to remove parameters from url in django? For instance when facebook adds fbclid? I am trying to do a redirect directly in urlpatterns but the parameters keep getting passed through.
For some reason I assumed this would be…

hackerman
- 1
- 3
0
votes
2 answers
how to run a html template on the project's base path 127.0.0.1:8000/ on python-django
I am learning Python-Django
I want to run a html template on the project's very base site 127.0.0.1:8000/ I don't want to run it in 127.0.0.1:8000/polls or something like that. My myproject/urls.py file looks like this
urlpatterns = [
path('',…

Umesh Raj
- 1
- 1
0
votes
1 answer
How to return Django model in a url?
I would like my Django Model to be accessible via http://localhost:8000/teams
models.py:
from typing import Any
from django.db import models
class Team(models.Model):
top_id = models.CharField(max_length=20, unique = True)
def…

dzuulie
- 31
- 4
0
votes
0 answers
Django Error: NoReverseMatch at / ; looking at wrong urlpattern?
I am simply trying to open the web app to the home page, but at startup I am given the NoReverseMatch error message. The full message is the following: Reverse for 'wiki' with no arguments not found. 1 pattern(s) tried: ['wiki/(?P[^/]+)/$'].…

SpencePro
- 31
- 1
- 5