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

Laravel dynamic controller route

I use Laravel 5.4 and now I want to make dynamic route to controller which mean I can access UserController and Profile function throw route directly, for example. GET http://localhost/user/profile?userid=123 The example URL above will access…
Viet Nguyen
  • 2,285
  • 2
  • 26
  • 43
7
votes
3 answers

UrlMappings to point a URL to an asset pipeline file in Grails

In Grails 3.0 how do you map a URL to a file under the assets folder? For example: http://localhost:8080/favicon.ico --> grails-app/assets/images/bookmark.ico I've tried a few test mappings, such as: grails-app/controllers/UrlMappings.groovy class…
7
votes
2 answers

XML-free Spring 3.1 No mapping found for HTTP request

I've scoured google, stackoverflow, and every forum I can look at for a few days and my keyboard is in dire risk of being the target of a headbutt. I'm running a very small Spring 3.1 MVC with an XML-free setup. The problem is that when I start it…
user1598467
6
votes
3 answers

spring BeanCreationException confusion about mapping

trying to integrate hibernate and spring ,I ran into this error SEVERE: Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name …
markjason72
  • 1,653
  • 8
  • 27
  • 47
6
votes
6 answers

Django, Rails Routing...Point?

I'm a student of web development (and college), so my apologies if this comes off sounding naive and offensive, I certainly don't mean it that way. My experience has been with PHP and with a smallish project on the horizon (a glorified shift…
Stefan Mai
  • 23,367
  • 6
  • 55
  • 61
6
votes
1 answer

Grails SEO friendly URLs

The standard way of creating URLs in grails is: ${news.title} which generates the url: /news/show/102 I want more SEO friendly URLs…
Langali
  • 3,189
  • 7
  • 38
  • 45
6
votes
3 answers

UrlMapping to static files in Grails

I want to map the static files sitemap.xml and robots.txt which a located in my web-app directory. The urls should be as follows: http://www.mydomain.com/sitemap.xml http://www.mydomain.com/robots.txt How do I have to set the url mapping to make…
Michael
  • 32,527
  • 49
  • 210
  • 370
6
votes
1 answer

Grails spring-security static rules for rest resource seems not working properly

I have an Grails (2.0.4) application using Spring Security plugin (version 1.2.7.3) and the secured annotation approach (the default one, more here). Now, I have these URLs in UrlMapping.groovy with the resource key or the controller/action pair,…
lucke84
  • 4,516
  • 3
  • 37
  • 58
5
votes
1 answer

jsf url-mapping security risk

When you use JSF, you'll have the controller servlet javax.faces.webapp.FacesServlet that will be mapped to the following: ... /somefacesurl/* Putting a mypage.xhtml in /, we…
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
5
votes
3 answers

Grails urlmappings, can one prefix urlmappings?

So for instance, say i have an API on a webapp, and i wish to use the same controllers and actions in the API as the rest of the webapp. In my urlmappings file i have "/api/$version/$apiKey/$controller/$acion/$id?" and i also have a mapping like…
netbrain
  • 9,194
  • 6
  • 42
  • 68
5
votes
2 answers

Grails UrlMappings for unknown number of variables

I'm using url mappings to translate the URL directory structure into categories within a site, currently using: class UrlMappings { static excludes = ['/css/*','/images/*', '/js/*', '/favicon.ico'] static mappings = { …
Jon Cram
  • 16,609
  • 24
  • 76
  • 107
5
votes
1 answer

App Engine URL mapping

From http://code.google.com/appengine/docs/python/tools/webapp/running.html Tip: App Engine routes requests to Python scripts based on the URL and mappings specified in the application's app.yaml file. A webapp WSGIApplication further maps…
nxgn
  • 93
  • 1
  • 6
5
votes
2 answers

Spring MVC multiple url mapping to the same controller method

Let's say we have 3 url-patterns for a servlet named dispatcher in web.xml: dispatcher /aaa/*
PickBoy
  • 1,234
  • 1
  • 13
  • 20
5
votes
1 answer

Can i use Spring's @RequestMapping and BeanNameUrlHandlerMapping in conjuntion with each other to map a URL to method?

What I would like to do is have a common Service class which has various methods such as "search" "retriveByID" etc. Ideally this class would consume the service parameters and populate a request object and hand off to the appropriate data source…
nialloc
  • 1,183
  • 1
  • 13
  • 24
5
votes
2 answers

RequestDispatcher forwarding is getting rerouted back to the same Servlet

I have a servlet called User.java. It is mapped to the url pattern User /user/* Inside the Servlet, the path following the slash in…
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
1
2
3
24 25