How can I create a file brows menu and save option?

How can I create a file brows menu, if I wont my user to choose a picture from his PC.
And how can I save my user settings?(this is application going to be only on my users pc)

You can launch a file selection dialog with FileReference. You can save settings using a SharedObject (like a cookie).
http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7 .html
http://livedocs.adobe.com/flex/3/html/help.html?content=lsos_3.html
http://livedocs.adobe.com/flex/3/html/help.html?content=lsos_5.html
If this is a Flex app, you will only be able to select a file from the local machine and upload to server, you won't be able to open the file in the Flex app, due to security sandbox.
If this is an AIR app you will not have this restriction.
If this post answers your question or helps, please mark it as such.

Similar Messages

  • HT4075 I don't have any problems merging the documents by dragging, but when I try to save and open afterwards, only the last shown doc was saved, not the combined files I wanted to merge. I tried save and export, how can I create the file after merging?

    Hi, I'm having trouble saving the documents when merging in Preview. I don't have any problems merging the pdf documents by dragging them in preview, but when I try to save and open afterwards, only the last shown doc was saved, not the combined files I wanted to merge. I've tried save and export, but none merge the documents after saving... how can I create the file (with all the pdf files) after merging?

    That's a comment in the file. It has no effect at all.

  • How can I pass a file refnum into and out of external c++ code? What type does it convert to in c++?

    I am trying to write external c++ code that will read a file already opened by Labview and therefore assigned a refnum. (Unfortunately, I definately can't use the standard Labview vis.) However I am not sure what c++ type to use in order to manage the refnum.
    All help and thoughts appreciated. Thanks,
    Joanna

    You could do ALL your file handling in C or C++ (MFC CFile for
    example) and pass Microsoft file handles into and out of LabVIEW
    instead of LabVIEW file references into and out of C. This may be an
    easier way to attack the problem.
    You could create a DLL in MSVC that exports a FileOpen function, a
    FileClose function and a FileRead and/or FileWrite Function and then
    call that DLL from place to place as required in your code.
    It would help us if you would explain what kind of data you are trying
    to read or write and what the application is. Is it binary data?
    text files? Do you need some special Win32 file system feature like
    file mapped memory? I guess what I am asking is what is your
    motivation for doing file handling in C or C++?
    Douglas De Clue
    LabVIEW developer
    [email protected]
    "Rolf" wrote in message news:...
    > A LabVIEW file refnum is an internal Magic Cookie to LabVIEW and there is no
    > way to directly extract the actual information assigned to that Magic
    > Cookie.
    > However the CIN Reference Manual describes one function which allows to
    > retrieve a lower level "File" handle and at least on Windows 32 bit and
    > LabVIEW
    > from version 5 up to and including 6.1 this "File" LabVIEW datatype directly
    > maps
    > to the Win32 API "FILE" Handle.
    >
    > The function to use is
    >
    > MgErr FRefNumToFD(LVRefNum refNum, File *fdp);
    >
    > It is declared in extcode.h or one of its dependant headers and exported
    > from "labview.lib"
    > all located in the cintools directory and you can link this lib also to a
    > normal DLL project.
    > However calling this DLL then from any other process than LabVIEW or a
    > LabVIEW
    > executable will not initialize the DLL anymore correctly.
    >
    > Your best option if you need to write in C(++) should be to use the LabVIEW
    > file manager
    > functions described on the External Code Manual (manual/lvexcode.pdf) on
    > this File handle.
    > If you need to use directly some Win32 API functions with it please note
    > that although currently
    > the "File" in the LabVIEW file manager functions matches the FILE in Windows
    > 32 bit API
    > functions this is an undocumented and hence unsupported feature. The next
    > LabVIEW version
    > may actually use a different datatype for its "File" parameter to the
    > LabVIEW file manager calls
    > and your use of assuming File == FILE may simply crash.
    >
    > Also operating on a file refnum in LabVIEW which has been accessed directly
    > with Win API
    > functions may result in strange behaviour such as the file read/write mark
    > not being updated as
    > you would maybe expect it.
    >
    > "Jo" wrote in message
    > news:50650000000800000016520000-1023576873000@exch​ange.ni.com...
    > > How can I pass a file refnum into and out of external c++ code? What
    > > type does it convert to in c++?
    > >
    > > I am trying to write external c++ code that will read a file already
    > > opened by Labview and therefore assigned a refnum. (Unfortunately, I
    > > definately can't use the standard Labview vis.) However I am not sure
    > > what c++ type to use in order to manage the refnum.
    > > All help and thoughts appreciated. Thanks,
    > > Joanna

  • How can a recover a file I did not save?

    How can I recover a file I did not save?

    Or if all else fails and you think you had it in iCloud...
    You won't find it via a normal search in Finder.
    But in Finder you can try holding down the option key and in the menu Go > Library > Mobile Documents > com~apple~Numbers and look for an 'Untitled.numbers' document there.
    SG

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

  • How can i backup my iPod Touch 4g and save my apps onto a new hard drive without having to save onto the current hard drive first?

    How can i backup my iPod Touch 4g and save my apps onto a new hard drive without having to save onto the current hard drive first?
    My current hard drive is filled up and i'm going to buy a new, bigger hard drive. How can i change the save and backup destination for iTunes so i can backup and transfer my purchases(apps) onto the new hard drive? Without having to backup and save my apps onto the current hard drive because there's no space left on it. Thanks!

    have you tried following the steps given here on the apple's knowledge base site may be they can help you
    http://support.apple.com/kb/HT1414
    here is a video from youtube as well
    http://www.youtube.com/watch?v=wH_1qkHkZi0
    also this tutorial
    http://www.imore.com/how-to-setup-backup-restore-update-use-icloud

  • How can I create a file to another computer

    Hi.
    I was wondering how can I create or write a txt file but in another computer(Server).
    For instance, using the BufferedWriter to write in my computer I can do.
    BufferedWriter out = new BufferedWriter(new FileWriter("C://hello.txt", false));
    There is a way to write directly to the server? do I need to create a Server/Client protocol? it can do directly by BufferWriter?
    Thank you, any help it will be very great.
    Chris

    if the server is windows based (or runs SAMBA) then it is very easy to just use the host machine's path.
    i.e.
    BufferedWriter out = new BufferedWriter(new FileWriter("\\\\Server\\C\\hello.txt", false));
    where the server's hostname is 'Server"
    and you have shared a directory called "C"

  • How can i create  Jar file using Eclipse IDE.

    Hi Guys
    Am new to java. I want convert my project into executable jar file.
    In my project am using itext.jar.And some other folder.
    already i create jar file.But its not working.only its working 4 modules after that its say file cannot found exception.but the file path is correct.i dont know why its happen.
    This is my project folder strutre also
    Log:->
    src(folder)
    logs(folder)
    comments(folder)
    lib-->itext.jar.
    images-->1,gif
    properties-->catconfig.properties (file)
    now can i create jar file
    this code also show error when i run the jar file
    And this is my catconfig. properties file
    fileName=total_system_log.log
    DDSingle=DD_bysingleIP_comment.txt
    DDRange=DD_byrange_comment.txt
    NDPing=ping_comments.txt
    NDFPing=fping_comments.txt
    reportFileName=report.txt
    moduleFileName=Modules.txt
    propFileName=nameDetails.properties
    Choice=DDSingle
    logFileName=DDSingleIP_10.32.0.2.log
    finalReport=FinalReport.txt
    logFilePath=\logs\
    commentFilePath=\\Comments\\
    its very urgent for me . could u pls send my error  and u r ideas.
    thanks for u r Ansewering.
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.InputStream;
    import java.io.RandomAccessFile;
    import java.util.Properties;
    import java.util.ResourceBundle;
    import java.util.ArrayList;
    public class LogReader {  
        public void getValuesFromFilesOnly(String Choice,String logFileName)
              try {
                   ArrayList commentsList = new ArrayList();
                   ArrayList tempList = new ArrayList();
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String commentDir =ResourceBundle.getBundle("catconfig").getString(Choice);
                   String commentFilePath=ResourceBundle.getBundle("catconfig").getString("commentFilePath");
                   String currentdir1 =userdir+logFilePath+logFileName;
                   StringBuffer strBuff=new StringBuffer();
                   RandomAccessFile randomFile = null;
                   RandomAccessFile commentsFile = null;
                   String tempLine = null;
                   String commentLine = null;
                   String catVersion = null;
                   String finalReport=null;
                   int colon = 0;                    
                   int counter = 0;
                   boolean startFlag = false;
                   boolean endFlag = false;                    
                   boolean endOfFileFlag = false;          
                   System.out.println("Log file checked----->"+currentdir1);
                   System.out.println("comments file used--->"+commentDir);
                   try {
                        randomFile = new RandomAccessFile(currentdir1, "r");
                   } catch (Exception e) {
                        System.out.println("exception@getValuesFromFilesOnly@begin : "+e);
                   System.out.println("hi test1");
                   String commentDir1=userdir+commentFilePath+commentDir;
                   try{
                   System.out.println("Comment Dir:"+commentDir1);
                   commentsFile = new RandomAccessFile(commentDir1, "r");
                   catch (Exception e) {
                        System.out.println("exception@getValuesFromCommentDirOnly@begin : "+e);
                   while ((commentLine = commentsFile.readLine()) != null) {                         
                        String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                        String message = commentLine.substring(0,commentLine.indexOf("="));
                        commentsList.add(checkLine);
                   commentsFile.close();
                   String startComment = (String)commentsList.get(0);
                   String endComment = (String)commentsList.get(commentsList.size()-1);
                   strBuff.append("                          CAT LOG REPORT                           \n\n");
                   while ((tempLine = randomFile.readLine()) != null) {               
                        if(tempLine.contains("CAT version is :"))
                             colon = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(colon+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("Version : "+catVersion+"\n");
                             System.out.println("catVersion is :"+catVersion);
                        commentsFile = new RandomAccessFile(commentDir1, "r");
                        while ((commentLine = commentsFile.readLine()) != null) {
                             String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                             String message = commentLine.substring(0,commentLine.indexOf("="));
                             checkLine=checkLine.toLowerCase();
                             tempLine=tempLine.toLowerCase();
                             if(tempLine.contains(checkLine))
                                  colon = tempLine.indexOf("info -");
                                  catVersion = tempLine.substring(colon+7,tempLine.length());
                                  strBuff.append(message+" ==> "+catVersion+"\n");
                                  System.out.println(message+" ==> "+catVersion);
                                  tempList.add(message+" ==> "+catVersion);
                                  if (catVersion.contains(startComment)){
                                       startFlag = true;
                                       counter++;
                                       System.out.println("*******startFlag**********"+startFlag);
                                  if (catVersion.contains(endComment)){
                                       endFlag = true;
                                       System.out.println("*******endFlag**********"+endFlag);
                                  if (startFlag == true && endFlag == true){
                                       System.out.println("******************************************");
                                       System.out.println("-------------Successfull completion-------");
                                       System.out.println("******************************************");
                                       startFlag = false;
                                       endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                                  if (startFlag == true && endFlag == false && counter > 1){
                                       System.out.println("******************************************");
                                       System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                                       System.out.println("******************************************");
                                       //startFlag = false;
                                       //endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                        commentsFile.close();
                   endOfFileFlag = true;
                   if (startFlag == true && endFlag == false && endOfFileFlag == true){
                        System.out.println("******************************************");
                        System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                        System.out.println("******************************************");
                        startFlag = false;
                        endFlag = false;
                        counter = 0;
                        tempList.clear();
                   randomFile.close();
                 System.out.println("hi");
                   finalReport=ResourceBundle.getBundle("catconfig").getString("finalReport");
                   savereportFile(strBuff,finalReport);
                   System.out.println("Report Generated");
              } catch (Exception e){
                   System.out.println("Exception@getValuesFromFilesOnly : "+e);
        public void findDetails()
             String currentdir1 = ResourceBundle.getBundle("catconfig").getString("fileName");     
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
             RandomAccessFile randomFile = null;
             StringBuffer strBuff=new StringBuffer();
             StringBuffer strBuff1=new StringBuffer();
             StringBuffer strBuff2=new StringBuffer();
             String tempLine = null;     
              String catVersion = null;
              String timeStr=null;
              String nameStr=null;
              String startIP="";
              String endIP="";
              String tempStart="";
              String tempEnd="";
              String reportFileName="";
              String moduleFileName="";
              String propFileName="";
              int startPos=0;
              int endPos=0;
              int fromIndex=0;
              boolean versionFlag=false;
              boolean ndFlag=false;
              boolean ddFlag=false;
              try {
                   randomFile = new RandomAccessFile(userdir+logFilePath+currentdir1, "r");
                   while ((tempLine = randomFile.readLine()) != null) {
                        if(tempLine.contains("CAT version is :") && !versionFlag)
                             startPos = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(startPos+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("version : "+version+"\n");
                             versionFlag=true;
                             //System.out.println("version : "+version);
                        if(tempLine.contains("Inside NetworkDiscoverySlider.jsp"))
                             ndFlag=true;
                             strBuff.append("ND start : "+tempLine+"\n");                         
                        if(tempLine.contains("Inside NetworkDiscoveryDetails.jsp"))
                             strBuff.append("ND end : "+tempLine+"\n");
                             //System.out.println(" ND end : "+tempLine);
                        if(tempLine.contains("Given IPRange from"))
                             startPos = tempLine.indexOf("from");
                             catVersion = tempLine.substring(startPos+5,tempLine.length());
                             strBuff.append("NDRange : "+catVersion+"\n");     
                             //strBuff.append("NDRange : "+tempLine+"\n");                                             
                             //System.out.println("NDRange :"+catVersion);     
                             startPos=0;
                             fromIndex=tempLine.indexOf(":");
                             endPos= tempLine.indexOf(':', fromIndex+2);
                             //System.out.println("fromIndex : "+fromIndex+" endPos : "+endPos);
                             timeStr=tempLine.substring(startPos, endPos);
                             nameStr=catVersion.replaceAll(" ", "_");                         
                             strBuff2.append("ND_"+timeStr+" "+catVersion+" = "+"NDRange_"+nameStr+".log\n");
                        if(tempLine.contains("inside ByIpAddress.jsp"))
                             ddFlag=true;
                             strBuff.append("DD Start : "+tempLine+"\n");                                                  
                        if(tempLine.contains("start_IpAddress:"))
                             startPos = tempLine.indexOf("start_IpAddress:");
                             catVersion = tempLine.substring(startPos+16,tempLine.length());
                             startIP=catVersion;                         
                        if(tempLine.contains("end_IpAddress"))
                             startPos = tempLine.indexOf("end_IpAddress");
                             catVersion = tempLine.substring(startPos+13,tempLine.length());
                             endIP=catVersion;                         
                             if(endIP.length()==0)
                                  System.out.println("hi5");
                                  strBuff.append("DDSingleIP : "+startIP+"\n");
                                  //strBuff.append("DDSingleIP : "+tempLine+"\n");                              
                                  //System.out.println("DDSingleIP : "+startIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);     
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" = "+"DDSingleIP_"+startIP+".log\n");
                             else
                                  strBuff.append("DDRangeIP : "+startIP + " to "+ endIP+"\n");
                                  //strBuff.append("DDRangeIP : "+tempLine+"\n");                              
                                  //System.out.println("DDRangeIP : "+startIP + " to "+ endIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);                         
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" to "+endIP+" = "+"DDRangeIP_"+startIP +"_to_"+ endIP+".log\n");
                        if(tempLine.contains("set percentage completedCount: 100"))
                             System.out.println("hi...1");
                             strBuff.append("DD End : "+tempLine+"\n");
                             //System.out.println("DD End : "+tempLine);          
                   reportFileName=ResourceBundle.getBundle("catconfig").getString("reportFileName");
                   savereportFile(strBuff,reportFileName);
                   if(ndFlag)
                        strBuff1.append("Network Discovery\n");                    
                   if(ddFlag)
                        strBuff1.append("Device Discovery\n");
                   moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                   savereportFile(strBuff1,moduleFileName);
                   propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                   savereportFile(strBuff2,propFileName);
              } catch (Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@findDetails : "+e);
        public void savereportFile(StringBuffer strBuff,String targetFileName)
              try{
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String reportFile=userdir+logFilePath+targetFileName;     
                   String fileContent="";
                   fileContent=strBuff.toString();
                      //System.out.println("file content : "+fileContent);
                      FileWriter fileWriter = new FileWriter(reportFile);
                      if(fileContent!=null)
                           fileWriter.write(fileContent);
                      fileWriter.close();
              catch(Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@savereportFile : "+e);
        public ArrayList<String> getFileNames()
             String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
              RandomAccessFile repFile=null;
              String reportLine = null;
              int colon=0;
              int fromIndex=0;     
              int startPos=0;
              int endPos=0;
              String timeStr="";
              String fileName=null;          
              ArrayList<String> nameList=new ArrayList<String>();          
             try
                  reportFile=userdir+logFilePath+reportFile;
                  repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                    
                        if(reportLine.contains("NDRange"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="NDRange_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDSingleIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDSingleIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDRangeIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDRangeIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                  repFile.close();
             catch(Exception e)
                   System.out.println("Error@getFileNames : "+e);
             return nameList;
        public void writeFile(String oldLogName,String newLogName)
             try
                   FileOutputStream writeFile=null;               
                   String line = null;
                   String userdir = System.getProperty("user.dir");
                   String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");     
                   String newLogPath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   RandomAccessFile repFile=null;               
                   String reportLine = null;
                   String tempLine=null;
                   String prevLine=null;
                   String nextLine=null;
                   String target=null;
                   String tempStr=null;
                   String startStr=null;
                   String endStr=null;          
                   int pos=0;
                   boolean flag=false;
                   boolean writeFlag=false;
                   boolean versionFlag=false;               
                   //System.out.println("newLogName : "+newLogName);     
                   newLogPath=userdir+newLogPath;
                   System.out.println("newLogPath : "+newLogPath);     
                   BufferedReader buffRead = new BufferedReader(new FileReader(oldLogName));
                   writeFile = new FileOutputStream(newLogPath+newLogName+".log", false);//true-for append mode
                   DataOutputStream dout=new DataOutputStream(writeFile);               
                   tempStr=newLogName.replace("_", " ");
                   pos=tempStr.indexOf(" ");
                   startStr=tempStr.substring(0,pos);
                   endStr=tempStr.substring(pos+1, tempStr.length());
                   target=startStr+" : "+endStr;
                   System.out.println("target ===> "+target);               
                   reportFile=newLogPath+reportFile;
                   repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                   
                       if(reportLine.contains(target))
                            flag=true; 
                            prevLine=tempLine;
                            //System.out.println("prevLine *****: "+prevLine);
                       else
                            tempLine=reportLine;
                            if(flag==true)
                                 nextLine=reportLine;
                                 flag=false;
                                 //System.out.println("nextLine *******:"+nextLine);
                                 break;
                  repFile.close();     
                 if(prevLine!=null && prevLine.length()>0)
                       pos=prevLine.lastIndexOf(" : ");
                       prevLine=prevLine.substring(pos+3, prevLine.length());
                       //System.out.println("prevLine : "+prevLine);
                  else
                       System.out.println("Starting line not available for : "+target);
                  if(nextLine!=null && nextLine.length()>0)
                        pos=nextLine.lastIndexOf(" : ");
                        nextLine=nextLine.substring(pos+3, nextLine.length());
                        //System.out.println("nextLine : "+nextLine);
                  else
                       System.out.println("Ending line not available for : "+target);
                       nextLine=prevLine;
                   while ((line=buffRead.readLine()) != null) {     
                        if(line.contains("CAT version is :") && !versionFlag)
                             versionFlag=true;
                             dout.writeBytes(line+"\n");                         
                        if(line.contains(prevLine))
                             writeFlag=true;                         
                        if(line.contains(nextLine))
                             writeFlag=false;
                             break;
                        if(writeFlag)
                             dout.writeBytes(line+"\n");
                  dout.writeBytes(nextLine+"\n");
                   buffRead.close();     
                   System.out.println("done");
              catch(Exception e)
                   System.out.println("Exception@writeFile : "+e.getMessage());
        public String folderCheck(String foldName)
              File folder=null;
              File newFile=null;
              String[] folderContent=null;
              String tempFileName="";
              String newLogName="";
              int count=0;     
              String logFilePath="";     
              String fileName="";
              String feedBackMsg="";          
              String userdir = System.getProperty("user.dir");
              logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
              fileName=ResourceBundle.getBundle("catconfig").getString("fileName");
              folder=new File(foldName);
              if(folder.isDirectory())
                   newLogName=userdir+logFilePath+fileName;
                   //System.out.println("newLogName : "+newLogName);
                   newFile=new File(newLogName);
                   if(newFile.exists())
                        newFile.delete();
                   folderContent= folder.list();
                   if (folderContent != null && folderContent.length>0)
                        System.out.println("folder has files : "+folderContent.length);                    
                        for(int iterate=0;iterate < folderContent.length;iterate++){                         
                             if (folderContent[iterate].toLowerCase().contains("system"))
                                  count++;                              
                                  tempFileName=foldName+"/"+folderContent[iterate];     
                                  try
                                       FileOutputStream appendedFile=null;
                                       BufferedReader buffRead = new BufferedReader(new FileReader(tempFileName));
                                       appendedFile = new FileOutputStream(newLogName, true);//true-for append mode
                                        DataOutputStream dout=new DataOutputStream(appendedFile);
                                        String line = null;
                                       System.out.println("writting : "+tempFileName);
                                       while ((line=buffRead.readLine()) != null) {                                        
                                            dout.writeBytes(line+"\n");
                                       buffRead.close();          
                                       //System.out.println("done");
                                  catch(Exception e)
                                       System.out.println("Exception@folderCheck : "+e);
                        if(count==0)
                             feedBackMsg="syslognotavail";
                             //System.out.println("System Log(s) not available");
                        else
                             feedBackMsg="syslogavail";
                             //System.out.println(count +" System log(s) avail");
                   else
                        feedBackMsg="filesnotavail";
                        //System.out.println("Files are not in the folder");
              else
                   feedBackMsg="Dirnotavil";
                   //System.out.println("Directory not exists in the given name");
              return feedBackMsg;
        public ArrayList<String> loadFileContent(String selectedStr)
             //System.out.println("inside loadFileContent()");
             String logFilePath="";
             String propFileName="";
             String line="";
             String choice="";
             String tempStr="";
             int startPos=0;
             int endPos=0;
             ArrayList<String> timeList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));
                  if(selectedStr.equalsIgnoreCase("Device Discovery"))
                       choice="DD";
                  else if(selectedStr.equalsIgnoreCase("Network Discovery"))
                       choice="ND";
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(choice))
                             System.out.println(line);
                             startPos=line.indexOf("_");
                             endPos=line.indexOf(" =");
                             tempStr=line.substring(startPos+1, endPos);
                             System.out.println("tempStr : "+tempStr);
                             timeList.add(tempStr);
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return timeList;
        public String getFileName(String timeStr)
             System.out.println("inside getFileName");
             String logFilePath="";
             String propFileName="";
             String line="";
             String tempStr="";
             int startPos=0;
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;              
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));              
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(timeStr))
                             System.out.println(line);
                             startPos=line.indexOf(" = ");                         
                             tempStr=line.substring(startPos+3, line.length());
                             System.out.println("tempStr : "+tempStr);                         
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return tempStr;
        public ArrayList loadFile()
             String logFilePath="";
             String moduleFileName="";
             String line="";         
             ArrayList<String> moduleList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                  moduleFileName=userdir+logFilePath+moduleFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(moduleFileName));              
                  while ((line=buffRead.readLine()) != null) {     
                       moduleList.add(line);                    
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFile : "+e);
             return moduleList;
    public static void main(String[] args) {          
         System.out.println("Inside main");     
         //String userdir = System.getProperty("user.dir");
         //System.out.println("userdir : "+userdir);
         /*ArrayList<String> fileNameList=new ArrayList<String>();
         String Choice="";     
         String logFileName="";     
         String logFilePath="";     
         String totalLog="";     
         String newLog="";     
         String folderName="";
         Choice=ResourceBundle.getBundle("catconfig").getString("Choice");
         logFileName=ResourceBundle.getBundle("catconfig").getString("logFileName");     
         logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
         folderName=ResourceBundle.getBundle("catconfig").getString("folderName");
         totalLog=ResourceBundle.getBundle("catconfig").getString("fileName");     */
         /*try
              //to write the total log
              //folderCheck(folderName);
              //to find the details in the given log
              //findDetails();
              //to split the logs accordingly
              totalLog=logFilePath+totalLog;          
              fileNameList=getFileNames();;
              System.out.println("FileNameList size = "+fileNameList.size());
              for(int i=0;i<fileNameList.size();i++)
                   newLog=fileNameList.get(i).toString();
                   writeFile(totalLog,newLog);
              //to analyse the logs & to produce reports          
              //getValuesFromFilesOnly(Choice,logFileName);          
         }catch (Exception e)
              System.out.println(e.getMessage());
    }[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    JSP is used for server validation.
    So you need a an application server (like Tomcat or Jboss) to execute your jsp files.
    you can create the .war file of your simple jsp application and put it in the server.
    then you will have to access your page using a web browser.
    the URL will be
    http://<ComputerName or IP Address>:<PortNumber>/<WarFileName>/<MainJspPage>
    (eg: http://100.100.100.252:8080/SimpleApplication/mainPage.jsp)
    -Achyuth

  • How can I create my own iWeb menu bar?

    Hi!
    I would like to know how can I make a completely different menu than the ones iWeb has for my website?
    Can you explain step by step?
    Regards,

    Here's how I do it :
    http://www.wyodor.net/mfi/roodhout/How_To_Do.html
    http://www.wyodor.net/mfi/Maaskant/How_To.html
    More menus :
    http://www.wyodor.net/mfi/Maaskant/Some_Menus.html
    Menus without the explanation :
    http://www.wyodor.net/_Demo/tmf/Duckmenu.html
    http://www.wyodor.net/_Demo/FloatingMenu/Fixed.html
    http://www.wyodor.net/_Demo/FloatingMenu/DynamicFloat.html
    And lots of menus to explore :
    http://www.cssplay.co.uk/menus/

  • How can you create a playlist with music and music video and play those from same playlist through Apple TV?

    How can you create a playlist on Ipod touch with music and music video,  and play those from same playlist through Apple TV?  I can download, create a playlist with both music and music video, stream that through the Apple TV with no problem.  The sound and the information show up on the TV, but when it gets to a music video, it only shows the information and "artwork".
    I also have a video playlist - videos play fine through the Apple TV, but will not shuffle through all videos - continues to repeat the same one.  I have most definitely selected shuffle in both locations - from the playlist and on the ipod video screen while video is playing.

    I finally got it... had to sync the photos with the music in iMovie, arrange the voiceover in GarageBand then export to iTunes, and then I was able to put it all together in iMovie and burn in iDVD... had a few glitches along the way but finally finished : )
    Message was edited by: jpewald

  • How can i create a adminstator's name and password

    how can i create an adminstrator's password

    You must have an administrator's account on the computer. You provide a password when the account is created. So, perhaps you could explain more what you want.

  • Saved a few images to Dashboard. How can I get them out of there and save them to a file? Thanks

    Saved a few images to Dashboard. How can I get them out of there and saved to a file? Thanks

    I'm sorry, I'm lost & don't even know what to ask.
    Oh wait, open Dashboard in Applications, do the Pics show there?
    http://techland.time.com/2013/01/22/the-slow-but-almost-certain-demise-of-apples -os-x-dashboard/

  • I'm new to the Apple products. How can I view pdf files since Apple and Adobe don't play together?

    I'm new to the Apple products. How can I view pdf files and videos since Apple and Adobe don't play together? Also, what operating system does the iPhone use? I'm a Windows person.

    You may want to download and read the manual for your phone. It may answer a lot of the basic questions.
    http://support.apple.com/manuals/#iphone
    There is an app on your phone called "Mail". Yes, it's for reading your email.
    Best of luck.

  • When pressing the "R" on the keyboard to record the following pop up - "Beta-only warning message-not to be localized Can't create record files please report" and then this "error occurred Result= -48"  What does this mean?

    When pressing the "R" key on the keyboard to record the following pops up - "Beta-only warning message-not to be localized.  Can't create record file, Please Report"  I press O.K. and this pops up - "Error occurred Result= -48".  Can't figure out why.  First time I have every had problems>  What's up with this?

    a -48 error is a duplicate filename.
    the first things i'd try are the oddball problems fixes:
    http://www.bulletsandbones.com/GB/GBFAQ.html#oddballprobs
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • How can I create a new iCloud account and transfer my apps?

    I'm sharing an iCloud and iTunes account and want to have my own. Can I create a new iCloud account and transfer my contact list? If I keep the existing iTunes account with the new iCloud acct, can I reload my apps without purchasing them again? I understand I can create a new iTunes acct afterwards.

    OK, so you can create a separate Apple ID for yourself that you use for your Messages, iCloud, Mail, FaceTime, etc. and keep the one that you have your Apps on as your iTunes "Family" Account.
    Before you set up your new Apple ID, be sure to delete your iCloud account from your device: Settings>iCloud, scroll to the bottom and delete the account. Save your Contacts on your phone so you can merge them with your new iCloud account. Your notes, and Photos will still be on your old iCloud account, but if you want to keep any of your photos on your new iCloud account, it would be a good idea to import all of your photos to your computer first, so you can selectively download them to your device. (Note: only your Photo Stream will go away when you delete your iCloud account. Your Camera Roll will stay in place. It's just a good idea to back up that Camera Roll to a computer or to your new iCloud account immediately once you have set it up.
    You then would set up a brand new Apple ID for you under Manage your Apple ID: Apple - My Apple ID
    Once you get it set up, go into your devices and sign off the following:
    Settings>Messages>Send & Receive, click on your "Family" Apple ID and Sign Out
    Settings>Facetime, click on your Apple ID and sign out
    You will leave your "Familiy" Apple/iTunes ID signed on on the iTunes & App Store, becasuse you willl continue to share your iTunes account with the family. Here is a little more info about using two Apple IDs:
    Using your Apple ID for Apple services
    Once you have your new ID set up, go back into Messages and FaceTime and sign back in with your new ID
    Also, go to Settings>iCloud and sign in with your new ID, and be sure to "Merge" your contacts into your new iCloud account.
    Post back with any questions!
    Cheers,
    GB

Maybe you are looking for

  • [SOLVED]Unable to boot in UEFI mode from CD

    Hello gents! Here's the problem: According to the beginner's guide I followed the instruction to test if I am in UEFI mode: In case you have a UEFI motherboard, the CD/USB will launch UEFI Shell and display a message that startup.nsh script will be l

  • SAP PI 7.3 Upgrade from SAP PI 7.11

    Dear all, Just a small clarification on PI 7.3 upgrade. In the document,  Decision making factors when moving to SAP NetWeaver Process Integration 7.3 - Upgrade or New Installation with Phase-out, it is mentioned that If you plan on taking advantage

  • USB727 Windows 7 x64 Blue Screen of Death BSOD

    Hi, Every time I use my Verizon USB727 on Windows 7 x64, after removing, when I try and suspend (sleep) my laptop I get a BSOD. I have a Lenovo T500. I am running in NDIS mode. This worked great under Vista x32. If I shutdown my laptop before removin

  • "Service Name" and "Routine Name" in tmadmin

    In tmadmin console, there is "Service Name" and "Routine Name". What is the differences between them? Do they have relation with "Server Name"? Thx.

  • I have lost my iphone,how to get

    Respected Sir, Requested to you that my iphone 5 with imei no:013421007288494 has been lost, So how to get my iphone back please do best support us.