I want to save a html file to server and then want to open it.

Requirement: I'm having an applet which is having a button named letter. When a user clicks on the button, following should happen --> An event will occur which will read some data from backend system(mainframe) and will store that in a string variable. A html file is created using this data in the body part, and then it should open in a browser.
My problem is how can I launch(open in a browser) this html file.
1) Is it possible to launch this file without storing it on hard drive.
2)To use Runtime.getRuntime.exec(cmd.exe /c start filepath) , I need to store this file somewhere. How can i store this on server?

1) Can you please give me an example showing how i can use Jtextpane.For html, JEditorPane (instead of JTextPane is better)
For examples, go through these tutorial trails:
[http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html]
[http://java.sun.com/docs/books/tutorial/uiswing/components/text.html]
2)Also please tell me how to save the file on user's machineSee this trail:
[http://java.sun.com/docs/books/tutorial/essential/io/index.html]
and how can i delete the file from user's machine once it is closed by the user?Very simple, read the api docs: [http://java.sun.com/javase/6/docs/api/java/io/File.html#delete()]
Thanks!

Similar Messages

  • Can I save a PDF file to Pages and then work on it?

    Can I save a PDF file to Pages and then work on it?

    No. Pages does not edit PDF. Just does PDF an output.

  • OT: How can IPad user save an HTML file to his machine?

    A friend wants to save an HTML file to his IPad (not a link to a web URL)
    Any help will be appreciated

    You mean browse to the website on an iPad then save it?
    Or transfer an HTML file from another device or computer to an iPad?
    If the former then:
    Try the Atomic web browser for the iPad.
    http://itunes.apple.com/us/app/atomic-web-browser-browse/id347929410
    There's also a paid app called iSaveWeb in the App Store.
    http://itunes.apple.com/us/app/isaveweb-web-pages-saving/id305594530

  • How to make html file on server side from the data entered in text area

    Hi!
    I want to know how to make .html file on server side. Like if i enter the data in text area ( or like we normaly see when we write mail that editor) and we can use html tages in it and when user submit form all the data in that field will be saved on server side as an html formate. Is it possible to do so??? or any ruff idea how to design it???

    Erm ...
    Whats the problem with that?!
    Ok, here the code ...
    String myparameter = request.getParameter("paramname");
    String htmltemplate = "<html>\n"
                         +"<head><title>demo</title></head>\n";
                         +"<body>@parametertag@</body>\n";
                         +"<html>";
    String htmlpage = htmltemplate.replaceAll("@parametertag@",myparameter);
    File yourHTMLfile = new File("wheredoyouwannagotoday.html");
    FileOutputStream fos = new FileOutputStream(yourHTMLfile);
    fos.write(htmlpage.getBytes());
    fos.close();You're done.
    Happy Coding! :-) &copy;

  • I am using Indesign cs5 version 7.0.4 with a mac OS X version 10.9.4. I am having an issue where the save and save as option disappears. I am exporting the file as .idml and then resaving to avoid losing work but has to import all the images which takes a

    I am using Indesign cs5 version 7.0.4 with a mac OS X version 10.9.4. I am having an issue where the save and save as option disappears. I am exporting the file as .idml and then resaving to avoid losing work but has to import all the images which takes ages. Any help out there?

    I believe there are a couple of similar threads about CC or CC2014 behaving this way that might give yo some hints, but CS5 is not supported on your OS and may not run properly regardless of what you do. An in-place OS upgrade or an attempt to migrate the application would both be major problems for ID, so if you did either of those things you'll want to uninstall, run the cleaner tool (CS Cleaner Tool for installation problems | CCM, CS6, CS5.5, CS5, CS4, CS3) and reinstall.

  • HT1473 I click "add file to library" and then the song i want, but it doesn't come up

    Im really POed at the new iTunes on so many levels. first, the iCloud makes all songs i bought when i was 11 and deleted when i was 13 again. me and my little sister share the same account, but we have different computers so we don't have each other's song. now, thanks to iCloud, we do. i do not want carrie underwood or justin bieber, abd she doesn't want david bowie and led zeppelin. right now, the icloud isn't working, which is fine right now, but it's not right.
    ok, about "adding music and other content to iTunes." you used to be able to drag a file from your documents to your library and it would be copied onto it. i am under the impression that that isn't the case anymore. I've tried a billion times and it hasn't worked. even when im on the led zeppelin section of my library and i drag "over the hills and far away" it won't budge; there's still only 6 albums and 10 songs. so i clicked "add file to library" and then the song i want, but it doesn't come up. and i did this a zillion times with a bunch of different songs, and nothing.
    another problem is that the files are screwy. "houses of the holy" is on the album physical graffiti, not houses of the holy. if i edit the song's info to physical graffiti, all the other songs that are supposed to be on houses of the holy go into physical grafitti. when i go to song info, they still say houses of the holy. i just tried changing it again, and now all my led zeppeling albums are labeled houses of the holy. WHAT IS THIS MADNESS!?!?!?!?!
    #NewiTunesSucks

    Go to edit-preferences-advanced-
    uncheck 'keep itunes media folder organised'
    Then  make changes and see if itunes keeps the new info...
    But warning! if you allow iTunes to organise your files in the future  these change will be undone I believe.

  • Subtitle workflow. Is it possible to import srt files into premiere and then export to Encore?

    Hi, I'm editing a series of short documentaries that wil be published in DVD with subtitles, and I'm wondering if there's any way to import srt files into Premiere and then export the project to Encore.

    You can easily (and better, IMHO) do what you want in Adobe Prelude.  It's part of the CC subscription, and may have been included with CS6.
    Open the Ingest panel, navigate to the external drive where you have your source clips, make the thumbnails in the Ingest panel comfortably large, click a video clip to enable scrubbing, and use the J-K-L keys to navigate playback through the clips.  Put a check mark on the clips you want and be sure to select and set up the Transfer option on the right side of the panel before ingesting.  Don't select the Transcode option.
    Cheers,
    Jeff

  • Can i save a query in one package and then can i move it into another .....

    can i (in bw 3.5)save a query in one package and then, can i move it into another package? if yes what is the procedure? if no, why? if yes , after moving can i see that query in one package or both? plzzzzzzzz its urgent....

    Hi Neeraja,
    Yes, you can save a query in one package and then move it into another package and transport the query with new package.
    There are two ways...
    1. You can change  the package assignment from one to another with the same request and transport the objects with request assigned to the new package.
    2. You can create a new request and assign the new request to new package and transport the new request with new package assignment.
    For first one, follow below process...
    Changing the assignment:
           1.      Choose  Package in the toolbar of screen area Collected Objects in RSA1 --> Transport Connection.
    The Select Objects for Changing package dialog box appears.
           2.      Select the objects whose package assignment you want to change.
    This procedure is especially useful for changing all collected objects, or a large number of them. For this reason, all indicators are set by default. Remove the indicators for individual objects where necessary.
    Note: You can only use  Details to display the details for an individual object when this is the only object that is selected.
           3.      Choose  Copy. The Change Object Directory Entry dialog box appears.
           4.      Enter the new package.
    For second one, you need to add the query in the transport organiser and assign new request and transport package and then go for transport. But this will create two requests on the same query. So, don't go for this. First step is preferable.
    Hope this helps u...
    Regards,
    KK.

  • Hi - I need to download an iPad update and when I do the file successfully downloads and then proceeds to "progressing" then times out - I think it is my firewall but I have turned off all firewalls

    Hi - I need to download an iPad update and when I do the file successfully downloads and then proceeds to "progressing" then times out - I think it is my firewall but I have turned off all firewalls

    If it scare y ou then take the machien back and ask the Apple Store to do this for you. What has probably filled your computer is large libraries such as music,  photos and movies. Apple explains how to move those libraries to an external HD. Please read:
    http://www.macworld.com/article/1153165/move.html
    http://support.apple.com/kb/PH2506
    http://support.apple.com/kb/ht1449
    http://support.apple.com/kb/PH2506

  • I downloaded IOS6 and all my apps, including the App Store icon, disappeared. If I go to the Passport icon, there is an App Store button, but I have to search through all the apps to find the one I want  and then click on "Open" to use it.  Help!

    I downloaded IOS6 and all of my app icons, including the App Store icon disappeared. Now to use an icon, I have to go to Passport and click on the App Store button at the bottom and search through all of the apps to find the one I want and then click on Open. There doesn't seem to be a way to delete the app and start over.

    Hey PlayerPS,
    Thanks for the question, and welcome to Apple Support Communities.
    It sounds like the application you are looking for is indeed still on your iPhone. You can confirm this by searching in the Spotlight Search for this application. It may have accidentally been moved to a folder, or an additional Home screen:
    iOS: Understanding Spotlight Search
    http://support.apple.com/kb/HT3636
    via http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    Thanks,
    Matt M.

  • HT3345 How do I open a password protected excel file created on a PC?  I get a message that the "file is encrypted and can't be opened"

    How do I open a password protected excel file created on a PC in numbers 09, on a MacBook Air?  I get a message that the "file is encrypted and can't be opened"

    This is actually not true; I support users who are doing this w/ Excel 2011 (v14.2.2+) for Mac and Windows users w/ Excel 2003 & 2007.  Win users are from finance dept, and who have pasword-protected various budget files.  The Mac users are (surprise) "creative" users, who enter pw to unlock and edit these budget files.
    These files are shared from a Mac server (running 10.6.8 server), and I do have an erratic problem where all users have read-only access to these pw-protected Excel files.  The manual work-around has been to copy the troublesome file(s) and confirm users have full access again.  I also do a shuffling of filenames, so that the new, working file has original file name.
    FYI: the Mac server POSIX and ACL permissions are correct, and don't appear to be source of the problem.
    It's easy an SMB file-locking issue or concurrent users trying to edit these files.  I keep reminding them that Excel is not a database!

  • HT4623 I've updated my iphone4 with iOS 6, but now i am unable to transfer my music videos to iphone.I cant add a music video to itunes using 'add file to library' and then transfer it to my iphone.

    I have updated my iphone 4 with iOS 6, but now i am unable to transfer my music videos to iphone.I cant add a music video to itunes using 'add file to library' and then transfer it to my iphone. Am using itunes 10.7.

    You need to update iTunes to 11.1 on your PC

  • The file is damaged and could not be opened

    I do library research from home and often download journal
    articles from the university library as .pdf files. Over half of
    those files arrive damaged with this message: "There was an error
    opening this document. The file is damaged and could not be
    opened." I have only a land line. I am running Mac OS 10.3.9. I
    have Acrobat 7.0 Professional.
    Anybody else have similar trouble? Is there anyway to repair
    these fies so they be opened?

    I think your character counts are incorrect, which is what is causing this error. Please post your code here (see forum rules to post code) and I wil be able to help further.
    Raj
    <removed by moderator>
    Edited by: Thomas Zloch on Aug 5, 2010 2:21 PM - do not ask for ...

  • How works lync when I made a video conferences with someone in my same building?I want to understand how lyncs works, when I made video conferences with someone in my same building, if my call go to to server and then go to the person I´m calling. Or if L

    I want to understand how lyncs works, when I made video conferences with someone in my same building, if my call go to to server and then go to the person I´m calling.
    Or if Lync realizes that we are in the same building so it never leaves, so it don’t generate traffic. My concern is the bandwidth consumption.
    Please a I need the information.
    thanks

    In addition, you can refer to the following link about the media connection in different scenarios:
    http://www.shudnow.net/2010/12/06/lync-server-2010-port-ranges-and-audiomedia-negotiation/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Lisa Zheng
    TechNet Community Support

  • Am using osx lion 10.7.2 on a mid 2010 macbook, and cannot empty my trash bin. it verifies files to delete and then quits. anyone got any ideas how to fix this?

    am using osx lion 10.7.2 on a mid 2010 macbook, and cannot empty my trash bin. it verifies files to delete and then quits. anyone got any ideas how to fix this?

    This utility may help   >  Download Trash It! for Mac - Force-empty your trash can. MacUpdate.com

Maybe you are looking for

  • External Hard Drive Is "Read Only"

    Hi, I'm currently running OSx Lion on my MacBook Pro and I recently wanted to use my external hard drive to transfer some files from my Mac to my PC. The problem is, after plugging my exxternal into my Mac, I noticed I only have the ability to "read"

  • DVD -R or +R

    Hello All, I haven't posted for a while I've had no problems. I have always used printable -R DVDs but have had problems with them playing OK on a computer but not playing on peoples DVD players,they play fine on my JVC DVD player. I have done some r

  • Travel Management Employee Grouping for Domestic Travel per diems

    Dear All, I have a scenario in Travel management Scenario Client has Domestic Travel, only in India under India they have Class A cities, Class B Cities and Class C, For Class A different Per diems rate with respect to the Employees Grade  Eg i have

  • What spec is the video output on an ipod?

    Hi, I know when playing movies on an ipod the specs are: H.264 video: up to 768 Kbps, 320 x 240, 30 frames per sec. MPEG-4 video: up to 2.5 mbps, 480 x 480, 30 frames per sec. But is this the same for the video output on an ipod video 30GB version?

  • Pentax k-5 raw: dng or pef?

    Hi there, I used to shoot raw (=pef) with my Pentax K-5 and import/process with Aperture (3.4.5=current). Just out of curiosity I changed to DNG format in the Pentax. When those raw shots are imported and processed, the color correction is SIGNIFICAN