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
41
votes
9 answers

Go url parameters mapping

Is there a native way for inplace url parameters in native Go? For Example, if I have a URL: http://localhost:8080/blob/123/test I want to use this URL as /blob/{id}/test. This is not a question about finding go libraries. I am starting with the…
Somesh
  • 1,235
  • 2
  • 13
  • 29
23
votes
2 answers

Defining nested namespaces in a URLConf, for reversing Django URLs -- does anyone have a cogent example?

I have been trying to to figure out how to define a nested URL namespace (which look:like:this) in a Django URLConf. Before this, I figured out how to do a basic URL namespace and came up with this simple example snippet, containing what you might…
fish2000
  • 4,289
  • 2
  • 37
  • 76
20
votes
2 answers

URL mapping with C# HttpListener

In the code below I am waiting for any call to the 8080 port. public static void Main() { HttpListener listener = new HttpListener(); listener.Prefixes.Add("http://*:8080/"); listener.Start(); while(isRunning) { …
emesx
  • 12,555
  • 10
  • 58
  • 91
19
votes
3 answers

How to remove app name and port from url in grails?

Instead of deploying my app to http://localhost:8080/myApp I want to deploy it to http://localhost
Nandita
  • 307
  • 1
  • 6
  • 11
14
votes
2 answers

How to make some URL mappings depending on the environment?

When getting an HTTP status code 500, I want to display 2 different pages according to the running environment. In development mode, I want to display a stackStrace page (like the default Grails 500 error page) and in production mode, I want to…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
12
votes
5 answers

Does the position of a slug in a URL matter?

FOR SEARCH ENGINE OPTIMIZATION PURPOSES, does the location of the slug within a URL matter? There's no doubt that you could code URL slugs to work properly in any order. I'm more interested to know if search engines place different weights to…
Shawn Miller
  • 7,082
  • 6
  • 46
  • 54
11
votes
1 answer

grails and debugging UrlMappings

In grails, how can I add some code to the UrlMappings.groovy (ex: println) so that I can figure out what the request URI is and which mapping is getting hit (if any)? Background: In this situation, there are two servers which serve different things…
finneycanhelp
  • 9,018
  • 12
  • 53
  • 77
11
votes
1 answer

Spring MVC Path matching ignoring double slash //

In a Spring Boot application I have set up a filter with url mapping /service1/*. This was done using a FilterRegistrationBean. There is also a controller mapped to the same pattern: @RestController @RequestMapping(path = "/service1") class…
Sebastian
  • 1,835
  • 3
  • 22
  • 34
11
votes
5 answers

Spring multiple path variables

In my Spring controller, I try to get 3 path variables: @RequestMapping("{language}/{country}/{term}/catalogue") - @PathVariable String language, @PathVariable String country, @PathVariable String term Unfortunately this will not be recognized by…
Noctem
  • 123
  • 1
  • 1
  • 5
9
votes
1 answer

How does a Grails plugin add its own URLMappings?

I am creating a Grails plugin and I would like for it to add its own UrlMappings. The UrlMappings.groovy file in the plugin source is ignored by the application using the plugin, so where should these be defined?
Ken Liu
  • 22,503
  • 19
  • 75
  • 98
9
votes
2 answers

URL Pattern Restricting in SPRING MVC

My Spring Web MVC application has the following handler mapping in the Controller. @RequestMapping(method = RequestMethod.GET, value = "/something") When request is sent to http://www.someURL.com/something , it works fine and maps to correct…
saurzcode
  • 827
  • 12
  • 30
8
votes
5 answers

How to know from where was thrown error 500 (Grails)

I have the next scenario in my UrlMappings.groovy: "/user/$action?" (controller:"user") "/admin/$action?" (controller:"user") "500"(controller:"error", action:"show") "404"(controller:"error", action:"show") And I need to know on the…
David Santamaria
  • 8,671
  • 7
  • 33
  • 43
8
votes
2 answers

Jersey with Struts2

I am using jersey with Struts2. But by RestFul Service calls are not working. Below are my configurations files struts.xml
Kalyan Raju
  • 611
  • 4
  • 10
  • 24
7
votes
1 answer

RESTful grails application: DRYing up UrlMapping

Let's say we have a grails web application exposing several resources. tags urls users The application has a classical web-interface which the users interact with and some administration. We want to expose the resources from the application to…
kungfoo
  • 1,297
  • 1
  • 14
  • 27
7
votes
2 answers

Parse_url equivalent in grails / groovy?

Is there a groovy/grails equivalent to PHP's parse_url ( http://php.net/manual/en/function.parse-url.php ) or python's urlparse ( http://docs.python.org/library/urlparse.html ) that turns a URL string into a struct containing host,protocol,…
Tak
  • 232
  • 3
  • 10
1
2 3
24 25