url-mapping

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 calendar) I hoped to learn one of the higher level frameworks to ease the code burden. So far, I...

Servlet/JSP URLs when forwarding requests

My web app has a servlet called admin which when navigated to checks if the user is logged in and if the are directs to the the admin section, but if they aren't it directs them to a JSP page with a sign-in form. The name of the JSP doesn't appear in the URL, it stays as /admin. But then when the JSP posts to another servlet to validat...

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 portions of the URL on the right-hand-side vs the left-hand-side For example, here the slug ap...

Google Search Result - URL mapping

Searching from google.com, like www.abc.com Search Result Rank the pages like Title..... Description... www.abc.com Title... Description... www.abc.com/Aboutus.aspx Title... Description... www.abc.com/contactus.aspx What I need is, when user click www.abc.com/Aboutus.aspx, it should be redirected to www.abc.com rather www.abc.com/Aboutus...

How to write a RESTful URL path regex in GAE/Python for n parameters?

Currently I have three URL paths that map to ServiceHandler. How do I combine the three into one neat regex that can pass n number of arguments to ServiceHandler? (r'/s/([^/]*)', ServiceHandler), (r'/s/([^/]*)/([^/]*)', ServiceHandler), (r'/s/([^/]*)/([^/]*)/([^/]*)', ServiceHandler) ...

How do I map my domain URL the root folder of my Grails app?

I have a Grails app called abc, which when I access locally I get at through http://localhost:port/abc I have deployed my app up on Amazon EC2 with an elastic IP address which I can get at directly as http://1.2.3.4/abc I have a domain name of xyz.com and I have pointed that at my elastic IP, so now I can go to http://xyz.com htt...

REST: Way to map URLs to services/files ?

In your humble opinion: what would be a best practice aproach to map REST URLs to services/files within one's architecture (let's assume MVC pattern here)? ...

Spring URL mapping question

I am using Java with Spring framework. Given the following url: www.mydomain.com/contentitem/234 I need to map all requests that come to /contentitem/{numeric value} mapped to a given controller with the "numeric value" passed as a parameter to the controller. Right now in my servlet container xml I have simple mappings similar to t...

Spring servlet mapping - no css or jsp!

I read over this post, which is similar to my issue, but had no luck solving the problem: Basically I used to have the following servlet-mapping in my web.xml: <servlet-mapping> <servlet-name>myServlet</servlet-name> <url-pattern>/index.html</url-pattern> <url-pattern>/channel1</url-pattern> <url-pattern>/channel2</url-pattern>...

Grails SEO friendly URLs

The standard way of creating URLs in grails is: <a href="${createLink(controller:'news', action: 'show', params: [id: news.id])}">${news.title}</a> which generates the url: /news/show/102 I want more SEO friendly URLs like: /news/102/this-is-the-hottest-news-today What is the cleanest way to do this in Grails? I could use gra...

Grails: URL mapping - how to pass file extension ?

Hi. I have some folder with different files. I want to use something like this: http://myserver.com/foo/bar/test.html I'm using this way to obtain path: "/excursion/$path**" (controller:"excursion", action:"sweet") But it doesn't helps with file extensions... How to disable file extensions truncating ? P.S. class ExcursionCont...

Servlet Mapping Help - Possible to Avoid Referencing Context Name?

Hi all, I am working on a Spring application using Tomcat 6 and Spring 2.5. I'm trying to get my URL mapping correct. What I would like to have work is the following: http://localhost:8080/idptest -> doesn't work But instead, I have to reference the context name in my URL in order to resolve the mapping: http://localhost:8080/&lt;...

Google App engine Url Mapping using WSGIAppl and regx grouping Help Needed

Hi take this example from google docs class BrowseHandler(webapp.RequestHandler): > def get(self, category, product_id): > # Display product with given ID in the given category. > > > # Map URLs like /browse/(category)/(product_id) to > BrowseHandler. application = > webapp.WSGIApplication([(r'/browse/(.*)/(.*)', > Bro...

Accessing a servlet's mapping from Tomcat?

The following code accesses a servlet's name: servletConfig.getServletName(). Can I access a servlet's URL pattern in a similar way? An excerpt from web.xml: <servlet-mapping> <servlet-name>This is the servlet's name</servlet-name> <url-pattern>/this-is-its-url-pattern/*</url-pattern> </servlet-mapping> ...

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 display a formal "internal error" page. Is it possible and how can I do that ? ...

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 lowercase urls ( :( sigh ) will work. I need to extend this to include actions as well. So ...

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 handler. I want to instantiated a service class as a Spring bean with different request h...

URLMapping works on Local, but not on Server

Hey! I'm using VS2010 and on my local machine, using web.config to map one url to another works fine, using the tag. However, as soon as I upload to the IIS6 server it doesn't work at all! Is there something about IIS6 that doesn't support this feature? Thanks, any help would be massively appreciated. ...

Rewriting URL for the default action in controllers

I'm having trouble rewriting URL's in Grails: I've got 2 controllers BlogController and ProjectsController each with a default def index = { } and matching view. Now when I create the following links: <g:link controller="blog">Blog</g:link> <g:link controller="projects">Projects</g:link> They get translated to http://localhost:8080/...