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
4
votes
2 answers

How to place parameters like /login/{param}/ for a post request in servlets

I have a login servlet and after successful login, I want the user to /login/{username}/ How can I place username in the URL for POST request? I have looked up certain answers like this and this but couldn't understand how to actually accomplish…
Shankha057
  • 1,296
  • 1
  • 20
  • 38
4
votes
1 answer

Apache show a default image when there is a 404 error under a specific URL pattern

In a pure client based web app I need to show a background image that sometimes doesn't exist. Is there a way of 'forcing' Apache to serve an image when a specific URL pattern returns a 404 error? The URL pattern that might return a 404…
4
votes
2 answers

How to check LinkedIn web link using RegEx Patterns in Java?

Can anyone help me please? I am working on validation linked in url in java. I create a regular expression(which I am not familiar with) to validate the link however I am struggling with it. The code is as follows: public class TestRegEx { …
Wil Ferraciolli
  • 449
  • 3
  • 9
  • 21
4
votes
2 answers

Context root not coming while submitting Spring form - issues with url pattern

Below are my contoller , web xml and jsp page which uses spring form. Controller @Controller @RequestMapping(value = {"/*", "/login"}) public class HelloWorldController { @RequestMapping(method = RequestMethod.GET) public String…
Sambuddha
  • 245
  • 5
  • 18
4
votes
1 answer

Failed to load resource files when mapping Servlet on URL pattern of /

I use NetBeans and Tomcat 7.0.4.2 and would like to change URL address of my project from localhost:8080/Servlet to localhost:8080/. In web.xml I changed servlet URL address from /Servlet to /.…
Matt
  • 8,195
  • 31
  • 115
  • 225
4
votes
1 answer

and the * character within web.xml

Useing Spring for Security, I can get the program running using the following code.
user3646347
  • 41
  • 1
  • 1
  • 3
4
votes
3 answers

Spring MVC REST : static files unaccessible because of url-pattern

My Spring Dispatcher servlet url-pattern is /* (as spring MVC REST suggests) Now all the request are resolved by this Servlet. even CSS/JS/Images also get resolved and handled by servlet.. So, Spring MVC tries to find controller.. :( How to bypass…
Nachiket
  • 6,021
  • 6
  • 41
  • 47
4
votes
3 answers

Node.js matching the url pattern

I need an equivalent of following express.js code in simple node.js that I can use in middleware. I need to place some checks depending on the url and want to do it in a custom middleware. app.get "/api/users/:username", (req,res) -> …
AtaurRehman Asad
  • 173
  • 1
  • 1
  • 8
4
votes
1 answer

Django urlpatterns translated with ugettext lazy - if 404 how to check again if url matches for another language?

Reading stack overflow for a long time, first time I need to ask sth here. The app is bilingual. I defined urls in urlpatterns to be translated with ugettext_lazy. User chooses first language and urls work, if he changes lang to the second one, it…
okrutny
  • 1,070
  • 10
  • 16
3
votes
1 answer

Empty 'current url' for Django deployed with Nginx and fastcgi

When I query this url http://mywebsite.com/foos/ Django give me : Page not found (404) Request Method: GET Request URL: http://mywebsite.com/foos// The current URL, , didn't match any of these. the errors : - in Request URL it add me…
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
3
votes
1 answer

Keep getting this error of Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name

Hey guys i keep getting this error while doing this feature on my web app for reseting passwords Idk why it happens Here is my urls.py code: from django.urls import path from .views import * from django.contrib.auth import views as auth_views Full…
filipe
  • 139
  • 2
  • 17
3
votes
2 answers

in

Case 1 myapp / Case 2 myapp *.do If I…
skip
  • 12,193
  • 32
  • 113
  • 153
3
votes
3 answers

java.lang.IllegalArgumentException: Invalid URL Pattern: [xhtml]

I am trying to deploy a very simple & my first JSF application (following a really good tutorial by BalusC) on glassfish local server. I completed all the steps to create the application. And when I tried to deploy the application on the glassfish…
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
3
votes
0 answers

How to override url patterns of Django's contrib?

I'm currently writing an app in Django and I'm using the default django.contrib.auth for the users. I'm currently doing the internationalization. I already generated the locale files and it's working well with my custom urls, but it's not working…
3
votes
1 answer

web.xml servlet mapping infinite loop

I am using appengine and seem to be having some problems with url routing My web.xml ViewServlet viewdata.jsp
user529265
  • 820
  • 10
  • 27