Questions tagged [url-mapping]

A framework's URL mapping facility is the mechanism by which the framework interprets URLs.

The frameworks match the provided URLs against pre-determined patterns using regular expressions, or use URL rewriting to translate the provided URL into one that the underlying engine will recognize. Another technique is that of graph traversal, where a URL is decomposed in steps that traverse an object graph (of models and views).

A URL mapping system that uses pattern matching or URL rewriting allows more "SEO friendly URLs" to be used, increasing the simplicity of the site and allowing for better indexing by search engines. This makes the URL easier for people to read and hand write, and provides search engines with better information about the structural layout of the site. A graph traversal approach also tends to result in the creation of SEO friendly URLs.

363 questions
4
votes
2 answers

Url Mapping For Jsp

I would like to do a mapping for my web pages. A sort of mapping like Servlet Mapping that i've done in the web.XML, not necessarily the same code or procediment but the same result. In other words my goal is to hide the deployment of my web pages.…
paolo2988
  • 857
  • 3
  • 15
  • 31
4
votes
2 answers

Grails: Setting URL mapping priorities

I sometimes come across a situation where I'm trying to set URLMappings as such: /** -> ContentController /static/$image/$imageNumber -> ResourcesController Then when I visit /static/image/13 it will often hit the /** instead of the…
sparkyspider
  • 13,195
  • 10
  • 89
  • 133
4
votes
2 answers

How to create a JSF Filter/url-pattern to protect javascripts

I've written a Java web filter to handle my JSF application's security. I've the filter's mapping like this: authFilter /secure/*
Pedro Peixoto
  • 219
  • 2
  • 6
  • 16
3
votes
1 answer

How to rewrite a URI in Grails within UrlMappings.groovy

I would like to basically do a URL rewrite in UrlMappings.groovy, for example: "/pub/cdn/$version/**"(uri: request.forwardURI.replaceFirst("/pub/cdn/[0-9]*", "")) So that a request for: /pub/cdn/1327516405188/css/login.css for example, would get…
drake
  • 174
  • 1
  • 9
3
votes
2 answers

Deleting a Controller does not completely remove the Controller?

I created an entity called Card and its CardController. Since I committed an error when creating them, I deleted both and created the Card entity again. The problem happens when I execute the following command to get the Controller back with the new…
miguel perher
  • 901
  • 1
  • 8
  • 17
3
votes
1 answer

How to detect Fragment identifiers in Url Mappings?

In a Grails project I'm trying to map a Url based on whether or not a Fragment Identifier is present in the Url. The Fragment Identifiers are important because a Flash library SWFAddress uses them to communicate to a Flash application present in…
Mark Rogers
  • 96,497
  • 18
  • 85
  • 138
3
votes
2 answers

Reverse for 'index' not found. 'index' is not a valid view function or pattern name

I have a simple return HttpResponseRedirect(reverse('index')) where 'index' is the name of the view. on running the server the index view is correctly displayed but gives out this error "NoReverseMatch at /vehicle_movement/checkinview"on…
Jhonty4
  • 71
  • 1
  • 9
3
votes
4 answers

Spring Boot shows the String instead of the HTML file from an Angular2 Single Page app

I'm trying to map all GET requests to unmapped url of the site to show the index.html file. So, I created the following @RestController: @RequestMapping(method=RequestMethod.GET) public String redirectToIndex() { return "index.html"; } My…
kovac
  • 4,945
  • 9
  • 47
  • 90
3
votes
0 answers

Grails URL mapping optional with double wildcard

I want to use optional parameter with double wildcard. In Grails 2, I had this pattern and it worked well. In Grails 3, the optional wildcard does not work and imagePath is always required, which is not what I…
Lojza Ibg
  • 658
  • 9
  • 32
3
votes
0 answers

Override Grails URL mapping from plugin

Using Grails 2.3.11 I've run into a problem regarding dynamic URL mapping properties. Unfortunately one of the plugins i'm depending on has a dynamic mapping for HTTP 500 status code - that is: "500"('/error') In my own URL mapping I wish to map…
Hoof
  • 1,738
  • 2
  • 17
  • 39
3
votes
2 answers

Force 404 error when extension is added to URL

I need some help with URL mapping, in my code when i go to: http://localhost:8080/register.asdf http://localhost:8080/register.asddsdsd etc. it always returns http://localhost:8080/register but I want to make it 404 NOT FOUND. How can I fix…
3
votes
2 answers

another grails urlmapping question

ok, so i asked, and got an answer on how to make a single controller instance case-insensitive vis-a-vis urls. I can do "/mycontroller/$action?/$id?"(controller: "myController") so when an app outside tries to reference link in our app, their…
hvgotcodes
  • 118,147
  • 33
  • 203
  • 236
3
votes
0 answers

How do I manage two java dispatcher in one project?

I have two Spring MVC projects. I want to merge Project b into Project a. Project a's dispatcher servlet configuation:
Morteza Malvandi
  • 1,656
  • 7
  • 30
  • 73
3
votes
2 answers

yii2 url managment/ correct registration of css and js files in a view

I've urlmanager turned on, and probably because of this fact I cannot register css and js fiels properly. when I add $this->registerCssFile('views/A_view/A.css'); my file is attached
David
  • 4,332
  • 13
  • 54
  • 93
3
votes
2 answers

Hide servlet name in the url

In a website I have some links in a navbar like this
  • PAGE
  • and I load the linked page with JAVA in JSP page, then I submit data through a form by GET, after this my URL become www.sitename.com/Servlet then I'm…
    sim186
    • 39
    • 3
    • 10