Downloading HTML page blocked by site

Hello,
I am attempting to download the html page at the following url.
http://www.rcsb.org/pdb/results.do?&startAt=30&endAt=39&inputQuickSearch=protein%20kinase
However, when I do so with my java code.
URLConnection urlConn = theURL.openConnection(); //get the connection
BufferedReader myStream = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); //get the stream connection
String oneLine = "";
try{ while ( (oneLine = myStream.readLine()) != null) { theHTML.append(oneLine + "\n"); } }
catch(IOException e) { throw e; }  //throw the exception to the invocation
myStream.close();I actually get a response with a page saying my "browser" isn't compatable.
Is there any way around this? Is there anyway I can download the information from the page like I would in a browser?
Cheers,
Chris

Any idea of the value I would set it to?No, but if you go here http://www.google.com/search?hl=en&lr=&q=http+header&btnG=Search you'll see some websites that will show you what your browser is sending. You should be good if you mimic the relevant headers from a browser that works.
This would be done in a fashion similar to the
example at
http://javaalmanac.com/egs/java.net/Post.html right?
I didn't see them setting any request headers there.

Similar Messages

  • Firefox downloads html page instead of opening it

    I have an Apache web server (2.2.24) on a Red Hat Linux server (RHEL 5.8). On the web site I have a link to an html page that is not in the web directory, but is on the file system. When I click on the link to go to the web page, Firefox will not render the html page within the URL of the web site--it instead wants to download the html page before it displays the html. So, instead of getting http://mywebsite.com/help.html I get file:///C:Users/myuser/AppData/Local/Temp/Help.html. In internet explorer, the web page opens just fine: http://mywebsite.com/help.html--it does not try and download the file

    Our httpd.conf file has DefaultType text/plain
    The web page in question has a header of:
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; HP-UX B.10.20 9000/879) [Netscape]">
    And yet Firefox still wants to download the page instead of render it directly in the browser :-(

  • Noob Needs Help - Importing Html Pages into "My Site"

    Greetings
    I am sure this is a noob question that may have been asked, but I couldn't find it by searching so here goes.
    I jumped right into Dream Weaver, following an online tutorial... and have a decent webpage but I must have skipped some steps or missed something and I would hate to backtrack and do it all over again...
    When I began, I just started working on a HTML page... and now that its done, I want to make it a template etc...
    But I never created a "site" as far as SITE > NEW SITE etc.
    So now that I have, I need to tell DW that "These pages are included... these images are included, all that neat SPRY stuff I have done needs to be "in the site".
    I am looking for a button that says, "Hey dummy, you need to select the pages that are included in your site" but can't find it...
    Any help?
    Thanks, in Advance
    Greg
    www.revfan.com

    Creating  your first web site in DW CS5 -
    http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Up/download html-page including all images

    Hi y'all,
    I'm developing a quite normal Webbrowser-Webserver-DatabaseServer application with Web-Frontend, Servlets, Jsp, Beans and good old JDBC-Technique. It's kind of a small dictionary.
    What I need is a solution for the following problem:
    Every item of the dictionary should be made of a html-page which could contain images, too. An administrator builds these pages and uploads them to the webserver. So how can I upload the html-page with all its images automatically?
    Some thoughts about it:
    - can the html-code be searched for images by java-script, and could they be uploaded automatically then?
    - do I need a AWT/Swing frontend?
    - or may a httpServlet request the images after getting the html-page?
    - packing all the files together into a .zip-File would not be soooo nice, the admin may be dumb.
    The same problem I have with downloading a page onto the administrators computer.
    well, I think I'm in trouble.. :)
    koem

    I'm not extremely experienced as a JSP/Java programmer but here are my thoughts:
    It sounds like your basic requirements are fairly simple, but you are taking the long way around to get there. If it is a dictionary-style app and the administrator is of limited experience then you need to keep things simple.
    Why create pages to upload when you can create a template with JSP and insert the text data and the images from a form? Text and link info can be stored in a database and the actual image can be uploaded to a directory or put in the db if you know how. Java Server Pages (O'Reilly) has the image upload code you need.
    Am I on track here?
    Brad

  • First direct link in google search causes "Internet Explorer blocked this site from downloading"

    I've disabled both the Adobe Reader Add-on and the Adobe PDF Link Helper to force IE 8 to open PDF's outside of the browser i.e in the stand alone reader application.
    After doing this I did some testing, a google search for "test pdf" produces numerous direct links to pdf files.  If i click any of them it causes IE to display the message bar "Internet Explorer blocked this from downloading files to your computer, click her for options.."  When I click on the message bar, it appears to download the file , then nothing happens.  Next time I click the link it opens in the stand alone reader just fine and so do all PDF files, until the browser is restarted or a new tab is started.
    This only seems to happen in IE8.  IE9 doesn't have the problem.
    If I open a web page that has a link to a PDF that always work.
    Help? I can't roll this out to prod.  Users will get very confused...

    You actually trashed the whole Internet Preferences Folder including all your preferences still in there?
    Actually, you were suppose to just trash the Internet Preference file/document which is inside the folder.
    See if updating to the latest & last version of IE for Mac will help.
    Internet Explorer (Classic) 5.1.7
    Internet Explorer 5.1.7
    Internet Explorer v5.1.7
    "WARNING:" Microsoft ended support for Internet Explorer for Mac on December 31st, 2005, and is not providing any further security or performance updates.
    Accordingly, as of January 31st, 2006, Internet Explorer for the Mac is no longer available for download from Microsoft.
    Or, you can try the following w/your older version of IE:
    Once a week Go into the system folder>preferences folder & trash the following preferences:
    finder
    ASLM
    PPC Registration Database
    Cache.waf-found inside the MS Internet Cache folder
    MRJ Cache folder-a new one will be recreated.(If not found go to System folder>Application Support>MRJ Cache folder-trash all you find inside-(DO NOT TRASH THIS FOLDER)
    Download Cache-found inside Explorer Folder
    Downloads.html-found inside Explorer Folder
    History.html-found inside Explorer Folder
    Rebuild your desktop w/extensions off. Use Techtool Lite or Trash*Desktop - may delete Finder comments to rebuild your desktop w/extensions off. Does a better job than manually & you avoid all the finger gymnatics. You just have to hold down the shift key to shut off extensions.
    Restart to turn the extensions back on again & empty the trash.
    Good luck!

  • JSP, downloading files and show html page

    I like to download files and show a html page on JSP.
    With the source following, downloading works well.
    But, it is just remained on the previous page, not showing the next html page.
    Someone tell me why is it?
    <%@ page import="java.io.*, java.net.URL"%><%
    String file_name = request.getParameter("file_name");
    File fileDir = new File(config.getServletContext().getRealPath("upload/"));
    File theFile = new File(fileDir, file_name);
    FileInputStream fin = new FileInputStream(theFile);
    response.setHeader("Content-Disposition","attachment; filename=\"" + theFile.getName()+"\"");
    response.setContentLength((int) theFile.length());
    BufferedInputStream bf = new BufferedInputStream(new FileInputStream(theFile), 8096);
    int i;
    while ((i=bf.read()) != -1)
    out.write(i);
    bf.close();
    out.close();
    %>
    <html>
    <head>
    <title>file download</title>
    </head>
    <body>
    <p align="center"> </p>
    <p align="center"><b><font face="Tahoma" color="#000000" size="2">You have
    successfully downloaded your file(<%=file_name%>)!</font></b></p>
    </body>
    </html>

    You's already close the JSP output stream befor you try and write your html confirmation, and I don't think browsers can provide the kind of functionality you're trying to demonstrate here. A browser will download the file and open it directly itself or using another application based on user input (e.g. save as, open file, etc.). Once the file is opened or downloaded, it's done!
    I think your best bet is to show a dialogue that the user's download should begin, then set the pages href w/ JS to the location of the file, same way other sites that allow you to download files do it. Go take a look at download.com or something like that.
    Hope that helps.

  • Vista-switched from Explorer to FF 3.6- can't download versions/updates like Adobe Flash-error message: INSTALLER WILL CONTINUE AFTER CONFLICTING MOZILLA FF IS CLOSED-Most pics blocked on sites/programs-can't open some programs that Explorer opens- Help?

    I have Vista, recently switched from Internet Explorer to FireFox 3.6-. Since switching over, it can't download alot of versions/updates like Adobe Flash: It error messages: "INSTALLER WILL CONTINUE AFTER CONFLICTING MOZILLA FIREFFOX IS CLOSED".
    Most pics blocked on sites/programs. I can't open some programs that Explorer opens. I would sure appreciate any help!!!

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If the advice above doesn't resolve things you could try this alternate version:
    iTunes 12.1.0.71 for Windows (64-bit - for older video cards) - itunes64setup.exe (2015-01-28)
    which is a 64-bit installer for the 32-bit version of the core application, similar to previous 64-bit releases. Or roll back to the previous build:
    iTunes 12.0.1.26 for Windows (32-bit) - iTunesSetup.exe (2014-10-16)
    iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16)
    tt2

  • How do I defeat or whitelist the "Firefox has blocked this site from loading another web page" function?

    Often when I click a link within a web page, a message bar appears at the top of the page saying "Firefox has blocked this site from loading another page" or something similar. This happens frequently on banking or credit card sites. This is particularly annoying because it seems to disturb the operation of the link when I have to click the "Allow" box on the message bar. I would prefer to create a whitelist for this feature so it would not interrupt my banking operations. Failing that, I would like to know how to toggle the feature on and off. Failing that, I would like to know how to defeat the function.

    See:
    *Firefox > Options/Preferences > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    *https://support.mozilla.org/kb/settings-network-updates-and-encryption#w_general-tab
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • Can I add a custom .html page as a separate page within my site?

    I'm creating a website for my local baseball association using iWeb 1.1.2.
    I'm given several .xls files for schedules, rosters, etc. and I can save them as an .htm/hmtl page.
    But within iWeb, it doesn't look like I can import them as a separate page within my site.
    Is this possible? I suppose my only option is to create an external link to the pages correct?
    Will iWeb '11 allow me to do this?
    Thanks!

    Yes, you can in one of two ways:
    1 - put the custom page on your server and embed it into one of your iWeb pages using an HTML snippet and iFrame code as done in this demo page: Embed a Site Within an iWeb Page.
    2 - put the custom page on your server and in iWeb create a totally blank page, name it for the custom page and add the following redirect code in an HTML snippet:
    <script type="text/javascript">
    parent.window.location = "URL TO THE CUSTOM PAGE"; </script>
    Thanks to Cyclosaurus for this code
    When the visitor clicks on the page in your iWeb navbar they will immediately be redirected to the custom page.  You'll need to add a link on the custom page to send them back to your iWeb site.
    If you modify/update the custom page it will be automatically updated in your iWeb site without having to open iWeb.
    UPDATE:  3 - or add an HTML snippet to on of your pages and put the HTML code from the custom page into it.  That will display the custom page on your iWeb page.
    OT

  • Problem in downloading an html page that contains images

    Hi,
    This is surekha
    I am facing a problem in downloading an html page that contains images
    The file is downloading , but when I access the the downloaded file it displays X marks in the place where images r present....
    How can i download a html file along the images it contains
    Please help me ...........

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • When I open some pages, another web site opens. I want to block that site and its URL from opening.

    When I open some pages, another web site opens. I want to block that site and its URL from opening.

    BlockSite extension.
    https://addons.mozilla.org/firefox/3145/

  • I want to block internet sites like youtube and Internet downloads of movies to my users

    Hello
    I want to block internet sites like youtube and Internet downloads of movies to my users.
    Please tell me how can I create this kind of filter for my blackberry users.
    Thank you.
    Pavlos.

    pavlosalexelis wrote:
    Hello
    I want to block internet sites like youtube and Internet downloads of movies to my users.
    Please tell me how can I create this kind of filter for my blackberry users.
    Thank you.
    Pavlos.
    You posted in the BlackBerry Internet Service section of this forum.
    Are you and your users on a BlackBerry ENTERPRISE Service?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I tried to publish my project of 2 html pages, 3 photo pages and one widget page (map) to ipage hosting site. the two html pages published and that's all. Help.

    I tried to publish my project of 2 html pages, 3 photo pages and one widget page (map) to ipage hosting site. the two html pages published and that's all. Help.

    What's the URL of your site so we can examine it first hand?   Also try publishing the site to a folder on your hard drive and use the free FTP client  Cyberduck to upload your site.  It's been known to work when iWeb's ftp client has failed.
    OT

  • I downloaded firefox 3.6.13 and now when moving through sites it will unexpectedly not be able to load a page within a site. How do I fix this problem or revert to a previous version of firefox?

    The first few sessions Firefox seemed to be running great with improved speed. Yesterday, when I opened Firefox it could not open my homepage even though I checked for my internet connection ... my email service was working perfectly. I rebooted the computer and started Firefox and the homepage opened fine. I then visited an online newspaper site opened from my bookmarks. I was able to read one or two articles on different pages, but then when I selected another page in this site, Firefox was not able to access it (just keep trying to make a connection to the page). I restarted Firefox and went into an online banking site, again through a bookmark. Again after successfully accessing several different pages in the site Firefox was unable to connect to a requested page.
    Later in the day I restarted Firefox, entered the banking site and successfully completed my transaction. Visited several other sites and had no problems, then again Firefox could not load a page.
    This problem has continued today when looking at the online paper.
    I would like either a fix to this problem, or to return to the previous version of Firefox.

    Google Toolbar Options, in the Search tab, make sure that '''Enable the Google new tab page''' is check-marked. If that doesn't fix it for you, see this for support information about the Google Toolbar. <br />
    [http://www.google.com/support/toolbar/?hl=en] <br />
    Or visit the Google Toolbar forum. <br />
    [http://www.google.com/support/forum/p/Toolbar?hl=en]
    As far as your UserAgent showing Firefox 3.0.11, see this: <br />
    https://support.mozilla.com/en-US/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
    You might want to consider getting rid of that '''desktopsmiley''' program that has messed up your UserAgent, it is known as Malware.

  • I am in the process of developing a site, and I'm working with nested iframes. The html page inside the nested iframe is not displying in the iframe window in Firefox only, but is instead opening in a new window. Any advice on how to fix this?

    I am developing a website with nested iframes. The problem that I am having is that the html page inside the nested iframe is not displaying in the iframe window in Firefox only. The first level iframe is behaving properly, but the second level is not. Any help with this would be greatly appreciated.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

Maybe you are looking for