File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes URL butchering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "URL butchering" Watch "URL butchering" New topic

URL butchering

smitha rai

Joined: Jun 29, 2001
Posts: 18
Hi I am in a process of testing a web application. I do not have an idea on URL butchering. Can any one advise me on what is URL butchering? and how is exactly done?

Thannks a lot,

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

I didn't know it was called URL-butchering,

but when you navigate to a page and you want to get to a higher level on the same site, you edit the URL, hack off the end to see if you can get to some kind of menu for the section of the site you are looking at.

longer explanation

Because we know that users try to understand URLs, we have an obligation to make them understandable. In particular, all directory names should be human-readable and should be either words or compound words that explain the meaning of the site structure. Also, your site structure should support URL- butchering where users hack off trailing parts of a URL in the hope of getting to an overview page at a higher place in the site hierarchy. Of course, it is better if users can navigate your site structure using your navigation buttons, but we know that a lot of users use URL-butchering as a shortcut: Such users should get reasonable results (typically a table-of-contents-like page listing the information available at the desired level of the hierarchy).

Thank you for triggering my curiosity enough that I looked up "URL Butchering" in google and found this nice explanation.
Eric Weinberg

Joined: Nov 11, 2004
Posts: 18
hmm i'm not sure i understand url butchering.

but if you mean pulling values from a url such as

the value of ubb, f, t. Then I might be able to lead you in the right direction.

i'm going to assume your using jsp's and the code is pretty simple..

String ubb = request.getParameter("ubb");
Eric Weinberg

Joined: Nov 11, 2004
Posts: 18
hmmm..very cool. Suppose i should refresh the screen before i look silly.

now how to do that. Well i'm not sure. I'd guess something along the lines of using substring and going from the start to the "?" maybe there is something in the api that can help ya out as well?
I agree. Here's the link:
subject: URL butchering
It's not a secret anymore!