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
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": "" …
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 :…
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…
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[^/]+)/$'].…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/python" class="post-tag grid--cell" title="show questions tagged 'python'" rel="tag">python</a> <a href="../../questions/tagged/django" class="post-tag grid--cell" title="show questions tagged 'django'" rel="tag">django</a> <a href="../../questions/tagged/url-pattern" class="post-tag grid--cell" title="show questions tagged 'url-pattern'" rel="tag">url-pattern</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 25 '21 at 19:53">asked Jun 25 '21 at 19:53</time> <a href="../../users/12882782/spencepro" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/12882782.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="SpencePro" /> </a> <div class="s-user-card--info"> <a href="../../users/12882782/spencepro" class="s-user-card--link">SpencePro</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">31</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=14" rel="prev" title="Go to page 14">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=25" rel="" title="Go to page 25">25</a> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=26" rel="" title="Go to page 26">26</a> <a class="s-pagination--item" href="../../questions/tagged/url-pattern_page=16" rel="next" title="Go to page 16"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>