File Writing on the web

Hii,
I'm developing a jsp page that'll create a file on a web location and write into it.. I'm doing something like..
try
                String Path_ = "http://www.mysite.in/public_html/app/test.txt";
                FileWriter Fw = new FileWriter(new File(Path_.trim()));
                Fw.write("This is for testing...");
                out.println("File Writtten");
                Fw.close();
            catch(Exception e)
                out.println("File not Writtten  : " + e.getMessage());
            }It is throwing an exception :
File not Writttenhttp:/www.mysite.in/public_html/app/test.txt (No such file or directory)
How could i create and write a file on the web... could you please give me some suggestions
thanks
Dev

Hii all
I've solve the problem by doing this ...
try
                String Path_ = "/app/test.txt";
                String URl = getServletContext().getRealPath(Path_.trim());
                FileWriter Fw = new FileWriter(new File(URl));
                Fw.write("This is for testing...");
                out.println("File Writtten");
                Fw.close();               
            catch(Exception e)
                out.println("File not Writtten : " + e.getMessage());
                StringWriter SWriter = new StringWriter();
                PrintWriter PW = new PrintWriter(SWriter);
                e.printStackTrace(PW);
                out.print(SWriter.toString());
                //response.setContentType("text/plain");
               // response.getOutputStream().print(SWriter.toString());
            }the output is : File Writtten,
the above file is being created in the target location..
thanks all for give me such support
Dev

Similar Messages

  • Unable to pickup/pull Oracle(.fmx files) forms in the web site.

    Hi all
    We want to migrate from oracle 9i t0 10g. every thing is working fine, web page, forms, reports individually. But when oracle forms(.fmx) files included in the web page ,unable to pull/pickup the oracle forms files in the web page.
    I really appreciate your support
    Chaitanya

    I'm with Andreas on this one - what exactly are you trying to accomplish? I see you are new to the Oracle Forums so I recommend you take a look at the following:
    <ul>
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>Announcement: Forums Etiquette / Reward Points
    </ul>
    Following these guidelines will make your posts more meaningful and help us help you! ;-)
    I "think" you simply want instructions on how to take your Forms 6i application and migrate it to a web deployed Forms 10g application. Is this right? If so, there is a lot of things you need to do.
    <ul>
    <li>First: Must have a Database server, Application Server and a Forms Services Server. These can all be on the same server or seperate
    <li>Second: Your Forms 6i binaries (.fmb) must be converted to Forms 10g binaries (check out Using the Oracle Forms Migration Assistant
    <li>Third: Your Forms 10g binaries will need to be compiled on your new server (mentioned first).
    </ul>
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How can I use Firefox to view a pdf in a local file? On the web pdf's open in Acrobat but in a local file (file:///C:/T10/drafts/adc3/adc3r04.pdf) Firefox displays raw text instead of launching Acrobat

    I am configured to open pdf's in Acrobat instead of Firefox. This works great on the web. I have a local mirror of a website on my local disk as well as a network disk. When I use my html file to attempt to open the pdf on the local disk (file:///C:/T10/drafts/adc3/adc3r04.pdf) it opens as text in Firefox - appears to be ASCII view of the binary contents of the pdf. When I use my html file on my network disk (http://tucgsa.ibm.com/~kdbutt/T10/drafts/adc3/adc3r04.pdf) everything works as it should.

    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to disable the build-in PDF viewer and use the Adobe Reader instead.
    *http://kb.mozillazine.org/about:config
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file

  • How to get the actual path of a file present in the Web content folder

    I have a jasper file which is present inside the Web-Content folder of my project.
    I need to pass this file as an argument to the FileInputStream object. How can i give the actual path of the jasper file, since this project can be deployed anywhere else also.

    You may be able to use the getRealPath or getResource methods in ServletContext

  • How to make a VR html file autoplay via the Web Content overlay

    Hello,
    We have created a VR using Object2VR and have loaded the .html file via the Web Content Overlay panel in InDesign CS5.5.
    We want this VR to play automatically on page load, so we have checked the box 'aut play' in the Web Content overlay panel, but it won't play automatically.
    We've tried switching the auto play off in Object 2VR and switching it on in the Web Content overlay and vice versa and also with both on, but still we cannot get it to autoplay.
    Any suggestions? Is this a bug?
    thanks,
    AG

    DPS is no longer supported in 5.5 you need Indesign 6 or Creative Cloud.
    Set you auto play delay for the web overlay to something other than zero seconds, 0.125 works, if it is set to zero seconds. Leave the auto play enabled for the VR.

  • Deploying properties files outside of the web application in WebLogic 8.1

    Hi
              I am wondering if it is possible to deploy a web application and place configuration files (properties files, log4j xml files etc...) in a folder somewhere within WebLogic that is on the Server instance classpath. This would allow me to edit the config files and restart the server without having to hack into the web application .war file and then redeploy.
              I am really looking for an equivalent of the /applib folder in Oracle 10gAS (each OC4J server instance has an /applib folder which is on the classpath of the server).
              Is there an equivalent for a weblogic server instance?? (i.e. not just for the entire weblogic server but for individual sever instances).
              thanks
              Will

    WLS 9.2 includes pretty advanced features in this area. Both deployment plans and application libraries could be used. There's also a domain/lib directory where jar files can be placed and are visible throughout the server instance.
              Unfortunately 8.1 has none of these features. In 8.1, your choices are to either add these into the $CLASSPATH, or package them in the application.
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • ACCESSING a file out of the web contex in JSP

    hi
    i'm a new JSP developer ius eclipse 3.2 environment and tomcat 5.
    i wanna include an html file from somewhere outside of the web directory (for exapmle "c:\test.html")with <jsp:include> ; but i cant!what shold I do?

    If you're going to be using a FileReader, piping the request through a servlet using FileIinputStream -> response.getOutputStream() seems the best option
    Putting it in a servlet means that you only send the contents of the file, without any of the extra carriage returns that can be included in a JSP.

  • How can we print the webreport into PDF file(not using the Web Analyzer)

    Hi
    I have a report in 'WAD 3.5' . And this report will be executed in the web browser .
    My user wants to print this Web Report in the PDF file (or) import into excel file .
    So how can we do it , if the report is in web browser .
    Pls let me know
    regards
    suresh

    Hi,
    Check this link may be useful:
    Displaying PDF file in browser
    Rgs,
    Ravikanth.

  • Pdf files printing via the web

    sorry incase i missed the obvious, but so far i couldn't find any infos on that topic:
    is it possible to hand over dde commands over the web?
    eg, instead of having a standard pdf link, hand over some ddes with it?
    > AcroRd32.exe /t path printername drivername portname - Initiates Acrobat
    Reader
    > prints a file while suppressing the Acrobat print dialog box,then terminates
    Reader.
    that's the part i need, any way to have those options in a link? :)

    next day next prob.
    i actually noticed it is indeed hiding the print dialoguie box, the problem i have, a get a nice preview after the printjob is done.
    any way to disable this one too? :>

  • PDF files load on the web, quicktime doesn't and flash doesn't

    I am amazed pdf files load but not quicktime video.
    Even apples own website has some streaming video and it will not load.
    Flash sites don't seem to load either.
    But PDF files.
    At least they got that right.

    Good info on the developer page.
    I have a number of QT Videos on my website that I converted to "iPod Video" using Compressor2. Oddly, most will play on iPhone but some refuse! The embedded video frame shows the QT logo and a "play" icon when it think it can play, otherwise it show a greyed "play" icon with a line through it. And I thought all the videos were the same!
    I'd give out the web page in question, but the last thing I need is 700,000 hits from curious iPhone owners. Send me an email if you're curious and I'll be happy to share.
    iMac G4   Mac OS X (10.4.10)  
    iPhone 8GB

  • Open File Dialog on the WEB...

    I need to be able to display a Open File Dialog box on the
    web... I did this in client/server fine using winapi calls...
    what do you suggest for the web?
    Thanks,
    Patrick Caldwell
    [email protected]
    null

    o.k. Duncan, Grant, Frank
    Dudes, I ran from pillar to post and convinced the management to use webutil. We are on 9ias release 2, and we have downloaded the 10g version of webutil as per your recommendation.
    I'm going to post all my configuration tommorow, for the starters, after completing the configuration
    The webuitl is doownload to the C drive in the directory c:\webutil.
    1.Orion-web.xml
    2.Sun2.env ( our env file) ( we have a custon env file)
    Here we added webutil_config variable
    We added the recommended entry to the classpath.
    3.formsweb.cfg
    -Here under sun2 confg, we added the 3 webutil html pages( commented out the same under default config)
    -we added the webutilarchive entry
    -envfile=sun2.env
    Now questions:
    1.In the regedit for oracle forms home, we did not find the forms90_path , so I added the c:\webutil\forms path to
    the forms90 registry entry.
    But I did find forms90_path variable in the sun2.env, there is also a forms90 variable in this env file. Should I
    add c:\webutil\forms to both of these variables in sun2.env.
    Does this mean trouble ?
    2. When I tried to loginto the application after completing the configuration, I ran into the following error
    FRM-47023 , unable to find parameter form_sso ( very close to this)
    Now what's next?
    Thanks

  • Writing to the Web Client Disk

    The main reason we are looking at Dev2000 on the web is to
    implement downloads over our international intranet.
    Does anybody know how this can be done using Webforms?
    Any use of the text_io package writes to the server's disk.
    Is there any equivalant to the text_io package in Webforms.
    null

    Thanks,
    Do you know of any documentation on Java interaction when
    WebForms is running?
    Michael Shannon (guest) wrote:
    : I am not aware of any package that writes to the client disk,
    : but as a workaround, you can do the following:
    : Workaround 1 ( sorta like a CGI script )
    : 1. Use text_io to create a temporary file.
    : 2. Use text_io to create a batch file.
    : 3. Use host to execute the batch file.
    : This should probably be performed on a separate server as the
    : multiple host instances will require a lot of resources.
    : Workaround 2
    : Similar to above, but if you are handy with java, you could
    : implement as a servlet.
    : Michael Shannon
    : [email protected]
    : Paul Blackwell (guest) wrote:
    : : The main reason we are looking at Dev2000 on the web is to
    : : implement downloads over our international intranet.
    : : Does anybody know how this can be done using Webforms?
    : : Any use of the text_io package writes to the server's disk.
    : : Is there any equivalant to the text_io package in Webforms.
    null

  • Why isn't my .swf file showing on the web?

    It's embedded in Dreamweaver, I can see it in Dreamweaver..
    but it doesn't show on the web? I'm using the latest version of
    I.E.
    It is embedded in the column between the two Youtube vidoes:
    http://www.webrevamps.com/assignment8/index.html
    Edit: I should of noted that if you pull up the file
    directly, it will show:
    http://www.webrevamps.com/assignment8/images/animals.swf

    Motleyscrew wrote:
    > It's embedded in Dreamweaver, I can see it in
    Dreamweaver.. but it doesn't show
    > on the web? I'm using the latest version of I.E.
    >
    > It is embedded in between the two Youtube vidoes:
    >
    http://www.webrevamps.com/assignment8/index.html
    >
    Your codebase refers to Director player version 10, not flash
    player:
    http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,1,1,0
    It should read:
    'codebase', '
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Can't fine the bookmark, file address on the web

    i can't fine the web address,setting, file and so on

    Is the menu bar missing? If it is follow the procedure in the [[menu bar is missing]] article.

  • Help needed in send and reciving file realtime over the web!

    Here is a scenario what I want to do and need some ideas about proceeding.
    I have a directory where the files are being added every 5 to 10 seconds. These files are to be transferred one at a time to some other location using some kind of secure protocol. The party receiving files will process each file and send the response back instantaneously. The send and response for each file is between 2 to 4 seconds. The response file is saved in a separate directory. If a successful response then sends another file and so on.
    The program iterates through the directory and if any files will send if no files wait for 10 seconds and check if any files to send and will run as long as someone manually shuts down. What's the better way to achieve this functionality.
    Any ideas the best approach and where to start. Thanks

    When you say "the send and response for each file is between 2 to 4 seconds," are you saying that's your requirement?
    What happens to the original files after they are sent? Are they deleted? If not, you need to be able to detect which files are new.
    You could write a standalone client and a standalone server, and do everything at the socket level.
    You could use a webserver to receive and process the requests.
    You could use SOAP or CORBA or JMS. It depends on more details of your requirements, your experience, time constraints to complete the project, environment...
    Basically you've walked into a car dealership and said, "I need a car. It should have an alarm and be able to go 80 mph. Which one is best for me?"

Maybe you are looking for

  • Many Problems, Latest is Quick Install

    I hope that someone can advise me.  I have a Zire 72 which I was not having any trouble with.  I upgraded to a Palm Centro Smartphone and after a week of using it; decided that it was too small and I returned it.  My problems started there. The calen

  • Error during Installation of OBIEE 11.1.1.6

    Hi All, I am facing following error during in installation of OBIEE 11.1.1.6 ON WIN 2008 SERVER. Before begin the installation I have done uninstall of OBIEE 11.1.1.5. Any help would be appreciated. *************** Trying to Start OPMN **************

  • Leopard forgets color profiles when waking from sleep on MBP Santa Rosa

    I have a 15" MBP Santa Rosa with a 22" Samsung external monitor. I performed a clean (erase and) install on my machine. Upon waking from sleep, the computer seems to have forgotten the color profiles loaded for the displays. To correct this, I open s

  • Visio 2013 startup problem "Please wait while Windows configures Microsoft Visio..."

    Hello, I am getting the "Please wait while Windows configures Microsoft Visio Professional 2013" window on every load of this program. I have found no resolutions from Google searches.  I have tried a full reinstall of Visio, registry modifications (

  • Cannot view images in emails on Safari or Firefox

    I cannot view images in emails on multiple accounts from different sites (Gmail, AOL Mail, Hotmail) on Safari and Firefox on my Macbook. When I click "Show Content" on the emails to unblock the spam protection, either all of the images don't show up