Is it possible to programmatically resolve a URL to a file using ASP.NET and IIS? Specifically I'd like the file to be outside of my Virtual Directory (could be anywhere on the local file system). So if a URL comes in like http://mysite/somepicture.jpg I'd like to be able to return c:\mypicture.jpg. I looked into creating an IHttpModu...
I've just written (in Perl) a simple web service that displays a web form containing a single "file" type upload field and a single Submit button. I made this simple web page with the intent that a human could use it and also that a script on a different machine could also execute it programatically. I got the human part all done and t...
I need a javascript bookmark to take the url I have in the clipboard parse out the 2 numbers and create a new url, and add a link to the top of the page, that when clicked adds the url to my bookmark menu.
Say I have url's like these
http://www.website.com/frontpageeditor.jhtml?sectionID=2844&poolID=6276
javascript:getPoolPageUrl(9800...
Given two URLs, how can I resolve one of them against the other? I'm trying to emulate Java's URI.resolve(), which does not exist in GWT's emulation library. I've had to implement this manually, which, as you might expect has been very error-prone. Is there a GWT or Javascript library for resolving or normalizing URLs?
...
Hello, I'd like to use the anchor part of the url (after the #) so that my page can have ajax/dhtml but still be able to have bookmarks work properly. I'm wondering is someone can help me get started on writing some javascript code for this. I'm using jQuery, but if the solution's a generic one, that's fine too.
For my page, I could hav...
The application I am working on has a terribly slow loading web page. If I run the following code it works fine but only because of the call to sleep. If I don't sleep then the InputStream is just a bunch of spaces, probably due to the application it is calling from. Is there any non-hack way around this?
public class PublishTool e...
I'm in the process of doing some identity consolidation, so I'm providing URLs to me at various locations on the internet. I'm quite active on IRC, so this naturally lead me to wonder whether there was a way to provide a link to my IRC presence.
This lead to me finding http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt which app...
Hello,
I would like to get the exact url that user typed into the browser. Of course I could always use something like Request.Url.ToString() but this does not give me what i want in the following situation:
http://www.mysite.com/rss
With the url above what Request.Url.ToString() would give me is:
http://www.mysite.com/rss/Default.as...
What is the proper way to convert an XML URI into a Windows file path?
As a starting point, it's possible to turn:
file:///C:/DirA/DirB/File.txt
into:
C:\DirA\DirB\File.txt
... by first dropping the file:/// substring (having used it to determine we're dealing with a local file) and then placing a backslash wherever a slash appear...
Hi,
I have a set of routes that are generated dynamically at runtime, but that all point to the same controller i.e.
map.resources :authors, :controller => 'main'
map.resources :books, :controller => 'main'
These all work fine, producing routes like /authors/1, /books, /books/55, etc and then all end up being processed by the 'main' ...
I have a NSAttributedString that I'm using in a NSTextFieldCell. It makes several clickable url links and puts a big NSAttributedString inside the NSTextFieldCell. Whenever I am viewing the NSTextFieldCell normally and it's highlighted, I cannot click on the links.
If I set the TableView so I can edit each column or row, when I click tw...
If I've got 2 (or more) URLs (where the only difference is the hash value) to my homepage will Google divide my page rank between those pages or is it 'safe' to have lots of different hashes in the URL and still keep one page rank?
Example:
http://example.com/
http://example.com/#hash
...
Say I have this url "/my#stuff"
I am using asp.net mvc and when I try to goto this page it takes me to just "/my". The "#stuff" part has been removed.
Now I can get it to work fine if I encode the URL like so "/my%23stuff" since %23 decodes to #
However, is there a way I can get this to work without having to encode the url?
I'd like...
Why is the function java.io.File.toURL() deprecated? I need to pass an URL to Toolkit.createImage() which accepts a URL object. Javadoc recommends me to use File.toURI().toURL(). However:
C:\Documents and settings\Administrator\...
becomes:
C:\Documents%20and%20settings\Administrator\...
which obviously is an invalid file location. I...
I've go an absolute URL in my JavaScript that I have hard coded for window.location.
I don't want to have to change this every time I am testing my app. In PHP I would have handled this by testing the $_SERVER["HTTP_HOST"] variable to find out what server I am on, and adjust accordingly. However, I'm not as familiar with Java and am won...
It's of course nice to give users friendly URLs for their content on your site. But how best to do that? There are a lot of advantages to something like foo.com/users/alice, most importantly that you aren't cluttering up your root namespace. But I think simplicity for users trumps all that. A lot of big sites seem to agree (friendfee...
In ASP.NET, is there any way to get the real raw URL?
For example, if a user browse to "http://example.com/mypage.aspx/%2F", I would like to be able to get "http://example.com/mypage.aspx/%2F" rather than "http://example.com/mypage.aspx//".
I would of course like a clean way to do it, but I can live with a hacky approach using reflecti...
Hello everyone.
This is my first post on this rather spiffing website so go easy on me if this has been discussed elsewhere (I can't find it if it has).
I'm using the JQuery URL parser plugin found here: http://projects.allmarkedup.com/jquery_url_parser/
I can get it to do what I want but the code is rather inefficient. I have a coll...
I have a page in which users submit URLs, some of which contain &, = etc. Now if I want it to validate it with W3C I need to write it as & = etc. How can I automatically do this? Also, should I even bother?
...
This is my second question about this topic, the original question can be found here:
JQuery if then else using URL parser plugin, there must be a more elegant solution!
If you are sitting comfortably I shall begin!
I have built a web page which contains a list of questions. Each question has an answer contained in a Div after it. The ...