Opening a byte stream of HTML content in the default browser

Hi,
I have a ByteArrayOutputStream which holds HTML content. Can anybody tell me how to open it in the default browser with out saving the content to a file?
Thanks and regards
Unni

Weeeeeelllll. You could implement your own mini http server, then launch the browser pointing to localhost....
Some browsers have automation interfaces that you could technically use to do something like this, but you are way outside the realm of Java land at that point.
If your code is running as an Applet, there may be some sort of interface that allows you to do this (it's been so long since I messed with applets that I can't really say - my initial inclination is to think "probably not", as this could violate the security sandbox... but who knows).
- K

Similar Messages

  • Imbeded links in my email always open with Safari. How do I change the default browser to Firefox

    Safari will not open any pdf files. Just freezes on a blank screen as it tries to download the pdf.

    Open safari in the upper left corner click safari>preferences>general>default web browser click on it and select what you want the defaut web browser to be

  • Outlook keeps opening links in Internet Explorer, regardless of Firefox being the default browser

    I have Firefox 4.0.1 running on a Windows 7, 64-bit computer. I have Internet Explorer 9.0.8112.16421 installed as well.
    I use Outlook here at work and have Outlook version 14.0.5128.5000 installed, which is part of Microsoft Office Home and Business 2010.
    I have tried to set Firefox as the default browser on the computer. When I go to Start->Default programs, Firefox is set to default. When I open Firefox and check in settings, it says it is currently the default browser. I have tried to set IE as the default, then switch back to Firefox etc. But still regardless of this, Outlook opens all links in emails in Internet Explorer.
    It is very annoying as IE is a lot slower than Firefox, especially when I already have Firefox runnint and Outlook needs to start a new session of IE every time I open a link.
    Does anyone know how I can force Outlook to open links in Firefox when Firefox is already the default browser on the computer but Outlook still opens links in IE?

    I have the same problem (roughly) - I have PDF hyperlinks in an Excel spreadsheet and, when clicked, instead of them opening directly in Acrobat (or via Firefox, my default browser), they open via IE. Regular HTML links in the Excel spreadsheet open in Firefox.
    I have enabled the '''Block PDF files' access to all web sites''' option under ''Trust Manager'' category in the Adobe Reader ''Preferences'' tab.
    I have also disabled the '''Adobe PDF Link Helper''' Extension in the ''Manage Add-ons'' tab in IE.
    Obviously, neither of these settings made any difference.
    * Windows XP Pro SP3
    * Microsoft Office Excel 2003 SP3
    * Internet Explorer 8.0
    * Adobe Reader X (Version 10.1.1)
    * Firefox 8.0

  • How to open non-HTML fiiles in the web browser???

    Hi.. My project requires that I should be able to open all the non-HTML or HTML files in the web browser itself. Ex. If there is some pdf file or doc file or any other file it should open in the browser itself. If the appropriate plug-ins are not there then it should first ask to download those plug-ins and then after downloading it the file should open in the browser.
    I would be grateful if anyone can help me out. If there is some link or something like that then please let me know.
    Thanks in advance.

    hi,
    you can open non-HTML files in the browser... when the file is sent from the server side you have to set the content type to match the content type of the file you are sending..
    for example, if you are sending a pdf file.. you have to set the content type as : application/pdf
    Another example: If you are sending a word doc use: application/msword
    -- Abdel Raoof Olakara
    http://olakara.googlepages.com

  • How to open a URL in the default browser via CC HTML Extension?

    Hi,
    I'm trying to open a link via the default browser in a HTML Extension for Photoshop CC built with Extension Builder 3.
    With the initial example the "/indext.html" it look like this:
    <li><button class="default" id="btn_PHXS" onClick="onClickButton('PHXS')" disabled="true">Run ps code</button></li>
    and I changed the code from "/ext.js" to:
    ...function onClickButton(ppid) {    var csInterface = new CSInterface();    csInterface.openURLInDefaultBrowser('http://www.adobe.com');}...
    This is what the "/lib/CSInterface-4.0.0.js" looks like:
    * Opens a page in the default system browser.
    * @param url   The URL of the page to open. Must use HTTP or HTTPS protocol.
    * @return One of these error codes:\n
    *      <ul>\n
    *          <li>NO_ERROR - 0</li>\n
    *          <li>ERR_UNKNOWN - 1</li>\n
    *          <li>ERR_INVALID_PARAMS - 2</li>\n
    *          <li>ERR_INVALID_URL - 201</li>\n
    *      </ul>\n
    CSInterface.prototype.openURLInDefaultBrowser = function(url)
        return cep.util.openURLInDefaultBrowser(url);
    Since "util" doesn't seem to be defined  I get the message:
    Uncaught TypeError: Cannot call method 'openURLInDefaultBrowser' of undefined
    Is the something missing?
    Thx,
    frankin

    Hi Franklin,
    Apologies for the delay but I have been trying to determine why this API is not been working. I have since discovered that, although this API is documented in the JS library, the behaviour has yet to be implemented into Photoshop CC. Offline I will try to determine why this API was included in the library when it was not ready but for the meantime, if you would like to open a browser, here is a workaround:
    Instead of using:
    //(new CSInterface).openURLInDefaultBrowser("http://www.adobe.com")
    // Use the createProcess API to open a browser. The following shows a workflow in Windows to open Internet Explorer.  
    var csInterface = new CSInterface();
    var rootDir = "/";
    var isWindows = window.navigator.platform.toLowerCase().indexOf("win") > -1;
    if (isWindows) {
                        rootDir = csInterface.getSystemPath(SystemPath.COMMON_FILES).substring(0, 3);
    var processPath = "/usr/bin/open";
      if (isWindows) {
        processPath = rootDir + "Windows/explorer.exe";
    var url = "http://www.adobe.com";
    window.cep.process.createProcess(processPath, url);
    Apologies for this inconvenience but we promise to keep you informed when openURLInDefaultBrowser API is fully supported.
    Kind regards,
    Lea

  • Open HTML pages in the same Browser

    HI All,
    I have a GUI with Help buttons which are required to open Help files in the default browser.
    Now i am able to acheive this using Runtime.getRuntime().exec("cmd /c start iexplore url")
    But the problem here is everytime the user clicks on the help buttons on various screens of the UI it opens a new browser instance where as i want all the help files to open in the same browser window.
    How do i acieve this?
    Also i tried using rundll32 url.dll, FileProtocolHandler url... the problem with this command is it doesnt recognize the querystring part of the url.
    For ex : http://forum.java.sun.com/post.jsp?forum=31&skldfsdkfj
    here the cmd only recognizes until http://forum.java.sun.com/post.jsp and the rest of the url is truncated when the browser opens. Do i need to escape "?" in my java application itself
    I escape & with ^& and this works..But how abt for "?"
    Anyone has any idea abt this....Pls help
    ADN

    all browsers ask you when you install them if you want that one to be the default one.
    So yes, start or run32dll.exe can be used to launch the default browser.
    No, you can't control which window to show it in, with the possible exception of Mozilla (or a derivitive (sp?)) might have some command-line options to do that. But you can't know that it's a Mozilla browser that will run with start or run32dll.exe.
    Your other choice would be: search the file system for browser, or just ask the user for the path to the browser's exe in a preferences dialog or something.

  • How do I load an HTML document at an anchor position in the Default Browser

    I want to position the document to a specific HREF id within the document, but I got �unable to open <URL> all the time.
    I got no problems start the default browser with an URL not containing any anchor reference.
         String url = "file:///Q:/TEMP/plg/CATasks.html#71773"; // ..unable to open..
    //     String url = "file:///Q:/TEMP/plg/CATasks.html";          // working�
         boolean windows = isWindowsPlatform();
    if (windows){
    command = WIN_PATH + " " + WIN_FLAG + " " + url;
    try{
    Process p = Runtime.getRuntime().exec(command);
    Please help!

    I got the same problem. Did you solve it?
    Thanks,
    Linda

  • If Firefox is set as the default browser, and any application attempts to open a new window, this fails and I get the error "Firefox is already running..."

    Here is what I am running:
    Microsoft Windows 7, Service Pack 1, Fully updated to 4/10/2012
    Fresh Install of Firefox 11. No add-ons enabled as a result of troubleshooting.
    I am a user with administrator rights
    UAS is disabled.
    To begin, this has been going on Since Firefox 10 or so. A few months now.
    I am able to open Firefox. My add-ons worked (ABP, Flashblock, ABP Element Hiding Helper, IETAB2, Downthemall, Greasemonkey, 4chan extension) had no problems. Firefox is set and has been set for the last two years as my default web browser.
    However Since approximately Firefox 10 or so, maybe before that, If I have a Firefox session open, and any other application attempts to open a session in a new window, I get the Firefox is already running, but not responding error."
    I attempted to follow troubleshooting advice already posted (look for parent.lock files left behind [none present], multiple sessionstore.js files [none present], create a new user profile, attempted to clear out the "read-only" permission in windows 7, however as soon as it is cleared, the read only permission returns.)
    As a last resort, I deleted the Firefox folder, the %APPDATA%/Mozilla directory in its entirety, then utilized CCleaner to remove any and all references to Firefox in the windows registry, then did a full re-install, no extensions installed right now.
    I checked preferences and have the option "open new windows in a new tab" checked off. The problem persists regardless if this option is checked on or off. This problem persists in or out of safe mode, even with the brand new install.
    Test Cases:
    All cases:
    Firefox is selected as the default browser for windows 7
    Case 1: Open a firefox session. Utilize any other program that attempts to open a link to their website in a new browser window or new browser session. Experience "Firefox is already running" error
    Case 2: Open a firefox session. Right click on Firefox on the task bar. Select "open in new window". Experience "Firefox is already running" error
    Case 3: Open a firefox session. Select the Firefox Menu > New tab > New Window. A new window will actually open.
    This is the only method of opening a new window in the same browser session or profile that actually works on my system. Attempting to open a browser session from the task bar "open new window dialog" or opening a new window while a current window/session is running will not open firefox in a new window or a new tab in the current session. The "Firefox is already running, but is not responding" error will occur every time.

    Cor-el's suggestion resolved my problem. Apparently the MOZ_NO_REMOTE variable was set to 1 on my system variables. I never made it, and really have no idea how it got there, but deleting this variable and restarting firefox has resolved the issue. Thanks Cor-el!
    Marking case: Solved
    Solution: Verify the MOZ_NO_REMOTE variable is NOT set to 1. This can be achieved by simply deleting this variable.

  • How to open a URL without session ID and reuse the current browser session?

    Hi All,
    I have a question about HTMLDB 2.0
    How to open a URL without session ID and reuse the current browser session?
    That was the behaviour in HTMLDB 1.6 ...
    My usecase for this is the following:
    We have written an issue tracking application, which sends e-mail to the interested users, when something happens.
    In these email we've put a link to some page, with some parameters in the URL.
    The idea is for the user to be easy to click on the hyperlink and to see the details of the ticket.
    When the user clicks on such a link he is directed to a login screen (page 101) and he enters his Username and password, and is then forwarded to the details for the ticket.
    Then he receives another email (e.g. for another ticked). He clicks on the link and :
    a) in HTMLDB 1.6 he goes to the details as he didn't close his browser and session is remembered
    b) in HTMLDB 2.0 he is prompted to enter username, password with the username populated
    Please tell me how can I achieve the same behaviour in HTMLDB2.0 as it was in HTMLDB 1.6.
    I understand this change is somehow security related, althogh I don't understand how. If you can explain this either I would be very happy?
    Best regards,
    Mihail Daskalov

    Mihail - I detailed a couple of approaches here: Re: Application Link
    Scott

  • I just upgraded from Express to Pro.  When I open a project in Finder and neither Express nor Pro are running, it always opens in Express.  "Open With ..." says Express is the default.  How can I make Pro the default instead?

    I just upgraded from Logic Express to Pro.  When I open a project in Finder and neither Express nor Pro are running, it always opens in Express. I now want projects to open in Pro.  "Open With ..." says Express is the default.  How can I make Pro the default instead?

    Well, when I've done things like that it always sems like a good idea to keep an application that you know the file will definitely open in...

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • If I click on a link in an e-mail in Thunderbird it opens in IE instead of Firefox, Firefox is my default browser. How do I fix this?

    Even when I clicked on 'help' in Thunderbird it opened in IE. All of the help articles I've read tell me to make Firefox the default browser but it already is.

    it seems possible that there was some corruption in your system (registry) and once you uninstalled Internet Explorer, your system didn't have any choice but to insist on opening web pages in the default browser (in your case, FireFox)
    There are numerous ways to 'screw up' defaults - both as DEFAULT PROGRAMS, and as ASSOCIATED FILE TYPES (Control Panel)
    If messing with the control panel doesn't work, another idea is to: SET INTERNET EXPLORER as Default, check to see that it works as expected, reboot your machine, SET FIREFOX as Default; reboot.
    Win8 [ Control Panel \ All Control Panel Items \ Default Programs ]
    Uninstalling may not be an ideal fix for those who use Internet Explorer occasionally --- as i do for "Print Selected" : I.E. allows you to "Print Selection" of text/images on a web page, and then VIEW (Print Preview) the selection and adjust the margins and 'Scale' so as to fit your selection in the correct SIZE and the correct NUMBER of pages. None of the plugins/extensions for FF seem to do this properly (in my experience).
    Nonetheless (if you need Internet Explorer), it may be possible for users to do as "NIGH" has pointed out (uninstall Internet Explorer), reboot, and then immediately reinstall it. This may 'FIX' the OPEN IN [default] BROWSER issue (you might still have to go in and select FF as default), but you might have to accept other complications with the use of Internet Explorer - i.e. the different preferences that I.E. uses (that you had set before uninstalling) may have to be 're-selected' or 're-implemented'.
    as always, 'your mileage may vary'

  • Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    What version of Windows and Office is it? I had this issue with an older version of office and Windows XP. Basically, MS are using their browser (IE) because it's their software (MS Office). If you go to options in MS word though, you should be able to find an option to set the default browser to open links.

  • The default browser is set to 5.0. I want it to open 4.0.

    I just installed the Firefox 5.0 update. I currently have 3.6, 4.0 and 5.0 installed on my Mac Book Pro for development purposes. Many plug-ins I use for development don't work in 5.0 currently so I want to use 4.0 instead. How can I make my default browser 4.0?
    Currently, 5.0 keeps automatically opening when I click on a link from an external source/RSS reader.

    I am not a Mac user, but have multiple versions and profiles of Firefox. I note you ask about Macs, but have system details showing as Windows 7.
    I can only speak from a PC perspective, but no doubt you can sort it out yourself. It is down to the OS which browser is the default, although firefox has the option to check and reset that at startup.
    No doubt if I delved into the registry I could find how it sets the default browser, but in practical terms what I do is allow the OS to set itself up.
    # Choose any other alternative browser such as IE, make that the default, and allow that to take effect.
    #Then deselect IE as default browser checking.
    #Now start up the chosen version of Firefox, use Firefox's options to set that as default browser. (Options -> advanced -> general system defaults )
    It works, although some applications may choose IE regardless.
    *You may be interested in http://kb.mozillazine.org/Default_browser
    With luck something similar may work on a Mac

  • Opening the default browser.

    Hello,
    Is there a way to open the default browser of the system in a java application?
    Is there any instruction which works for both Windows and Linux?
    I only need to open the browser with a specified URL after a determined step in my java application.
    Thanks,
    Danilo

    Control browsers from your Java application

Maybe you are looking for