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
2
votes
1 answer

Why do errors differ when I interchange the order of the members of url patterns

Note: I'm not requesting for a help to fix the errors, but to ask the reason why they differ by interchanging the order of url patterns. The following is how my urls.py of my django application (basic_app) looks like: from django.urls import path,…
VIVID
  • 555
  • 6
  • 14
2
votes
1 answer

URL pattern in django to match limited set of words

I have a URL pattern in Django where there is a variable (called name) that should only take one of a select list of words. Something like this: path("profile//", views.profile), So basically only these paths are…
user1162541
2
votes
1 answer

Regex to block url in nginx

I want to block access to urls that have excess characters at its end. E.g. I want nginx to block requests to https://www.example.com/url-pattern/amp/extra-chars/more-extra but want it to allow https://www.example.com/url-pattern/amp or…
LittleLebowski
  • 7,691
  • 13
  • 47
  • 72
2
votes
1 answer

tomcat and security-constraint: url pattern not working

I have 2 apps deployed to a tomcat server. One of them (app2) I want to be protected by tomcat. Example of the resulting URLs: localhost:8080/app1 localhost:8080/app2 i do not develop the apps itself, so i have no access to the application specific…
Dakkar
  • 5,682
  • 5
  • 22
  • 28
2
votes
1 answer

Add custom url action parameter to django-cms

The common url action parameters in django-cms are for example: ?edit to enter Edit-mode, ?toolbar_off to disable/hide the toolbar. Now I'd like to add a new action parameter e.g. ?logout which just logs out the user no matter on which url he/she…
zypro
  • 1,158
  • 3
  • 12
  • 33
2
votes
2 answers

How to find out the location of the file in Struts?

I want to know that how to find out the location of a file in Struts. Where the files would be situated Here is some part of program: LoginFilter *.do
Samiksha Dhok
  • 21
  • 1
  • 2
2
votes
0 answers

@WebServlet Annotation pass a dynamically generated list of url patterns

Basically, I just want to match a url pattern that doesn't follow the normal path-hierarchy that Java EE url pattern matching seems to follow. I want to be able to handle matching a url pattern that is updated somewhat frequently. For example, I…
Michael
  • 835
  • 2
  • 10
  • 24
2
votes
1 answer

Django, URL and Views not found

I'm using Django 2.1 and testing views.py and urls.py What I don't understand is why whenever I enter the URL http://127.0.0.1:8000/blog/post_list I get a 404 error message My top urls.py: from django.urls import path from django.contrib import…
Renm
  • 717
  • 3
  • 10
  • 20
2
votes
3 answers

How to achieve a certain url format using @RequestMapping in SpringMVC

I am trying to create a simple application using SpringMVC for learning purpose. I want to have the urls for various actions in this format http://localhost:8080/appname/controllername/actionname.html The url-pattern specified inside the…
naiquevin
  • 7,588
  • 12
  • 53
  • 62
2
votes
1 answer

Image paths in Django view are relative to directory instead of MEDIA_URL

I've been struggling with this problem for a few days and unable to solve it on my own. I am working on a blog site. The post view is rendered at a URL such as this: domain.com/blog/specificpost/ I have an ImageField in my model. The images upload…
Charlie Deets
  • 109
  • 1
  • 11
2
votes
4 answers

Django url pattern multiple Parameters (without pk)

I'm new to the Django Framework and one thing bothers me. I want a simple Rest Call: www.abc.com/users/1/cantonments/1/ If i use 'pk' in the url pattern everything works out of the box (pk, pk1, pk2....). But i have some permission functionality…
Markus
  • 449
  • 1
  • 7
  • 22
2
votes
1 answer

Shorten path of REST service in JBoss Seam application still wrong

I got a similar question as: Shorten path of REST service in JBoss Seam application But couldn't comment on the shipmaster answer because of my initial rep. His comment Jul 19 at 18:10 misunderstood the situation: Faces servlet is mapped by…
2
votes
1 answer

Jersey 1.19, TomEE+ 1.74. Web.xml Url-Pattern is not working correctly

Using: Jersey 1.19, TomEE Plus 1.74 I can access the same controller method via two different urls. http://localhost:8080/hello http://localhost:8080/rest/hello web.xml: com.sun.jersey.config.property.packages …
Operatorius
  • 328
  • 2
  • 11
2
votes
2 answers

java.lang.IllegalArgumentException: Invalid SolrServlet1 in servlet mapping

I have created a JSP page and from this page i will invoke a servlet and process something and redirect back to same JSP. But when i deploy only JSP all is fine. But when i include my servlet in a project tomcat 8 fails to start and it throws below…
2
votes
1 answer

Include subdirectories in url-pattern

I would like to include every file contained in subdirectories of my jsp folder. Actually it's presented like that: /WEB-INF/ jsp/ administration/ products/ list.jsp edit.jsp …
LoïcR
  • 4,940
  • 1
  • 34
  • 50