Newbie question!  open URL

How do I open a pdf url from my java servlet application?
This is what I got but it aint working any other methods?
URL yahoo = new URL("http://www.sourceforge.com");
BufferedReader in = new BufferedReader(
new InputStreamReader(
yahoo.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();Thanks Tony

A PDF is binary data, so a method like readLine() which will toss newlines can screw it up badly (you do not want to lose a single byte!). You want to use a regular inputstream class such as BufferedInputStream to read a PDF file.
Now if you simply want to open a PDF in the browser, redirect to it.
response.sendRedirect("http://www.yoursite.com/yourpdf.pdf");
return;If the browser is capable of displaying a PDF it will be opened.

Similar Messages

  • Newbie question - .me url

    Hello,
    Im new to iWeb and MobileMe. Actually I'm still on the free trial of MobileMe since I want to test it first. When I'm publishing my webpage from iWeb via MobileMe account, it says that my URL is www._____.me. But when I go to that address, it says Page Not Found. Although I can access my site using the web.me.com/____. So that's fine.
    But problem arises when I checked on update to facebook button, and it posts to my facebook wall the .me address. How do I make my webpage url as www.__.me rather than the web.me.com/__? is purchase necessary to activate the .me site?
    Thank you

    You can go to and log into your MobileMe account by going to http://www.me.com in a browser yes, however, all MobileMe published sites from iWeb have the url http://web.me.com/username/sitename.
    Publishing to MobileMe is simply the cost of your annual MobileMe subscription with nothing extra and you still get the url http://web.me.com.
    If you want to purchase a domain name, then you would need to go to a domain name registrar and register one and then you can link your domain name to your website/MobileMe and have the domain name http://www.domain.com, but if you publish to MobileMe without this, it will always be http://web.me.com/username/sitename.
    http://www.me.com is simply another way of logging into your MobileMe account rather than accessing it under System Preferences on your computer.

  • Basic questions re URL interactions.

    I'm a newbie one week into Flash catalyst and doing great. I do have a couple of questions though.
    1) How does one edit an interaction on a button? e.g. I've added a URL interaction, but want to change it. I only seem to have the options of adding additional interactions, or deleting the button and adding a new one from the library.
    2)After publishing, if I click on a button to go to a URL, I'd like to return to the flash site after the URL is closed. Unfortunately, when I go to the URL, my flash site gets closed down.
    Any help would be appreciated!
    Andy

    Thanks Rob. Never thought about double clicking in interactions panel.
    Also tried opening URL in another window, but didn't think it worked. (browser was caching) All's good now!

  • Why do we use open URL in default browser function? What are the uses of it?

    Why do we use "open URL in default browser" function?  What are the uses of it?

    kdm7 wrote:
    Okay.
    So can we keep a web button to access the www.ni.com ? So that web site opens only when button pressed?
    P.S  I,m a newbie.
    Yes, you can also, e.g. include a help file or manual as html and open that in the browser.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Open URL in default Browser java.awt.Desktop was working...

    I downloaded Net Beans 6.5 with JavaFX 1 and now java.awt.Desktop isn't even an option for the imports, is there an alternative method to open URLs from my application?

    No, you aren't wrong.
    It's, and I mean this with all due respect, idiotic.
    I found some code on the net that does the same thing:
    http://www.centerkey.com/java/browser/
    Just one class, very simple.
    But I really would like java.awt.Desktop to work, I want the system tray integration stuff.
    Questions about getting Java 1.6 compatibility (the reason why the import doesn't work) go unanswered. It seems there is some hard coded -target 1.5 in some part of the javafx compiler. I can't figure out how to change it.

  • Newbie Question:  How much computer do I need?

    Newbie Question:
    I would like to use MainStage 3 in a live performance environment to play bars, parties, etc.  I'm not looping, using it to playback recordings, processing outboard equipment or vocal processing.  I want to stop carrying Rolands, Nords, Korgs, etc and get to a controller and a rack with a Mac Mini in it.
    I tested a download of Mainstage 3 on my home Mac Mini (late 2012, 3.5 Ghz i5, 4GB RAM, 500GB drive) and it seemed to run fairly well.  $30 well invested so I trekked forward... I purchased a Mac Mini (late 2009,  2.52GHz Core 2 Duo, 6GB RAM, 128GB SSD) for $200.  I started to do more elaborate keyboard setups to see how the CPU would hold up.  It typically runs from 30% to 50% of capacity (CPU and Memory)  It actually boots and runs better than the i5.  I hear the occasion gitch, but it actually seems to be getting better in time (or I'm rock and roll deaf.
    I got a rack, an Airport Express, a Radial USB interface and a Nektar Panorama P6.  It's starting to get expensive, but I'm emboldened by the actual quality for the sound and the flexibility of arranging for live performance.  What used to take me two and three keyboards to play, I can now fit on one performance patch.
    OK, now the question... am I at the limits of this little Core 2 Duo?  Should I upgrade the i5 with more RAM and a bigger SSD and use that?  Should I get a new(er) i7 and bite the $1,500 bullet for the additional RAM and SSD?
    I see that most of you are running pretty nice Macbook Pros with i7 and lots of everything.  My needs are modest; am I OK? 
    BTW, I want to run a Mac Mini in a box because I don't want to carry a laptop out in the open.  If I was doing bigger shows I wouldn't care but I play some rowdy bars and constantly have folks hanging off me while I'm playing.  It's fun, but hard on gear.  If you can't drop it or dip it in beer, it won't last long where I work.
    Matt Donnelly

    Rule of thumb: newer and faster is better. But, depending the complexity of your needs you may be OK with an older Mac. Some glitches that happen in a live performance are due to loss of communication with USB or Firewire inputs, so make sure they're secure. I recently upgraded from a 2010 Mac Mini 2.6 dual core with 16 GB RAM, which was used live for nearly four years, to the latest Mac Mini 3.0 i7 with 16 GB RAM and a 500 GB SSD. I was getting an occasional stuck note with the older one. The new one is rock solid. Some of my patches may have up to a dozen channel strips mapped to three keyboards. The Mini is mounted in a rack next to a MOTU Ultralite Hybrid. It is a good idea to map a panic button on your keyboard to controller # 123(all notes off). Also, you might want to invest in a battery backup power supply(APC, Cyberpower, etc.-$40-$60) to protect your Mac against power loss, which can damage you hard drive.

  • Newbie question - XML version, searching by artist

    Probably quite a common problems - apologies for newbie questions.
    I've changed the URL of my MP3s in my XML to a new location and refreshed my feed. Is there a way of seeing what version of the XML iTunes is using? (it takes around 24 housr to refresh, right?)
    Also, when I'm searching for my podcast by author it's not coming up (<channel><itunes:author>) - is there a reason for this or a way to get it to show up when people search for the artist, other than doubling it in the title? (This works by the way, but I'd prefer not to!)
    Thanks.

    you can do it in just one loop, going through all the image
    tags in index_content and for each tag fill the values of all four
    arrays
    for (i...) {
    get the appropriate child of index_content
    first_array[ i ] = value of first tag
    second_array[ i ] = value of second tag
    no need for multiple loops.
    flash has functionality for xml files, but it helps to write
    a little wrapper around it, to simplify programming, especially if
    you work with xml a lot.. I wrote my for work, so I can't show it
    to you, but it's not very complicated to do

  • Middle mouse button no longers open URL in new tab.

    So, I'm on Firefox 6.0.2 and my middle mouse button no longer opens urls in new tabs.
    It closes them, reopens old ones fine, just no longer opens links in new tabs.
    Any ideas?

    The problem may be about a Greasemonley update :
    http://superuser.com/questions/332782/middle-click-tab-opening-stopped-working-in-firefox/332794#332794

  • Open URL with Dreamweaver

    I'm a webdeveloper who works with tons of different pages each day.  Many of these are sent as URLs by others in the organization, via email, etc.
    To increase efficiency, I'd like to use our testing environment to automatically open URLs with Dreamweaver.  So, basically, open a URL in the test environment (test.example.com/testing123.html), then have a link on the page to open that exact page with Dreamweaver.
    Question is....does anyone know a way to open a specific file with a specific desktop application from the browser??

    In Firefox, you can click file and Save Page As, then save the page as an HTML file. Under Tools>Options or Firefox>Preferences (Mac) you can go to the Applications tab and add HTML as a file type and select DW as the default app to open them.
    Personally, I'd caution against that because it messes up things that you really should be using Firefox or IE to open. (CHMs or application help files for example).

  • Unix version of Netweaver Dev Studio, Newbie question

    Hi,
    I have a very silly newbie question.  Is there a unix version of netweaver developer studio and if so what is the path to the executable?
    Thanks in advance
    John

    I don't think so.  NWDS is built on top of Eclipse which is an open source project by IBM.   Check out there site.
    http://www.eclipse.org/
    As of right now,  I don't believe that SAP is offering a Unix version and I doubt that they will.
    Regards,
    Rich Heilman

  • SG200-08 Newbie Questions

    I have recently purchased the SG200-08 Smart Switch, but I have a few "newbie questions" about it as I get started using it.
    The on board firmware shows 1.0.1.0. Is that the latest firmware to the switch?
    Do I need to enable IPv6 Auto Configuration and DCHPv6 in my switch settings to be ready for IPv6 as my ISP rolls it out down the road?
    How do I go about changing the switch's username? I was able to easily change the password, but having issues getting the username to change.
    Do I need to do anything about the LLDP-MED settings? What exactly is that?
    How do I confugure the System Time Settings so the switch functions in my time zone (USA Central Time)?
    Thanks a bunch for any assistance!

    Hi Nathan,
    My guess is that NAT is already on - you have one public IP address from your ISP. Your router will use NAT (network address translation) to allow multiple clients (and either dynamically assign them private IPs via dhcp or you set them statically) to connect to the internet using the one public IP. It also sounds like your RV042G is assigning both ipv6 and ipv4 addresses, and theres nothing wrong with that. Unless you have specific information re: ipv6 from your isp, however, I would suggest not worrying about it until you hear from them. Are your macs connected to the router via the SG200 switch? If so, it looks like its passing ipv6 just fine.  UPnP is something completely different - thats with opening ports like you mentioned - its a way that your devices can communicate with the router to automatically enable the proper port forwarding for the device/application.
    Regarding the username, create a new user account. I don't think you can edit the cisco user, but try deleting it after creating and testing a new user account..
    I'm not familiar with the Polycom system, but I would leave the settings as default unless you are using true IP phones (rather than an ATA adapter). From a quick google of the polycom device, I don't think you will gain anything from LLDP/CDP as the handsets use regular cordless phone freqs. With my setup, we use cisco IP desk phones and cordless wifi phones, CDP makes life easy as the cisco access point, wifi phones, cisco switch, and cisco desk phones (connected via ethernet) see each other and know what they're dealing with automatically.
    I don't see the SNTP setting for unicast / broadcast that you're looking at. For the switch to get the time from a sntp server, under administration -> time -> sntp settings, add a server, and then back on time-> system time, enable sntp server as the main clock source. What are you using as your sntp source? Do you have an internal sntp server? You don't need to enable dhcp on the sntp server.
    May I also point you to the two manuals, I think they may be helpful:  RV042G  & SG200
    Hope thats helpful.
    Best,
    David
    Please rate any helpful posts.

  • "Error opening URL" when loading JPG to MC

    Hi my name is Dana ,I have this problem with my website that
    I can't seem to solve...I will appreciate any help...thanks :)
    Basicall my site is a gallary to display JPG's
    There is a menu to select the topic and then all the relevant
    JPGs are displayed.
    I'm loading the names of the JPGs from an XML I created.
    Then I duplicate a simple mc that I created called holder_mc
    I have 4 col X 3 rows = total 12 holder_mcS in one page.
    So far so good...but the problem begins when I you go back to
    the main menu and try to upload a new set of JPGs.
    Then an error appears and nothing is displayed:
    http://www.whatever..../reception/0649.JPG"
    Error opening URL
    I tried to remove the movie clips using -
    removeMovieClip(_root["holder_mc"+i])
    but I get the same problem.
    Is someone familiar with this problem?
    If

    The URL was just the massege i was getting...nothing more.
    I found the problem...
    I didn't pop the Array that got the images names from the
    XML...so it was trying to load the wrong JPGs...
    thanks for your help :)
    I have one more question regarding to using mcS as buttons,
    it seems that I have to use it with "onEnterFrame" , otherwise it
    doesn't respond. But then I get an error messege ...*** Security
    Sandbox Violation *** ... ' tried to access incompatible context
    Do you know what is the problem? See my attached code.
    Thanks again

  • MailServer Newbie Question..

    So my first time i setup a Mail Server with Mac OS X Server.
    Everything works like a charme. I can send and receive emails internally. That means
    i can send and receive emails from mac to pc and vice versa. Now my question.
    How do I setup the Server to catch my external eMail adresses and send it to my internal account.
    And how do I setup to send throw my server to the rest of the world without getting banned and
    blacklisted
    I how someone can write a small tutorial for me or can post a link for this newbie question.
    Thanx in advance..
    mike
    P.S.: Sorry for my bad English. But I am from Germany

    how to configure the server to accept mail for my own domain ?
    Any domain you want to receive mail for goes into the Local Host Aliases pane (in Advanced-> Hosting tab). However, you said that you can already send and receive internally so presumably you have it set up for a domain already? If this is not the same domain as you want to use, just change whatever settings you are using to your real domain. You can then test sending and receiving internally for your own domain but without changing your external (public) mail provider. When you are ready to change your outside mail server for your own one, get the public MX record changed so that all external mail starts getting directed to your own server.
    how to get the public DNS record (MX Record)
    If you have a 'real' domain then someone is hosting your DNS for that domain. THis is probably whoever you bought the domain from. You need to get them to change your MX record (or the IP address for the host name record which the MX points to - see my first post).
    Is it really impossible to catch the external email-accounts with the server via pop.
    my idea behind that is to synchronize the external email accounts with the email accounts on the server..
    I have never really looked into getting a mail server to use a pop download from another external mail server - it may be possible by manual configuration but it never made sense to me. Why have two mail servers in a 'chain'? Basically, the public will see only one server responsible for your mail (via MX record) - you have to decide whether you want to leave this with your external provider or take the responsibility yourself.
    Your configuration for the incoming mail seems to me like you would change the
    external email server completely to my internal server.. right ??
    Correct. Once the public MX record is changed then all other mail servers will send to your server and not your current provider. You can always revert back by changing the MX record back to your existing provider (as long as your account is still open).
    -david
    Message was edited by: David_x

  • MEGA-Newbie Question

    This has to be the most newbie of all newbie questions. Interestingly enough, it is the one that is most rarely answered in a non-technical way that the novice can understand.
    What exactly do I need Motion for? What, in common-sense, regular-language terms, does it do?
    My manuals tell me how to do all the things it does. But they assume I am an experienced editor (I'm an experienced filmmaker, but only just started working in editing) who already knows all the things that CAN be done and only wants to know HOW to do them in Motion. This is not me.
    So, say I am making a 90-minute HDV feature music doc. I have footage, I have stills. I will need captions, titles and text on screen. I will need an end credit roll. What is it I will probably want Motion to do for me that FCP can't do on its own?
    I'd appreciate an answer in somewhat non-technical language that addresses the practical use -- from a filmmaker's point of view -- of this no doubt amazing program.
    Thank you.

    hi Paul,
    You are right you can do much of the things Motion does in FCP, but Motion takes them further and often makes them easier to do.
    Briefly whereas FCP is generally for editing moving pictures from rushes to a coherent whole, Motion is used to composite or layers of moving pictures to make a new coherent whole picture.
    So i plain words, you can meld different sources of video, stills text and other sources together to make a new end peice. You can animate text, warp pictures, create fires, smoke, hide bits ( masking), animate graphical elements. In short whenever you need to layer up multiple sources of imagery Motion is your man. Sure FCP can handle a lot of this, but Motion is designed specifically and only to do this, and does it very well. ( You would not want to edit in Motion!)
    In your 90 minute example you could do it all in FCP and make it look very nice. But you might need to go the extra mile with the title sequence, perhaps the captions will have some kind of generic strap line ( lower third) under All these things could be done easier and better in motion. However you would not want to import the whole 90 minute programme into Motion and start throwing captions on it. Rather you would want to build each element ( strap line, animating titles, opening sequence etc) in Motion and then import them into FCP for the final mastering. Motion is for short sequences, and FCP is used to collect them all into one programme.
    I make music commercials for a living, do all the cutting on FCP and build all the graphic elements in Motion, take a look at my site for some examples if you'd like,
    http://www.moojoose.co.uk
    Hope this helps you
    regards
    adam

  • RV042G Newbie Questions

    I have the new Cisco RV042G router, and I have just a few "newbie questions" about it as I get started using it:
    The firmware on board is v4.2.1.02. Since this is a brand new router, is that the latest firmware?
    Under Time>DST Dates, what do I need to configure in there? I'm in the US, Central Time.
    I want to use Back to My Mac from iCloud (formerly MobileMe). Under the iCloud preferances pane on my Mac, it's saying: "Back to My Mac may be slow because NAT Port Mapping (NAT-PMP) or Universal Plug and Play (UPnP) is turned off on your router. Turn on NAT-PMP or UPnP." What should I enable on my router in order for Back to My Mac to better function?
    I'm using a VOIP phone on the network (only 1 device with a couple phones). Are there any QoS settings I should tweak for better performance of my VOIP phone? I did change the port the VOIP phone is connected to to High (instead of Normal) under Port Settings. Will this help boost performance?
    I also want to setup a VLAN on a port for guests to access the Internet, but not have any access to my personal network. Here's the steps I've done so far. Is this sufficient or is there anything else I need to do?
    I went to Setup>Network, enabled Multiple Subnets.
    I added 192.168.254.1/255.255.255.0 as a subnet.
    I went to Port Management>Port Setup, set the port I wanted to use (Port 4) to VLAN2.
    I went to Firewall>Access Rules, added two rules:
    Deny All Traffic from 192.168.254.0 to 192.168.1.0.
    Deny All Traffic from 192.168.1.0 to 192.168.1.0.
    Thanks everyone for your help!

    Easy.  just goto the DHCP field and fill in the Static DHCP fields.
    Assigning static IP addresses by adding devices from a list
    Click Show unknown MAC addresses. The IP & MAC binding list appears. If the web browser displays a message about the pop-up window, allow the blocked content.
    The devices are listed by the IP address and the MAC address. (Typically the MAC address appears on a label on the bottom panel or back panel of a device.) If needed, you can clickRefresh to update the data.To select a device, first enter a descriptive Name. Then check the Enable box. Alternatively, select all devices in the list by clicking the check box at the top of the Enable column.
    Click OK to add the devices to the Static IP list, or click Close to close the pop-up window without adding the selected devices. After you click OK, a message appears. The message includes important information. Read it before clicking OK. Keep the browser open and wait until the selected MAC addresses appear in the Static IP list.
    Modify or remove list entries, as needed:
    To modify the settings: Click a device in the list. The information appears in the text fields. Make the changes, and then click Update. If you do not need to make changes, you can click Add New to de-select the entry and clear the text fields.
    To delete an entry from the list: Click the entry that you want to delete, and then clickDelete. To select a block of entries, click the first entry, hold down the Shift key, and then click the final entry in the block. To select individual entries, press the Ctrl key while clicking each entry. To de-select an entry, press the Ctrl key while clicking the entry.
    Assigning static IP addresses by entering devices manuallyIn the Static IP Address section, add or edit entries as needed. Remember that the settings are not saved until you click the Save button.
    To add a new device to the list: Enter the following information, and then click Add to list.
    Static IP Address: Enter the static IP address. You can enter 0.0.0.0 if you want the router to assign a static IP address to the device.
    MAC Address: Enter the MAC address of the device. (Typically the MAC address appears on a label on the bottom panel or the back panel of a device.) Enter the address without punctuation.
    Name: Enter a descriptive name for the device.
    Enable: Check this box to assign the static IP address to this device.
    To add another new entry: Enter the information, and then click Add to list.
    To modify the settings: Click a device in the list. The information appears in the text fields. Make the changes, and then click Update. If you do not need to make changes, you can clickAdd New to de-select the entry and clear the text fields.
    To delete an entry from the list: Click the entry that you want to delete, and then click Delete. To select a block of entries, click the first entry, hold down the Shift key, and then click the final entry in the block. To select individual entries, press the Ctrl key while clicking each entry. To de-select an entry, press the Ctrl key while clicking the entry.
    Using the Static IP List to Block Devices
    You can use the Static IP list to control access to your network. You can block access by devices that are not on the list or do not have the correct IP address.
    Add devices to the Static IP list as described in Static IP Addresses.
    Enable or disable the following features:
    Block MAC address on the list with wrong IP address: Check this box to prevent a computer from accessing your network if its IP address has been changed. For example, if you previously assigned a static IP address of 192.168.1.100 and someone configures the device to use 192.168.149, the device will not be allowed to connect to your network. This feature discourages users from changing their device IP addresses without your permission. Uncheck the box to allow access regardless of the current IP address assignment.
    Block MAC address not on the list: Check this box to block access from devices that are not included in the Static IP list. This feature prevents unknown devices from accessing your network. Uncheck the box to allow access by any connected device that is configured with an IP address in the correct range.
    Hope that helps.
    Regards Simon
    http://www.linksysinfo.org

  • How to close opened URL

    Hello, I have a question on how to close opened browser window/tab.
    I having the following rightnow
    NSURL* url = [ [NSURL alloc] initWithString: urlBase ];
    [[NSWorkspace sharedWorkspace] openURL: url];
    I looked around and openURL returns a bool. How can I do something like [browserWindow close]?
    I thought about using js in the opened URL page to close the window/tab, but closing from where I launched the URL would work better for me.
    thanks

    837703 wrote:
    Hi I'm a little green with the URL // Runtime class and I don't know how to sure up this method.
    Essentially I want to make close an opened url page with a timer actionlistener.
    You should check out:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    But anyhow, your statement
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);Actually returns a Process Object.
    So you should change it to something like:
    Process  myProcess = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);Then if you want to kill the process you can just do:
    myProcess.destroy();hope that helps.
    take a look at:
    http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Process.html
    for more Info on processes

Maybe you are looking for

  • First ever smartphone.  Dropped calls, bad internet connection is this a bad phone or?

    This is my first smartphone ever.  It is an Apple iPhone 4.  I bought it with the understanding that I have 90 days to return it.  I have had it about a week now and am barely able to talk to anyone due to failed calls.  One of the reasons I bought i

  • Setup problem of Entertainment Center for Windows 7.

    There is a problem with Creative's Entertainment Center for Sound Blaster X-Fi. In the download section for my SB X-Fi Platinum card, the Entertainment Center setup file is only available for Windows Vista and not for Windows 7. Even if I choose comp

  • Currency format in ExcelSheet

    Hi All.. i am genrating my reports in Excel using : response.setContentType("application/vnd.ms-excel"); and my report is also consisting of amount cloumn... And now the problem is,i want to get the amounts in the currency format... Eg :- if it is 10

  • Refund Policy on a new non-working T430

    Anyone knows what is Lenovo policy on returning the 'lemon' new laptop and receiving refund. I am totally frustrated with the T430 that I received yesterday. I want nothing to do anymore with this laptop and Lenovo. I just want my money back. Below i

  • HT4858 Help to reduce storage space and get mail running again!

    My mai froze because iCloude is t full. Want to reduce but can not get ito icloude. I still use the old 17 inch from 2006 and can not change or reduce the stored data to make the mail program run again. But to change this in settings / iCloude  . . .