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
1
vote
1 answer

(GCBV) How to call custom method to publish blog (UpdateView)

Good day SO! Next to Java I'm trying to learn some Python/Django since the company I work for is also going to use Django. However, I am trying to figure out how to work with Generic Class Based Views. I hope somebody can give me some information to…
Nrzonline
  • 1,600
  • 2
  • 18
  • 37
1
vote
1 answer

Changing URL pattern to specific redirection in Struts 2 filter

Currently in our web.xml, it's going to Struts 2 filter for all the urls since it's /*, but I need to give specific URL pattern (eg: /docupload/*) because I am integrating with another application now. So another application URL also goes through…
user1570345
  • 193
  • 1
  • 1
  • 11
1
vote
0 answers

How do I use wild cards (*) in url-pattern with MVC correctly

I am trying to get a servlet to respond to every request with a url-pattern of "/test/*". so this controller should respond to : myApp/test/ myApp/test/whatever myApp/somehting?other=stuff using the following mapping:
user359135
1
vote
0 answers

No Mime-Type for .jsp after updating url-pattern in JSF

i am using JSF (2.2) with mojarra 2.2.9 and i get the following issues: (its german, i will translate it later): Für Datei xyz.jsp konnte kein Mime-Typ gefunden werden. It means something like: "There is no Mime-Type for xyz.jsp" This happened…
ITrun90
  • 23
  • 4
1
vote
1 answer

Wildcard path mapping /A/* should return 404 when path info is absent like /A

I am new in Servlets. I am trying to map a URL using the wildcard (*), but it's not working the way i expected. Here is my servlet class. @WebServlet(urlPatterns = {"/A/*"}) public class TestServlet extends HttpServlet { protected void…
theapache64
  • 10,926
  • 9
  • 65
  • 108
1
vote
0 answers

Servlet mapping for specific URL not working in Jersey 2

I am trying to use Jersey 2.x and have a servlet call "myapp", configuration on web.xml is as follows myapp org.glassfish.jersey.servlet.ServletContainer
1
vote
2 answers

Django url.py without method names

In my Django project, my url.py module looks something like this: urlpatterns = patterns('', (r'^$', 'web.views.home.index'), (r'^home/index', 'web.views.home.index'), (r'^home/login', 'web.views.home.login'), (r'^home/logout',…
MikeWyatt
  • 7,842
  • 10
  • 50
  • 71
1
vote
2 answers

How to fix redirect looping in servlet url-pattern like "users/*"

I have a problem with setting url-pattern for servlet. If I set it to something like "users/*", after forwart() or include() to jsp, I get a redirect looping. Here is my code: @WebServlet("/users/*") public class UserServlet extends HttpServlet { …
alex_dev
  • 43
  • 1
  • 8
1
vote
2 answers

HTTP ERROR 503: can not access /. Reason Service Unavailable

My code is in github https://github.com/shiblybcc/blog-aggregator I have just created a spring framework project. This is my web.xml file code
asdfkjasdfjk
  • 3,784
  • 18
  • 64
  • 104
1
vote
1 answer

Url pattern doesnot works with localhost url(jersey without maven)

This is my web.xml.I haveputted url pattern as rest.iam building a webservice using jersey.but while running in tomcat 6.I am getting 404 error. Web.xml
Miller
  • 744
  • 3
  • 15
  • 39
1
vote
3 answers

Servlet mapping url patterns

I have the following urls that need mapping to two different servlets. Can anyone suggest a working url-pattern please? vehlocsearch-ws: /ws/vehlocsearch/vehlocsearch /ws/vehavailrate/vehavailratevehlocsearch …
Mark Pope
  • 11,244
  • 10
  • 49
  • 59
1
vote
4 answers

Java EE Security Model Web collection: Difference URL pattern "/" and "/*"

A "/" when comes to servlet mapping means default servlet. How do you interpret this when comes to a URL pattern embedded inside a web-resource-collection element as below:
yapkm01
  • 3,590
  • 7
  • 37
  • 62
1
vote
1 answer

spring servlet url-pattern map not working with star sign

In the web.xml if I specified the servlet map with a full path like this: spring /view/admin It works fine, but if I using a star sign(*)…
armnotstrong
  • 8,605
  • 16
  • 65
  • 130
1
vote
0 answers

How can a servlet differ between url-pattern "/" and "/pattern/*"?

I want to find the extra path information of a servlet. But this information is different coded depending of the url-pattern that a customer is using. In the follow samples I want differ between case (2) and (3). Is this possible? url-pattern:…
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
1
vote
1 answer

What is the meaning of the leading slash / in Tomcat's ?

I know I cannot use regular expressions for the of a filter-mapping, but is it possible to use a directory pattern to specify any url containing the word myuniqws as in: https://my.hostname.org/myuniqws/myport/soap?wsdl I am thinking…
Withheld
  • 4,603
  • 10
  • 45
  • 76