Using cfhttp to read a page and write its contents to a file.

Hi,
I am trying to get a feed of my ebay store listings to load
into froogle. Unfortunately, ebay provides the feed as a website
not a file and froogle (via GoogleBase) needs the file to be
submitted as an XML file.
Is there a way to use something like cfhttp to load up the
page where the feed is located, scan the page and write it's
contents into an XML file that I can then load up to GoogleBase???
thanks for the help.

ignore me now.... I answered my own question a short while
ago.
for anyone who cares....
I used CFHTTP to get the page and then used a cffile to write
the #cfhttp.filecontent# into the new file!

Similar Messages

  • Read a bfile and write its contents in a file stored in my hard disk

    I will try to describe my problem as clearly as I can.
    I have created a table that includes a LOB column "BFILE"
    Then I'm trying to READ the BFILE stored in our database using the
    DBMS_LOB package.
    so far so good.
    Now I want to write these data that I have read in the step above in a file
    saved in my local disk. The problem is, since the file in databse is
    stored as binary and I read Raw Data , I cannot create an exact copy of this
    file. It seems that It doesn't write the RAW data in the binary format.
    I have used the DBMS_LOB.READ to read the data and it works fine.
    Now I want to create a file in my local disk and dump the data that I have
    read from the BFILE that has been initially stored in the database.
    Is there any solution to this problem?
    I hope to hear from you soon
    Thanks in advance

    ignore me now.... I answered my own question a short while
    ago.
    for anyone who cares....
    I used CFHTTP to get the page and then used a cffile to write
    the #cfhttp.filecontent# into the new file!

  • I have made .indd file with some form fields in it, now haw to read these fields and manipulate its content through script in indesign

    I have made .indd file with some form fields in it, now haw to read these fields and manipulate its content through script in indesign

    It's probably best to ask in the InDesign Scripting forum:
    InDesign Scripting

  • How to create a file and store its contents into another file?

    Hi,
    I'm having some trouble trying to create a code where I have to to create a file and store its contents into another file?
    I read the API, but I'm not certain how this file thing works.
    Here's my code so far:
    public static void main(String[] args) throws Exception
              File file = new File("tasks.txt");
              if (file.exists())
                   System.out.println("File already exists");
                   System.exit(0);
              Scanner scan = new Scanner(System.in);
              Scanner scan2 = new Scanner(System.in);
              //Scans the input line by line
              scan.useDelimiter("\\n");
              //Scans the input by tabs
              scan2.useDelimiter("\\t");
              PrintWriter outputs = new PrintWriter("newtasks.txt");
              outputs.print("ok");
              outputs.println(3);
              outputs.close();
         }

    I managed to change my text into uppercase, but how do I store the uppercase content into another file.
    -So this is what I did so far, I took a text file and modified its strings to uppercase.
    -Now I need to put those modified strings into another text file, is there a way where I can do that with my current code?
    -I already tried printwriter, but it doesn't seem to work
    public static void main(String[] args)throws IOException
              //Task[] oneHundredTasks = new Task[100];
              String uppercase;
              String combine;
              Scanner scan = null;
              FileInputStream in = null;
            FileOutputStream out = null;
            PrintWriter output = null;
            try
                 scan = new Scanner(new BufferedReader(new FileReader("tasks.txt")));
                 scan.useDelimiter("\\n");
                 scan.useDelimiter("\\t");
                while (scan.hasNext())
                     if(!scan.hasNext())
                          scan.next();
                     combine = scan.next();
                     uppercase = combine.toUpperCase();
                     System.out.println(uppercase);
            finally
                if (scan != null)
                    scan.close();
            //The program will try the input and output files
            try
                 in = new FileInputStream("tasks.txt");
                out = new FileOutputStream("newtasks.txt");
                int c;
                //The number "-1" is used to indicate that it has reached the end of the stream.
                while ((c = in.read()) != -1)
                    out.write(c);
            finally
                if (in != null)
                    in.close();
                if (out != null)
                    out.close();
         }

  • Embeding pdf in aspx page and transfer its contents to server using live cycle

    Hi,
         I am new in designing live cycle forms , My requirement is I want to send a pdf content data from client to server, i am using visualstudio 2005 ,
    pls give me a solution for sending using live cycle designer , Is it possible to call a webservice using live cycle if so then how? please provide a sample application , I am waiting for reply

    1) submitting form content from an interactive PDF to a server-side solution
    Designer ES enables the submission of PDF, XDP+XML, XML, and form data via an an HTTP POST. The fact that a PDF is hosted in a HTML container produced by ASPX does not change the submission options. Could you be more specific about what you are looking for in the context of VS 2005?
    2) calling a Web Service
    Yes it is possible to call a Web Service from a client-side interactive PDF. You need to define a data connection to a SOAP endpoint and bind the input and output parameters to form fields. See LiveCycle Designer ES help http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/000498.html.
    Steve

  • How can I convert adobe reader and all its contents in my files to acrobat

    I have been wanting to convert all my adobe reader on file. I want them all in acrobat.com.

    Hi Shirley,
    You can get a free account to Acrobat.com and then upload the files from your computer to your cloud account. For more information, or to sign up, go to https://cloud.acrobat.com.
    Please let us know if you have additional questions.
    Best,
    Sara

  • How to read from BLOB and Write to a file in user readable format.

    Hi,
         I am trying to read from a BLOB column and write the content to a file in user readable format. So far I was able to read the Blob column using dbms_lob, but not able to write to a file. Kindly let me know the method to do this.

    Hi, with this Java Code from Oracle Technet it's a easy thing:
    // classpath= /ORACLE/u01/app/oracle/product/10.2.0.3/jdbc/lib/ojdbc14.jar
    // Java SQL classes
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    // Oracle JDBC driver class
    import oracle.jdbc.OracleDriver;
    // Java IO classes
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    //Java Util classes
    import java.util.Properties;
    * This class demonstrates the Oracle JDBC 10g enhanced features for inserting
    * and retrieving CLOB data from the database. Using the new features, large
    * data of more than 32765 bytes can be inserted into the database using the
    * existing PreparedStatement.setString() and PreparedStatement.getString()
    * methods.
    public class ClobMan {
    /* Database Connection object */
    private Connection conn = null;
    /* Variables to hold database details */
    private String url = null;
    private String user = null;
    private String password = null;
    // Create a property object to hold the username, password and
    // the new property SetBigStringTryClob.
    private Properties props = new Properties();
    /* String to hold file name */
    private String fileName = null;
    * Default Constructor to instantiate and get a handle to class methods
    * and variables.
    public ClobMan(String fileName) {
    this.fileName = fileName;
    * Main runnable class.
    public static void main(String[] args) throws SQLException {
    // Instantiate the main class.
    ClobMan clobMan = new ClobMan(args[0]);
    // Load the Oracle JDBC driver class.
    DriverManager.registerDriver(new OracleDriver());
    // Load the database details into the variables.
    String dbUrl = "jdbc:oracle:thin:@pmol:1550:dbpmol";
    clobMan.url = dbUrl;
    clobMan.user = "gh10";
    clobMan.password = "secret";
    // Populate the property object to hold the username, password and
    // the new property 'SetBigStringTryClob' which is set to true. Setting
    // this property allows inserting of large data using the existing
    // setString() method, to a CLOB column in the database.
    clobMan.props.put("user", clobMan.user );
    clobMan.props.put("password", clobMan.password);
    clobMan.props.put("SetBigStringTryClob", "true");
    // Check if the table 'CLOB_TAB' is present in the database.
    //clobMan.checkTables();
    // Call the methods to insert and select CLOB from the database.
    //clobMan.insertClob();
    clobMan.selectClob();
    * This method will insert the data into a CLOB column in the database.
    * Oracle JDBC 10g has enhanced the existing PreparedStatement.setString()
    * method for setting the data more than 32765 bytes. So, using setString(),
    * it is now easy to insert CLOB data into the database directly.
    private void insertClob() throws SQLException {
    // Create a PreparedStatement object.
    PreparedStatement pstmt = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create SQL query to insert data into the CLOB column in the database.
    String sql = "INSERT INTO clob_tab VALUES(?)";
    // Read a big file(larger than 32765 bytes)
    String str = this.readFile();
    // Create the OraclePreparedStatement object
    pstmt = conn.prepareStatement(sql);
    // Use the same setString() method which is enhanced to insert
    // the CLOB data. The string data is automatically transformed into a
    // clob and inserted into the database column. Make sure that the
    // Connection property - 'SetBigStringTryClob' is set to true for
    // the insert to happen.
    pstmt.setString(1,str);
    // Execute the PreparedStatement
    pstmt.executeUpdate();
    } catch (SQLException sqlex) {
    // Catch Exceptions and display messages accordingly.
    System.out.println("SQLException while connecting and inserting into " +
    "the database table: " + sqlex.toString());
    } catch (Exception ex) {
    System.out.println("Exception while connecting and inserting into the" +
    " database table: " + ex.toString());
    } finally {
    // Close the Statement and the connection objects.
    if (pstmt!=null) pstmt.close();
    if (conn!=null) conn.close();
    * This method reads the CLOB data from the database by using getString()
    * method.
    private void selectClob() throws SQLException {
    // Create a PreparedStatement object
    PreparedStatement pstmt = null;
    // Create a ResultSet to hold the records retrieved.
    ResultSet rset = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create SQL query statement to retrieve records having CLOB data from
    // the database.
    String sqlCall = "SELECT rownum, name, sourcetext FROM t_source";
    pstmt= conn.prepareStatement(sqlCall);
    // Execute the PrepareStatement
    rset = pstmt.executeQuery();
    String rownum = null;
    String o_name =null;
    String clobVal = null;
    // Get the CLOB value from the resultset
    //java.io.BufferedWriter out = new java.io.BufferedWriter(new java.io.FileWriter("pr_all.sql"));
    while (rset.next()) {
    rownum = rset.getString(1);
         o_name = rset.getString(2);
         clobVal = rset.getString(3);
    System.out.println(" length: "+clobVal.length()+" "+o_name+" "+rownum);
         java.io.BufferedWriter out =
         new java.io.BufferedWriter(new java.io.FileWriter(o_name+".prc"));
         out.write(clobVal);
         out.newLine();
         out.write("/");
         out.newLine();
         out.newLine();
    out.flush();
    out.close();
    } catch (SQLException sqlex) {
    // Catch Exceptions and display messages accordingly.
    System.out.println("SQLException while connecting and querying the " +
    "database table: " + sqlex.toString());
    } catch (Exception ex) {
    System.out.println("Exception while connecting and querying the " +
    "database table: " + ex.toString());
    } finally {
    // Close the resultset, statement and the connection objects.
    if (rset !=null) rset.close();
    if (pstmt!=null) pstmt.close();
    if (conn!=null) conn.close();
    * Method to check if the table ('CLOB_TAB') exists in the database; if not
    * then it is created.
    * Table Name: CLOB_TAB
    * Column Name Type
    * col_col CLOB
    private void checkTables() {
    Statement stmt = null;
    ResultSet rset = null;
    try {
    // Create the database connection, if it is closed.
    if ((conn==null)||conn.isClosed()){
    // Connect to the database.
    conn = DriverManager.getConnection( this.url, this.props );
    // Create Statement object
    stmt = conn.createStatement();
    // Check if the table is present
    rset = stmt.executeQuery(" SELECT table_name FROM user_tables "+
    " WHERE table_name = 'CLOB_TAB' ");
    // If the table is not present, then create the table.
    if (!rset.next()) {
    // Table does not exist, create it
    stmt.executeUpdate(" CREATE TABLE clob_tab(clob_col CLOB)");
    } catch (SQLException sqlEx) {
    System.out.println("Could not create table clob_tab : "
    +sqlEx.toString());
    } finally {
    try {
    if( rset != null ) rset.close();
    if( stmt != null ) stmt.close();
    if (conn!=null) conn.close();
    } catch(SQLException ex) {
    System.out.println("Could not close objects in checkTables method : "
    +ex.toString());
    * This method reads the specified text file and, returns the content
    * as a string.
    private String readFile()
    throws FileNotFoundException, IOException{
    // Read the file whose content has to be passed as String
    BufferedReader br = new BufferedReader(new FileReader(fileName));
    String nextLine = "";
    StringBuffer sb = new StringBuffer();
    while ((nextLine = br.readLine()) != null) {
    sb.append(nextLine);
    // Convert the content into to a string
    String clobData = sb.toString();
    // Return the data.
    return clobData;
    }

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

  • Used to burn/read DVD-R and +R disks, lately will only burn +R.

    My MBP used to burn/read DVD-R and +R disks.  Lately will only burn +R. 
    The drive info:
    HL-DT-ST DVDRW  GS23N:
      Firmware Revision:          SB03
      Interconnect:          ATAPI
      Burn Support:          Yes (Apple Shipping Drive)
      Cache:          0 KB
      Reads DVD:          Yes
      CD-Write:          -R, -RW
      DVD-Write:          -R, -RW
      Write Strategies:          CD-TAO, CD-SAO, CD-Raw, DVD-DAO
      Media:          To show the available burn speeds, insert a disc and choose View > Refresh
    Others show the drive with -/+R -/+RW and DL (and more) and 2 MB buffer...
    It makes no sense to me, need help.  Thanks.
    Leslie.

    Hi Leslie,
    Try an SMC Reset: http://support.apple.com/kb/HT3964                              

  • I used up all of my pages and then my games disappeared? anyone help?

    I used up all of my pages and then my games disappeared? anyone help?

    As already mentioned in your other post, you'll have to create folders and group the apps, then your other apps will be visible again.
    To create folders, tap on one app until it starts to shake, then move it over another app and let go. After that you can move the apps into that folder by dragging them into it.

  • How can I save a page and all its component parts in a single file, like IE does as an MHT - it's much easier for mailing to people where page address not available?? (as in output from an airline booking site, for example)

    how can I save a page and all its component parts in a single file, like IE does as an MHT?
    It's much easier for mailing to people where page address not available?? (as in output from an airline booking site, for example)
    It is simply too painful to have to zip everything up into a single file to send. MHT format has been available for years now from IE, and with every new FF release it's the first thing I look for. I have been using FF for years, and hate having to come out of it, over into IE |(which I even took out of startup) and key everything in again, in order to send somebody something in a convenient format that they can open with a single click.
    I can't believe this hasn't been asked before, so have you looked at it and rejected it? Have MS kept the file format secret?
    Thanks
    MG

    This is not really an answer just my comments on your question.
    I am sure I recollect efforts being made to get mhtml to work with FF.
    Probably the important thing to remember about .mhtml is that if other browsers do support it they may need addons, and may not necessarily render the content correctly/consistently.
    There are FF addons designed for archiving webpages, you could try them, but that then assumes the recipient has the same software.
    You could simply save the page from FF to your XP pc; then offline open it with and save it using IE, before then emailing using FF, and attaching the .mht or mhtml file that you have now created on your PC.
    As an alternative method, in some cases it could be worth considering taking a screen grab of the required page, then sending that to the recipient as a single email attatchment using either a bitmap or jpeg file format for instance.
    Something such as an airline booking may be designed with a print option, possibly it could be worthwile looking at sending the print file itself as an email attachment.

  • Reading a properties file in a servlet and passing its contents to a JSP pa

    Hi all,
    I'm totally new to Servlet pgmg n JSP. Please can ne1 tell how to read a simple properties file (in a servlet) and pass its contents to a JSP page.Actually the reason is to fill a combo box in a JSP page with the contents of a properties file.If calling a servlet for the same is d best way to do that, plz can ne1 tell me :
    1> whether to override the doPost method in the servlet in which to read d file using FileInputStream
    2> Putting the contents in an array and then how to pass this array to the JSP page.
    Thanks,
    deepthy.

    I'm using a properties file to let my web application know what the name of the database is. I'm using an abstract class GeneralDao which will be extended by all the DAO's (Data Access Objects or java classes containing SQL statements).
    Here's the code :
    protected Connection getDatabaseConnection()
              throws Melding
         Connection dbconn = null;     
         ResourceBundle resBundle;
         try
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         resBundle = ResourceBundle.getBundle("gcoConfig");
         String dbConnectie = resBundle.getString("databaseconnection");
         gcoLogger.debug("lezen databaseconnection in resourceBundle " );
         dbconn = DriverManager.getConnection(dbConnectie);
         } catch (InstantiationException exc)The ResourceBundle is used to read the properties file, named gcoConfig.properties.
    With the getString() command I read the content of the string named databaseconnection.
    The gcoConfig.properties file is placed inside the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes
    The GeneralDao is placed in the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes\org\gertcuppens\cluifDao.
    So this class is placed some folder below the WEB-INF\classes folder of gcoConfig.properties.
    And the content of the properties file is just one line :
    databaseconnection=jdbc:mysql://localhost/cluif
    If you want to let the JSP know what's inside the properties file, wrap the content in a Javabean, put it in the request or even the session and pass the control to the JSP.

  • Can a servlet read a jsp file and display its contents?

    Hi,
    I would like to know if Servlets can read a Jsp file and display its contents.. Right now for our website, I am using a html file to be displayed after a successful post operation through the Servlets...
    -Thanks!

    I posted this in another thread.
    Here's some code that reads using a URL. This doesn't work with JSPs as the server executes JSP when it connects but it's useful for other file types. Note that the filename is a URI</h1>This is <code>show.jsp</code></h1>
    <hr>
    <%! String file = null; %>
    <%! java.io.InputStream is = null; %>
    <%
    file = request.getParameterValues("filename")[0];
    try {
       is = (new java.net.URL(file)).openStream();
    } catch (java.io.IOException ioe) { out.write(file + " not found!<br>"); }
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(is));
    String line = "";
    %>
    <pre>
    <%
    while((line = in.readLine()) != null) {
    %>
    <%=line%>
    <%
    %>
    </pre>

  • I have 2 concerns, first my Canon 5d Mark II is not showing up when I try to download pictures.  I have to use the card reader to do so.  Then there is no file handling window available anywhere.  Please help.  Jim R.

    I have 2 concerns, first my Canon 5D MarkII is not showing up in the input source when I download to lightroom.  I have to use the card reader to do so.  Then there is no File Handling Section listed anywhere.  Please Help.  Thanks Jim R.

    You should find the forum for whatever prdouct your posting concerns and ask for help there. 
    Here is a link to a page that has links to all Adobe forums...
    Forum links page:
    https://forums.adobe.com/welcome

  • I am downloading the premiere elements 12 file on the adobe page and my error message says the file archive is missing??

    I am downloading the premiere elements 12 file on the adobe page and my error message says the file archive is missing??

    you need the 7z file in addition to the exe
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

Maybe you are looking for

  • Delete Empty Frames in Indesign through AppleScript

    Hi Everyone, We have some users who mistakenly add empty frames in the indesign document. (these are generally very small for example {4.9786 in, 3.9402 in} etc) Can we identify such frames through an apple script. Usually the frames can be made as a

  • Table row does not flow to next page

    Hi, I am using deep structure table in adobe form but the content is not flowing to next page. I have wraped the table in subform, Body Page, subform and table all are flowed and allow page breaks with content is also ticked,  still the table row doe

  • Vision: M Wont' Connect To

    So, I've had various problems with it at the moment. I used to automatically get album art just by dragging and dropping into the area but now, after much hassle with Windows Media Player and different versions, I've managed to get albuma art by tran

  • How do I update iOS

    Can't figure out how to update my old system

  • Restoring my RAW files from the Vault.

    I keep my Aperture photo files on an external hard drive and back them up in the Vault after every import. This external drive just crashed. I have a replacement drive and want to restore these files from the Vault and be able to use them. I called A