Accessing a csv file on a resin web server

Hi guys,
Im trying to access a CSV file on a resin web server using the following:
File csvfile = new File("http://localhost:8080/FYP/"+WebCourse2+".csv");
and it does not work
when I use a local file location as follows, it works fine:
File csvfile = new File("C:\\QMULFOLDER0203\\FYP\\Database\\"+WebCourse2+".csv");
Am i doing something wrong?
Thanks
tzaf

the only prob with that is that i use the methods exists() and isFile() to make sure the csv file is available and is a file
File csvfile = new File("C:\\QMULFOLDER0203\\FYP\\Database\\"+WebCourse2+".csv");
                                                       //File csvfile = new File("http://localhost:8080/FYP/"+WebCourse2+".csv");          
                                                       //out.println("http://localhost:8080/FYP/"+WebCourse2+".csv");
                                                       try
                                                       if (csvfile.exists() && csvfile.isFile())
can I do this with the URL class??
thanks
tzaf

Similar Messages

  • Limiting access to copyright-restricted material on a web server

    Hello Folks,
    I know this is close in topic to some other recent discussions but please indulge me here.
    I have access to a stand-alone web server running OS X 10.5 server. I need to limit access to some copyrighted material on that web server to staff and students of our institution. There is a LDAP database available. The xserve is not currently running Open Directory. On almost any other Apache 2.2.x server, I would probably use a auth-ldap type module but OS X 10.5 doesn't have this.
    I know very little about this topic but it seems my options are to compile a new version of Apache with the required modules or to start Open Directory, connect to the ldap database and create a new group of Auth_Users (30,000 records in the LDAP database)and use Realms.
    Is this correct? If both options are valid, are there good reasons for going for one rather than the other? Any good documentation out there?
    Thank you for your assistance,
    Ross.

    I would probably use a auth-ldap type module but OS X 10.5 doesn't have this.
    No, it has something better.
    Since Mac OS X can plug into a number of directory systems (Active Directory, Open Directory, BSD Files, etc.), Apple included the modauthapple which plugs into that system.
    Therefore whatever authentication system(s) your Mac is set to use will filter down into Apache.
    So step 1 is to join your Mac to the Authentication system (via /Applications/Utilitiy/Directory Utility)
    Step 2 is to enable modauthapple
    Step 3 is to use Server Admin to define your realm and choose the group from the directory.

  • DLL in "\Program Files\...\Web Server Extensions\15\BIN\" folder

    Hi!
    Anyone, please, tell me
    1. Why some assembly are in this folder - "\Program Files\...\Web Server Extensions\15\BIN\"?
    2. What kind of assembly must be there?
    About year ago I have a problem with my custom solution, it can't found one of my dll, although it was in GAC. After I put it in BIN folder, it worked. Now I have a similar problem - I have dll in GAC, but page through error "assembly not found".
    This error repeated through time, I can't understand why...

    Hi
    If your DLL are in bin folder of web application then your solution is sandbox solution and if its in GAC then its Farm solution.
    so if you deployee any custom solution as sandbox then your DLL should be in BIN folder of web application
    Check below link which can help to more understanding about dll deployment
    http://www.learningsharepoint.com/2013/03/24/deploy-sharepoint-2010-solutions-in-sharepoint-2013/
    please let me know if u get your answer then mark me as Answer and Vote

  • Help me Deploy WAR file in SUN iPlanet Web Server 6.1 SP7 using JDK1.6 & JS

    Hi All,
    Can any one help me on this.
    I'm using
    JDK1.6
    JSF1.2
    JSTL1.1
    Hibernate3.2.5
    ANT1.7
    JUnit
    HTML
    Oracle10g
    Trying to deploy this war file in SUN iPlanet Web Server 6.1 SP7. Can I use JDK1.6 & JSF1.2 in web server6.1

    What is the exact version of Web Server you are using? Should be in the error logs or try $start -version
    It would be faster if you can capture and cut and paste the data that is sent between firefox and Web Server in both the cases using /usr/sfw/bin/ssltap (http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html) or ethereal when you try to view that shtml file. We can see if its any different in both cases and try it from there.
    Also verify the steps given in http://docs.sun.com/source/817-1832-10/pgshtml.html
    mime.types should have :
    type=magnus-internal/parsed-html exts=shtml
    obj.conf should have :
    Service fn="shtml_send" type="magnus-internal/parsed-html" method="(GET|HEAD)"
    When you activate parsing, magnus.conf should have :
    Init funcs="shtml_init,shtml_send" shlib="install_dir/bin/https/bin/Shtml.dll" NativeThreads="no" fn="load-modules"
    Shtml.dll (or libShtml.so on UNIX), is located in install_dir/bin/https/bin for Windows, and install_dir/bin/https/lib for UNIX.

  • Deploy WAR file in SUN iPlanet Web Server 6.1 SP7 using JDK1.6 & JSF1.2

    Hi All,
    Can any one help me on this.
    I'm using
    JDK1.6
    JSF1.2
    JSTL1.1
    Hibernate3.2.5
    ANT1.7
    JUnit
    HTML
    Oracle10g
    Trying to deploy this war file in SUN iPlanet Web Server 6.1 SP7. Can I use JDK1.6 & JSF1.2 in web server6.1

    What is the exact version of Web Server you are using? Should be in the error logs or try $start -version
    It would be faster if you can capture and cut and paste the data that is sent between firefox and Web Server in both the cases using /usr/sfw/bin/ssltap (http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html) or ethereal when you try to view that shtml file. We can see if its any different in both cases and try it from there.
    Also verify the steps given in http://docs.sun.com/source/817-1832-10/pgshtml.html
    mime.types should have :
    type=magnus-internal/parsed-html exts=shtml
    obj.conf should have :
    Service fn="shtml_send" type="magnus-internal/parsed-html" method="(GET|HEAD)"
    When you activate parsing, magnus.conf should have :
    Init funcs="shtml_init,shtml_send" shlib="install_dir/bin/https/bin/Shtml.dll" NativeThreads="no" fn="load-modules"
    Shtml.dll (or libShtml.so on UNIX), is located in install_dir/bin/https/bin for Windows, and install_dir/bin/https/lib for UNIX.

  • Deploy .war or .ear file to sun java web server 7.0 update 4

    Hi
    This could be a very daft question, but still I would like to get a clarification.
    My clients are a financial organisation, and for security and various other reasons they accept only .ear files. But this time the development and deployment would be done on Sun Java Web Server 7.0 update 4 . Now since its a web server I don't think I can deploy an .ear file.
    But sure I would like to get an answer from the experts here, is it possible to deploy and .ear file to Sun Java Web Server 7.0 before I can go back to my clients.
    Please help me here as I'm in a real big confusion here. Your help would be highly valuable to me.
    Thanks
    Jagdish

    Hi
    Thanks for the reply and I appreciate your help. Well I tried deploying an .ear file directly and web server 7 complains that it doesn't have a .war extension, understandably so.
    And then ripping apart the .ear file and deploying the .war file does work, as is expected of a web server.
    Well, about my customer is a bank and they have a very tight security policy, and why they need an .ear file is beyond my understanding. Well as far as this issue is concerned, I need a strong point so that I can get back to them that we need to comply to the third party software.
    But I didn't wan't to get back to them saying we can only provide a .war file and then later find out an .ear file could have done the job. And being seen as the technical experts we can't afford to make any mistake.
    Thanks
    Jagdish

  • Reading a csv file stored on a resin web server

    String line = null;
                                                           URL url2 = new URL ("http://localhost:8080/FYP/"+WebCourse2+".csv");
                                                           URLConnection conn2 = url2.openConnection();
                                                           BufferedReader in = new BufferedReader(new InputStreamReader(conn2.getInputStream()));
                                                           out.println("conn2: "+conn2.getResponseCode());
                                                           while((line=in.readLine())!=null)
    im using the following code to try and find out whether the csv file is available on the web server but getting the following errors:
    C:\resin-2.0.5\doc\WEB-INF\classes\FYP\exam3.java:294: Class FYP.URL not
    found.
                                                           URL url2 = new URL ("http://localhost:8080/FYP/"+WebCourse2+".csv");
                                                           ^
    C:\resin-2.0.5\doc\WEB-INF\classes\FYP\exam3.java:294: Class FYP.URL not
    found.
                                                           URL url2 = new URL ("http://localhost:8080/FYP/"+WebCourse2+".csv");
                                                           ^
    C:\resin-2.0.5\doc\WEB-INF\classes\FYP\exam3.java:295: Class FYP.URLConnection
    not found.
                                                           URLConnection conn2 = url2.openConnection();
                                                           ^
    3 errors
    can anyone help?
    thanks
    tzaf

    now its telling me that:
    C:\resin-2.0.5\doc\WEB-INF\classes\FYP\exam3.java:300: Method getResponseCode()
    not found in class java.net.URLConnection.
                                                           out.println("conn2: "+conn2.getResponseCode());
    can you help?
    thanks
    tzaf

  • How do i save and access a csv file on my ipad when filling in a smartform. Currently only option goes to photos

    Trying to save a csv file on my ipad so I can auto populate into a SmartForm. It will only allow me to access photos when I hit the import button

    search the app store for PDF Writer. I've found a lot that will convert documents to PDF, but none yet that will write within the PDF. One thing you want to avoid are cloud based apps. Any of them that talk about editing on the cloud, etc, aren't going to be as standalone as you want.
    It's possible, if you can take your template PDF, turn it into a word document that you can edit, you can then convert that to PDF...kinda a workaround way to do what you want. And apps that convert to PDF are much easier to find

  • Configure ODBC to access a CSV file on Linux for access from BI Server

    How to configure an ODBC connection to a CSV file on Linux for access from the BI Server Repository physical layer
    I am migrating a working windows OBIEE installation to Linux and can not seem to connect to csv files on Linux (from th BI server also running on the same Linux machine).
    I am using SUse Linux Enterprise server / 10 (Slash 10) standard odbc drivers
    My odbc ini file entries are:
    [ODBC]
    Trace=0
    TraceFile=odbctrace.out
    TraceDll=/app/oracle/product/10.1.3/OracleBI/odbc/lib/odbctrac.so
    InstallDir=/app/oracle/product/10.1.3/OracleBI/odbc
    UseCursorLib=0
    IANAAppCodePage=4
    [ODBC Data Sources]
    AnalyticsWeb=Oracle BI Server
    Cluster=Oracle BI Server
    SSL_Sample=Oracle BI Server
    idcbicsvfiles=Odbc Text driver
    [idcbicsvfiles]
    Description = Odbc Text driver
    Driver = Odbc Text driver
    Directory = /data/oracle/OracleBIData/idc
    #ReadOnly = No
    #CaseSensitive = No
    #Catalog = No
    ColumnSeperator = ,
    #Trace = 1
    #Tracefile =/data/oracle/OracleBIData/odbctrace.txt
    #Username      = oracle
    #Password      = ''
    [AnalyticsWeb]
    Driver=/app/oracle/product/10.1.3/OracleBI/server/Bin/libnqsodbc.so
    Description=Oracle BI Server
    ServerMachine=local
    Repository=
    Catalog=
    UID=
    PWD=
    Port=9703
    The csv files I want to use are in the directory /data/oracle/OracleBIData/idc to which I have set up a working and checked connection ([idcbicsvfiles]) on the linux machine itself.
    The error message I get when I select view data in the physcial layer is:
    [NQODBC][SQL_STATE: HY000][nQSError: 10058] A general error has occurred.
    [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement.
    [nQSError: 16023] The ODBC function has returned ans error. The database may not be available, or the network may be down.
    Please can anybody give me a clue on how to get this working e.g. a working odbc.ini file from your own installation (and/or a tip for the odbc driver choice/configuration)
    P.S. I know this is not supported by Oracle but can not imagine, that nobody is using this.

    Hi,
    Chekc this...Re: Is there ODBC driver for excel flat file in Unix Box
    Re: OBIEE to use a CSV file as a data source on Linux
    Regards,
    Srikanth
    Edited by: Srikanth Mandadi on Oct 8, 2010 2:50 AM

  • Error 43 when accessing LabVIEW 2009 write/read file functions through the web server functionality

    Is there any way around to avoid Error 43, "Operation cancelled by user" when using Web server?
    I am using the example VI:s RemotePanelMethods-Server.vi and RemotePanelMethods-Client.vi to acces the MainGUI.vi from my workstation to a lab computer. * LabVIEW 2009 is installed in both machines.
    * MainGUI.vi is wired to the VI access list in the Server VI but it also contains a hierarchy below that isn't, is this a problem?
    * Several functions in MainGUI calls file read and write operations
    The problem ocurrs when file read/write operations with no preselected path are selected through the Client. The traditional popup window requesting the file to read or write is never seen in the Client, but only the Error 43.
    Thanks in advance

    See this

  • Accessing a .csv file in vi while the data is written by 3rd party java applicaito​n

    Hi
    I have a requirement like below explained.
    A java applicaiton reads data from hardware and writes in a .csv file. This java applicaiton is triggered by a button click in Labview VI.
        --> cmd window   -- cmd /C java Client n
    the data will be read from hardware and written to the file per every second.
    In the labview vi, we are reading the .csv file simultaneously and plotting the graph. 
    The above operations need to happen simultaneously. 
    When we tried this, we are geeting the "File Not Found Excpetion(the file is used by other process) in java application.
    Can anyone help me why this might be happening in Labview. I tried this with a "c" applicaiton instead of Labview and it is working fine.
    Problem observed only with labivew.
    Regards
    Kris

    Naah, I said, that will never work.  But to my shock and (pleasant) surprise, it does!  Here is a snippet of a little routine I cobbled together using LabVIEW for both the Writer and the Reader.
    The Writer is on top.  It creates a Temp.txt file on my Temp directory, deletes it if it is already there, then opens it for writing.  There's a boolean "Done" flag that tells me when the Writer finishes, so I clear it before entering the Writing Loop.  Here, every half-second, I write the sequential numbers 0 .. 9, with a New Line to create a Text File of Lines.  When I'm finished, I close the file.
    Below this is the Reader Loop, designed to start after the Writer Loop has opened (and created) the file.  Here we open the same file in Read-Only mode.  The Reader Loop also goes 10 times (I could have built in a Stop condition, but this is only a Proof-of-Concept).  The loop is initialized with the current File Position (0) in a Shift Register.  The inner While Loop is a "Wait for Data to Appear", a loop which checks 10 times a second to see if the File Position has changed, exiting when it does (meaning the Writer has Written Something).  It then reads a line from the File (the Read Text function has its "Read Lines" property set) and displays it.
    When you run this, you will see the Reader's output, Line, count up, 0 .. 9, and then the program stops with no errors.  What fun!
    Bob Schor

  • How to preview graphic files on a home web server setup?

    I apologize if this question is not asked in the most technical way, but here goes:
    I'm read online on how to create a home web server or ftp server on a Mac computer. (I plan to do this with my G5, running OSX 10.6.4)
    I would like to have a library of folders containing all of my graphic files that I've collected over the years in order to have access to them (if needed) when i'm working remotely.
    I want to be able to easily view all of these graphic files like I can with Adobe Bridge (eps, psd, ai, gif, jpg, png, etc).
    Is there software I can use that will allow me to view a gallery thumbnails of all of these file types when I am away from home and logging into the ftp server or web server?
    I know software such as Transmission FTP will allow me to look at one image at a time, but I'd like to view an entire gallery of thumbnails at once for quick reference.
    Thanks in advance.

    Hi johnny-griswold;
    The G5 was called a PowerMac and used a PowerPC processor.
    The MacPro is an Intel based Mac and is capable of running 10.6.4.
    You might what to drop your references to G5 because they are only confusing things.
    Allan

  • UCCX Reading XML file hosted on IIS web server

    hi guys,
    i have a customer on CCX 8.5 environment and they have a .NET application running on an IIS web server. As part of this .NET application, the app produce an XML file.
    My questions is
    "Can CCX read XML file that is hosted externally on IIS web server rather than parsing the XML file on CCX document repository?"
    All of the examples of XML parsing points to the XML file in document repository.
    Any pointers to links and documentation/example on how to do this would be greatly appreciated.
    If this is not achievable, if you could kindly suggest a different way of doing it too would be greatly appreciated.
    Thanks in advance,
    Daniel

    Hi,
    to be quite honest with you, I don't know anything about Sharepoint - so I am afraid I cannot help you with its XML editing capabilities. XML is just a well formed text file that follows some logical rules, so no additional application is required for editing, in fact, I always encourage everybody to use Notepad/Textpad/ to read and edit XML files. Of course, if it's not possible, you will find a great number of various user friendly XML editing applications.
    A UCCX script will normally access an XML using the Create URL Document step and then, using the Get XML Document data step with the help of an XPath expression, will filter out the necessary information from the XML document.
    The protocols used are standard and well known, including HTTP and XPath (and XML itself). So it does not really matter what kind of HTTP server serves the XML file, IIS is just an option.
    Examples may be found in the Scripting guides for your particular UCCX version.
    HTH
    G.

  • Can't access folder on a TC drive via web server

    Here's the setup:
    I got a MBA (10.6) as a simple web server sharing files to a remote computer via VPN. For this, I created a symbolic link to the folders I want to share and dropped it into the root user's library/webserver/documents.
    The remote client accesses the folders via web browser with the internal IP (192.168.xxx.xxx/"folder") of the host (I know, there are fancier ways to do this, but that's how I've been doing it so far).
    Now, I wanted to relocate some of the folders to my TC drive. I did so, however I got an error message saying 'Forbidden, You don't have permission to access xxx on this server'. I tried to change the access permissions of the folders in question on the TC, but no avail.
    I couldn't reach them from the local net either.
    Anyone here, who knows how to solve this problem? Put it another way, is it even possible to access the TC that way?
    Any help is appreciated.
    Thanks!

    Thanks for the answer, but it was not the solution I have been looking for.
    I found a provisional workaround installing MAMP. Dropping the symlink folder in htdocs did the job. However, I'd be glad, if someone out there knew how to do this on the native OS X Apache, since running an additional server is pretty bothersome.

  • Unable to open .shtml file in Sun java web server 6.1

    Hi,
    I migrated my application from iPlanet 6.0 to Sun one web server 6.1 and after that I'm unable to open any .shtml file from my browser. This issue is not with all browser but only with few.
    Ex : It works fine with firefox 1.x but fails with firefox 2.x
    I tried adding the shtml_send Init parameters in Magnus.conf and edited the obj.conf, and my mime type has the following entry for shtml:
    type=magnus-internal/parsed-html exts=shtml,jbhtml
    Any help is appreciated
    Thanks
    SS

    What is the exact version of Web Server you are using? Should be in the error logs or try $start -version
    It would be faster if you can capture and cut and paste the data that is sent between firefox and Web Server in both the cases using /usr/sfw/bin/ssltap (http://www.mozilla.org/projects/security/pki/nss/tools/ssltap.html) or ethereal when you try to view that shtml file. We can see if its any different in both cases and try it from there.
    Also verify the steps given in http://docs.sun.com/source/817-1832-10/pgshtml.html
    mime.types should have :
    type=magnus-internal/parsed-html exts=shtml
    obj.conf should have :
    Service fn="shtml_send" type="magnus-internal/parsed-html" method="(GET|HEAD)"
    When you activate parsing, magnus.conf should have :
    Init funcs="shtml_init,shtml_send" shlib="install_dir/bin/https/bin/Shtml.dll" NativeThreads="no" fn="load-modules"
    Shtml.dll (or libShtml.so on UNIX), is located in install_dir/bin/https/bin for Windows, and install_dir/bin/https/lib for UNIX.

Maybe you are looking for

  • My itouch doesn't want to turn on..HELP!!!

    Well, just today i was online and hen i turened my ipod off. When I tried to turn it on again, it didn't want to. I tried the on/off button several times but it didn't respond! What should I do????

  • Async proxy to soap messages to be processed like EOIO

    Hi, I have a proxy to soap interface. What I want is to route these message these message through one queue in IE level so that, these would be sent to the receiver in order. Also doing this confirm that at the AE level, they would be delivered in or

  • Which Linux is the best for a X60 and T60/61?

    @Ajkula66, which version or flavour of Linux do you think is the best for a X60 and T60/61? Regards, Jin Li May this year, be the year of 'DO'! I am a volunteer, and not a paid staff of Lenovo or Microsoft Solved! Go to Solution.

  • DESCRIBING A REF CURSOR

    For debugging purposes, I would like to be able to describe a REF CURSOR returned by a function in a package, using pl/sql. Can you help me ?

  • SQL Database

    Hello, Does anyone know the name of the SQL table where the user name and DN are stored? I have a developer wanting to create a read only app for screen pops Thanks in advance! All replies will be rated