url

How can one add an XML file in classpath at runtime in java?

I am not sure if a URLClassLoader can be used. Also, only the relative path of the XML is known. Thank You. ...

Is it possible to get the raw param string in rails?

Given the following url: http://foo.com?bar=1&wee=2 What is the quickest way to get the raw param part of the url from an action? i.e. ?bar=1&wee=2 ...

How do I get just the jar URL from a jar: URL containing a ! and a specific file in the jar?

Hi, I get a jar file url at runtime as: jar:file:/C:/proj/parser/jar/parser.jar!/test.xml How can this be converted to a valid path as: C:/proj/parser/jar/parser.jar. I have already tried using File(URI), getPath(), getFile() in vain... ...

PHP - Find URL of script that included current document

I have a template I made that sets variables that rarely change, call my headers, calls my banner and sidebar, loads a variable which shows the individual pages, then calls the footer. In one of my headers, I want the URL of the page in the user's address bar. Is there a way to do this? Currently: <?php $title = "MySite - Contacts"; in...

How to get the current URL in jQuery?

I am using jQuery. I'd like to get the path of the current URL and assign it to a variable. Example URL: http://localhost/menuname.de?foo=bar&amp;amp;number=0" ...

Pros and cons of using DB id in the URL?

For example: http://stackoverflow.com/questions/396164/exposing-database-ids-security-risk and http://stackoverflow.com/questions/396164/blah-blah loads the same question. (I guess this is DB id of Questions table? Is this standard in ASP.NET?) What are the pros and cons of using this type of scheme in your web app? ...

Get current page URL from a firefox sidebar extension

I'm writing a sidebar extension for Firefox and need a way to get the URL of the current page so I can check it against a database and display the results. How can I do this? ...

what's the 5 character alphanumeric id in reddit URL?

Whats the 7n5lu in the reddit URL http://www.reddit.com/r/reddit.com/comments/7n5lu/man_can_fly_if_you_watch_one_video_in_2 how is it generated? update: @Gerald, Thanks for the code. I initially thought this is some obfuscation of the id. But, it is just doing the conversion from integer to a more compact representation. I am thinkin...

mod_rewrite with spaces in the urls

I need to set up some RewriteRules to redirect a URL which has a space in it. I've tried this: RewriteRule ^article/with%20spaces.html$ /article/without_spaces.html [R=301,L] ... but it doesn't work. Putting in a space instead of %20 causes a 500 Internal Server Error. How do I add a space? ...

Is it OK to include an ID inside the URL ?

Hello people. Well, my question is simple. Does the ID affect the position of a webpage on Google ? I have links like this http://example.com/news/title-slug/15/ and people say to me that I should remove the ID from the URL. And I belive that is not true. By my logic, you can't depend on the title's slug. I know it should work per...

Question on dynamic URL parsing

I see many, many sites that have URLs for individual pages such as http://www.mysite.com/articles/this-is-article-1 http://www.mysite.com/galleries/575 And they don't redirect, they don't run slowly... I know how to parse URL's, that's easy enough. But in my mind, that seems slow and cumbersome on a dynamic site. As well, if the pa...

URLs: Binary Blob, Unicode or Encoded Unicode String?

I wish to store URLs in a database (MySQL in this case) and process it in Python. Though the database and programming language are probably not this relevant to my question. In my setup I receive unicode strings when querying a text field in the database. But is a URL actually text? Is encoding from and decoding to unicode an operation...

What is the maximum length of an url?

Does it differ between browsers? Does the HTTP protocol dictate it? ...

Difficulty in managing URL Paths

Managing url paths can be a real pain in ASP.NET. AbsolutePath vs RelativePath vs etc. drives me crazy. I find that many solutions require the user to edit web.config element to include the correct subfolder path; ex. Website Root: http://www.domain.com Web.config setting: / Website Root: http://www.domain.com/blog web.config setting...

Can you suggest good ways of generating URLS for viewing tagged content

For example, here on stack overflow the URL http://stackoverflow.com/questions/tagged/javascript+php will give you all questions tagged with javascript and php. The system I have allows tags with spaces in them, so the approach used here would not be a good fit for me. What character would you use to separate the tags, so the URLs are ...

Why do some URLs contain both numeric id and name?

I am wondering why the link to profile looks like: http://stackoverflow.com/users/ID/NAME not simply: http://stackoverflow.com/users/ID or even better: http://stackoverflow.com/users/NAME Can there be couple users with the same name? Or can one user have many names? ...

Get source of website in java

I would like to use java to get the source of a website (secure) and then parse that website for links that are in it. I have found how to connect to that url, but then how can i easily get just the source, preferraby as the DOM Document oso that I could easily get the info I want. Or is there a better way to connect to https site, get ...

Using C#, how can I set a Url property to an HTML file in my project?

I have the following code: if (System.IO.File.Exists(htmlLocation)) { vEarthBrowser.ObjectForScripting = this; vEarthBrowser.Url = new Uri(htmlLocation); } else { throw new Exception("HTML file not found!"); } htmlLocation is defined as: private string htmlLocation = "VirtualEarth.html" Supposedly the project I got this...

How can I determine if a URL redirects in PHP?

I saw someone ask a question about detecting if a URL redirects from groovy and perl but couldn't find anything on PHP. Anyone know of somewhere I could find that code that does this? G-Man ...

Generating absolute URLs from Seam emails

Is there a way to coax either the h:outputLink or s:link tags into generating absolute URLs? In a Seam email message, I want to be able to do something like <s:link view="/someView.xhtml"> <f:param name="a" value="#{a.nastyParam}" /> <f:param name="b" value="#{b.nastyParam}" /> <h:outputText value="Come do something awesome...