How to create .sites file after the work is done?

I've lost one or two of my sites regarding to this problem.
I just know that I need .site files if you need to come back and modify it later.
Any way to create domain.site files?

to retieve file content from the databse i have done this.... but its not working . i m using mysql database... i m getting
1)BLOB cannot be resolved to a type
2)The method getBLOB(String) is undefined for the type ResultSet
3)path cannot be resolved
anyone pls help me...
my jsp code is...
<%
try
int returnValue = 0;
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
InputStream is = null;
OutputStream os = null;
BLOB blob = null;
String text;
     text=request.getParameter("text");
     Class.forName("com.mysql.jdbc.Driver");
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/sushikha","root","root");
     final String query = "SELECT data,path FROM pro WHERE data LIKE = " + text;
     conn.setAutoCommit(false);
     stmt = conn.createStatement();
     rs = stmt.executeQuery(query);
     if(rs.next())
     blob = rs.getBLOB("data");
          is = blob.getBinaryStream();
          final String fileName = rs.getString("path");
          final Stri0ng filePath = path + fileName;
          os = new FileOutputStream(filePath);
          final int bufferSize = blob.getBufferSize();
          final byte[] buffer = new byte[bufferSize];
          int bytesRead = 0;
          while ((bytesRead = is.read(buffer)) != -1)
          os.write(buffer, 0, bytesRead);
else
     returnValue = 1;
     catch(Exception e)
     out.println(e);
%>
thanx in advance..sush

Similar Messages

  • How to create a file in the server?

    Hi,
    I'm making a webservice that has to generate a XML file, sign it using another webservice and return this XML. The problem is that i don't know how to create the file in the server throught webservice.
    I use this code in the webservice to generate the XML and after I return the XML to client in a byte[]
         static void outputDocumentToFile(Document myDocument, String path) {
            //setup this like outputDocument
              try {
                   // XMLOutputter outputter = new XMLOutputter("  ", true);
                   XMLOutputter outputter = new XMLOutputter();
                   //output to a file
                   FileWriter writer = new FileWriter(path);
                   outputter.output(myDocument, writer);
                   writer.close();
              } catch(java.io.IOException e) {
                   e.printStackTrace();
        }But the file is generated in the client-side, how can I generate the file in the server-side?
    Thanks very much.

    Well the File object doesn't create a file it's simply an abstract representation of file and directory pathnames.
    You can try something like this:
    <%
    try
    // get the path to the web server root
    // I read somewhere not to use 'getRealPath' for some reason which I
    // can't seem to remember :S Hopefull someone can enlighten us :)
    String path = application.getRealPath("/project/jsp/demo.txt");
    File file = new File(path);
    PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(file)));
    writer.println("Hello World!");
    writer.close();
    catch (Exception e)
    System.err.println(e.getMessage());
    %>
    Hope this helps :)

  • How to create a file after ElapsedTime

    Hi, I have a situation where my BPEL process consumes messages off of a queue and creates a output file using them via a FTP Adapter. The number of messages vary greatly depending on the day and the business needs only 1 file a day with the appropriate dateTime stamped to it. I tried using the elapsedTime option on the FTP adapter but it seems to be waiting for invocation before creating the file. I set the time to 2 minutes but instead of creating the file after 2 minutes of inactivity, it waits for a message to be triggered with more than 2 minutes time difference from the last one. Since the messages come in a burst on this queue, the next message wont come in until the next day for the file to be triggered.
    I also tried appending to a file but this is over a SFTP connection so it just kept overwriting the file and in the end I just have 1 record on the file. Any suggestions on this would be really helpful as to how should I go about creating this file in a way that it captures all the messages for today and creates the file the same day as well. Thanks!

    like an action class?Huh? What exactly is your requirement?
    Creating a file is usually done with java.io API. Read the java.io tutorials how to play with files.

  • How to create command file for the Database Project?

    Hi All,
    We are using Oracle 10G.
    We are using Database Project in Visual Studio.NET to source control the SQL Scripts of SPs and Tables.
    Now, while creating commad file, it asks me select all the files to be included. thats fine. But after creation, if I open and see...It starts like....
    osql...test1.sql.
    osql...test2.sql
    but, osql is commad of SQL Server not of Oracle...if am not wrong..!
    Is there any settings that can help me create command file that works on Oracle?
    Thanks and Regards
    Senthil

    File>Print
    Choose Adobe PDF as your printer
    Go to Setup
    Go to preferences
    Choose the standard
    Make sure the rest of your settings are correct for the page size etc.
    It's a big screenshot so I've linked instead of posting here.
    Sorry had to blur out some PDF settings for privacy reasons
    http://img339.imageshack.us/img339/6103/37345539.png

  • How to create .exe file of the java program you create?

    This must be the qustions asked several time on the forums.So here it is again.
    This sounds absurd to some developers here cause you'll say just create jar file and distributre to usr but sometimes there is not possiblity of having runtime environment in windows computers.So if we can bundle the enviroment and the setup together then packing into exe and then distribute like most of commercial java application sounds better.But the problem is how to do that?
    Ok creating exe will increase the size but that doesn't matter,if there is any freeware tool to accomplish just that?

    Check this out:
    http://search.java.sun.com/search/java/index.jsp?qp=%2B
    orum%3A31&nh=10&qt=create+exe+file+program&col=javaforu
    s

  • How to create .lsb files in the LabVIEW6?

    my IDE is VC6.0, how can i create a .lsb files?

    lyq;
    lsb files are the one that LabVIEW uses in a CIN. The specific step that creates the lsb file is a custom step which involve calling a program called "lvsbutil.exe", which must be in your cintools directory where LabVIEW is located. You can configure VC++ to do that extra step.
    Check the manual Using External Code in LabVIEW. Chapter 3 explain all the steps to create your own lsb.
    Best regards;
    Enrique
    www.vartortech.com

  • How to create html files while the request to a jsp file of same

    Hi..
    i need to create html thumbnails during the runtime for a jsp page. so that i can display it in a table (number of pages.). For that, i need to create html pages for each and every request to that jsp file with different data. please help me in this..
    Thanks
    Suresh S

    I believe you will need to more clearly describe what you are trying to do and what the problem is that you are having before you get a reply to your question.

  • How to create a file for the file format PDF/A?

    I want to create a file,which conform to the standard  PDF/A.
    when i use InDesign to create a pdf file and export it,i find the file format only support PDF/X,
    but i can't find any menu for PDF/A.
    who can help me?
    thank you !

    File>Print
    Choose Adobe PDF as your printer
    Go to Setup
    Go to preferences
    Choose the standard
    Make sure the rest of your settings are correct for the page size etc.
    It's a big screenshot so I've linked instead of posting here.
    Sorry had to blur out some PDF settings for privacy reasons
    http://img339.imageshack.us/img339/6103/37345539.png

  • How to create IDX files

    Hi All,
    How to create IDX files, In pdf i have done full text index with catlog, i have got the pdx files.
    But i need the index files *.idx files.
    How to get these files.
    Please help me to solve this issue.
    Regards,
    Vinoth

    i have created the button on Acrobat X professional.
    Please find the below code for search the text
    // Test search text and only proceed if it’s not empty
    var cSearchTxt = this.getField("SearchText").value;
    if(!/^\s*$/.test(cSearchTxt))
       // Create first part of path to index file from this file
       var aPath = this.path.split("/");
       aPath.pop();
       var cPathRoot = aPath.join("/");
       // Determine Index to use with search
       var cIdxPath = "";
       var cCatagory = this.getField("Catagory").value;
       switch(cCatagory)
          case "P01":
             cIdxPath = cPathRoot + "/Catalogs/Paper01.pdx";
             break;
          case "P02":
             cIdxPath = cPathRoot + "/Catalogs/Paper02.pdx";
             break;
       // Setup Search Options
       //search.matchCase = this.getField("CaseSensitive").isBoxChecked(0);
       //search.matchWholeWord = this.getField("WholeWord").isBoxChecked(0);
       //search.wordMatching = this.getField("MatchOpts").value;
       //  Perform Search
       search.query(cSearchTxt, "Index", cIdxPath);
    Regards,
    Vinoth

  • I am working in windows 7 and I am trying to enable the copy/paste and I can not find user.j file in the profile and I am not real sure how to create a file, I can create a folder .

    I am trying to copy text from a word document and paste it into my web builder and it says that firefox does not support copy/paste from clipboard. Went to your site and it tells me to open the user.j file in my profile. This file does not exist and I am not real sure how to create that file so I can paste the fix from your site into it.

    I went to that link and added to firefox add on but it still does not work. I went to the add on option button for this but it told me that my MYSIWG widget was disabled. Does this have something to do with it not working and if so how do you enable it.

  • How to create xml file from Oracle and sending the same xml file to an url

    How to create xml file from Oracle and sending the same xml file to an url

    SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
    Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.

  • How do i transfer a compilation photo file from iPhoto consisting of canon(img) and lumix(p..) in the order i compiled them to a usb stick as at the moment it is putting all the lumix files after the canon files?

    I have a macbook pro 15 inch retina 16 gb 1600mhz 2.7intel i7 osx 10.8.5
    I have just put together an iPhoto file of wedding photos consisting of a compilation of images from my canon(img files) and lumix(p..files) I want to know how to transfer them to a usb stick in the order i compiled them as at the moment it is putting all the lumix files after the canon files which is not how i want to present them to the newlyweds?

    Files are ordered by the file-viewer being used.  What viewer are you using, and what data field are you sorting by?
    In Finder, as in most applications, you can select the data field to sort by clicking a column header.  Clicking the selected header will reverse the sort.
    This is the Aperture forum, but what applies to Aperture is likely also true for iPhoto:  if you want to be able to sort your files in a specific order in a file-viewer, you should give them names that allow for sorting in that order when the name field is selected as the data field to sort by.  In Aperture, one creates new files by exporting, and one uses a File Naming Preset to name the files.  The File Naming Preset can start with an ordinal count or a sequence number.  Either of which will allow you to retain your order when viewing your files in a file viewer.

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • How to create a password for the pdf file

    In Adore Acrobat XI, how to create a password for the file? The help states going to Tools Menu and clicking on Protection tab - but there is no such option. In the file - properties - security screen, it shows the security details but does not allow to edit it.

    I think you may be mixing up two different products: Adobe Reader (free), and Acrobat ($$).

  • I have a G4 Quicksilver that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new iMac?

    I have a G4 Quicksilver 2001 that no longer works, but the hd may still be good. How can I get files off the G4 hd and onto my new late 2013 iMac?

    Also, how do I boot the G4 into FireWire Target Disk mode?
    First, the G4 must be able to start to use FWTDM. If it can start, hold the t key at boot until you get a "screensaver pattern" that looks like this:
    If the G4 is attached via a FireWire cable to a newer Mac with a FireWire port, the G4's hard drive will appear on the other Mac's desktop just as if it were any external drive. A USB cable won't work for FWTDM.
    Just wondering if the drive in my G4, which I believe may be an ATA drive will also work in an enclosure for a SATA drive?
    No. ATA (actually "PATA" or "IDE") and SATA are different interfaces. PATA external enclosures are now very hard to find. You best and least expensive option is the adaptor that BDAqua linked. One of its connectors is for PATA drives.

Maybe you are looking for

  • Import export in different encoding

    Is there a way to change an Import/Export Wizard's output in UTF encoding. Please help.

  • Websites are not rendering properly

    I am having an issue where some sites do not render correctly. It is usually found on sites where there are multiple columns and one or several columns float on scrolling. The central column will "hide" behind the right or left-hand column/s and be u

  • JAR file which needs other JAR files

    Hi, I try to run a jar file, which imports some external classes. These classes are in the library "reader.jar", which is added to the classpath. But if I start it with ...      D:\TestProject>java -cp ./reader.jar -jar viewer.jar ... I get an error:

  • Query using Analytical Function

    /*Hi there, i have the following table:*/ create table test (charcode varchar2(10),numberv number,father varchar2(10)); insert into test values('1',null,null); // Level 1 insert into test values('1.1',null,'1'); // Level 2 insert into test values('1.

  • How to control and manage several microsoft accounts and have control

    Windows 8 has brought many unique challenges, and very few IT people seem to be able to answer questions like this. I  am a mechanical engineer for a small company who wishes to install Windows server2012 on a new server with new laptops for each use