How to access extern files from a servlet

Greetings,
I am using the 90-days-trial Version of SAP Web AS 6.40 and the SAP NetWeaver Developer Studio.
I have created a HTTP Servlet that reveives a XML-file. Now I want to parse and validate this file. The class that I have created to validate this file works fine and also the communication with the servlet does not make any problems.
The problem I have is that I have to use three .xsd files to validate the xml-content. When I use the absolute path to define the location of these three files (on my hard disk), everything works fine. But I did not yet find the right location where to place the xsd files to make them accessible using a relative path.
I already tried to place the files in deifferent locations, and I also created a .jar containing these xsd files, I deployed it and created a reference in the .ear, but this does not work neither.
I would be very grateful if you could give me a hint where to place these files.
Thank you very much in advance.
Bye,
    Nadine

Hi Nadine,
assuming that your validation class is located in package "de.nadine.validation", then the source (and class) directory structure has to look like this:
de
|-nadine
..|-validation
....|-Validation.java
....|-schema.xsd
If you then use
URL schemaURL = de.nadine.validation.Validation.class.getResource("schema.xsd");
this will work, definitely.
Hope that helps.
Regards
Stefan

Similar Messages

  • How to call external files from java?

    How to call external files in java. For example how to call a *.pdf file to open in its default editor(say Acrobat), or a *.html file to open in the default browser or a *.txt file in a notepad etc..,
    In my program i have *.chm (Compiled Windows HTML Help) help file. how to open it in its default editor it?

    Jayarathina_Madharasan wrote:
    no one answered my questionHi what wrong did i do...basically insulted all the volunteers here who took the time to consider your question and try to offer you help. Other than that, you did nothing wrong.
    From JavaRanch :
    And even if an answer doesn't solve your problem, even if it should totally miss the point - the best thing to do to motivate others to continue trying to help you is showing respect and gratitude for the investment of time that was put into dealing with your issue.
    Edited by: Encephalopathic on Apr 14, 2008 10:01 AM

  • How to access PC files from iPad

    How can I access PC files from my iPad?

    Depends on what kind of files. You have to have an app on your ipad that can open those files and share them.
    You can download the icloud control panel and use that on your pc.
    http://www.apple.com/icloud/setup/
    itunes also supports file sharing:
    To transfer files from your computer to your iPod touch, iPhone, or iPad:
    Connect your iPod touch, iPhone, or iPad to your computer.
    In iTunes, select your device (below Devices), and click the Apps button.
    Below File Sharing, select an app from the list, and click Add.
    In the window that appears, select a file to transfer, and click Choose.
    The file is transferred to your device, and can be opened in the app you selected in step 3.

  • How to access my files from damaged boot drive?

    Hello Guys ,
    I need your help to get the files from my Macbook , The OS cant start and I need a way to boot from some external to copy my files.
    I have old time machine back up from last april , but it cant restore because the drive is full.
    is there a way to access my file on the drive ?
    thank you

    Connect it to another Mac and put it in FireWire Target Disk mode(press T at startup) if possible, or use a different Mac to install a compatible OS onto another drive, ensuring the drive has enough free space for them, connect it to that Mac, and restart it with the Option key held down.
    (88210)

  • How to access Excel files from different locations?

    Hello,
    I have successfully tested the Excel sample on WLS 7, and trying to run it on
    the WLS 8.1.
    Anyways, the common question for both is, how to access an excel files from different
    locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
    \\domain2\accounts\vouchers.xls)?
    From example i can see that it picks from a specific path under repository.
    Thanks
    Ashok Gupta

    The custom function sets the MS-Excel default directory to System.getProperty("user.dir")+"/excel"
    (the domain directory), then opens the filename passed as a parameter. I assume
    that if you pass in the fully specified path for the excel file ( like d:\MyDir\data\test.xls),
    that it would open that file.
    - Mike
    "Ashok Gupta" <[email protected]> wrote:
    >
    Hello,
    I have successfully tested the Excel sample on WLS 7, and trying to run
    it on
    the WLS 8.1.
    Anyways, the common question for both is, how to access an excel files
    from different
    locations (e.g. c:\path\1.xls, \\domain1\finance\fin.xls, \\domain1\marketing\customer.xls,
    \\domain2\accounts\vouchers.xls)?
    From example i can see that it picks from a specific path under repository.
    Thanks
    Ashok Gupta

  • How to access physical files from java platform

    Hello All,
    We have one JDE Word Writer program, which export the order master data in the DB2/400 Physical files.
    We want to access this data from our java program (reside on windows platform). I am wondering how we can do that. I got one hint that can be accessed by ODBC connection. But I am unable to get the correct ODBC driver. I am looking for correct driver to access the data.
    If some one has done this already, please help me. Or suggest me any alternate way.
    Dinesh

    Can use File class to write code to examine and manipulate file.
    Tutorial: http://java.sun.com/docs/books/tutorial/essential/io/file.html

  • How to access the files from HTML region

    Hi,
    Which command or query should we use , if I want to access any file like i have a excel file stored in shared components/static files .

    See this example:
    http://apex.oracle.com/pls/otn/f?p=31517:15
    it explains how.
    Also, read this:
    http://www.oracle.com/technology/products/database/application_express/html/3.1_new_features.html#02
    Declarative BLOB Support
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to access my files from my desktop

    I am not very smart on accessing files online. I want to access all of my files from my Compaq Presario over the internet, since I dont have much hard drive space left, is it possible for me to access all of my PC files over the internet? but I dont want to store them online, but access them from the internet to my PC. I am a business user, and I need a solution.

    Another solution could be some kind of remote control program (perhaps an appropriate version of Timbuktu).
    This web page could possibly provide you with some other ideas.
    As a business user (and as a home user), you should pay attention to the security aspects involved whenever accessing files over the Internet. Extra tunnelling and/or encryption may be required.
    Jan

  • How to access restricted files from hard drive that won't boot

    My Macbook Pro (10.9.3) wouldn't boot up.  I'd get the gray spinning progress indicator along with a gray progress bar which would get about 10% through and then restart.
    I booted into recovery mode and run Disk Utility to repair the disk and got a message saying can't repair, back up your files.
    So I took the HDD out and mounted it as an external drive on my Mac Mini (10.9.3).  I got a message saying it's read only and I should back up my files.  I can browse to my users directory and see all the base folders (Movies, Music, Docs, etc), but there's a red no entry icon on all the folders and accessing them through Finder shows they are empty.
    I browsed the files through Terminal as super user and can see the files.  I can also copy the files through Terminal.  However, after copying a test directory some of the files are read only and others are still no access.
    So the question is, how do I back up these files and maintain permissions?
    Thanks!
    PSA: Go do a backup.  Don't feel my pain.

    In the Finder, drag the folders to another drive. You'll be asked for an administrator password.
    (108686)

  • How to access external jars from ejb jars

    All,
    This is my first visit/post to this group. What I'd like to know is how
    an external jar file with common, shared classes can be access by a
    session bean in an ejbc'd jar. I'm running WLS 6.1 and have some DAO
    and other classes in a common.jar that I'd like all my ejbc'd jars to
    have access to. Any help would be appreciated!
    -Keith

    Keith,
    "Keith" <[email protected]> wrote in message news:[email protected]..
    This is my first visit/post to this group. What I'd like to know is how
    an external jar file with common, shared classes can be access by a
    session bean in an ejbc'd jar. I'm running WLS 6.1 and have some DAO
    and other classes in a common.jar that I'd like all my ejbc'd jars to
    have access to. Any help would be appreciated!I'd recommend packaging your application as an EAR - than your
    ejbjars will have access to utility jars.
    Regards,
    Slava Imeshev

  • How to access external IPs from inside

    Hello,
    We have several servers that we NAT to internal IPs on the inside interface. Normally we just setup DNS on the inside to point to the private IPs.
    But I have always been curious, how do you configure the ASA so a host on the inside can talk to a public IP address behind that same ASA?

    AAArrrrgggghhh!!! I misread the original post.
    But for Karthik's suggestion to work, DNS requests would need to pass through the ASA to a DNS server in either a DMZ or out on the internet.  If DNS requests do not pass through the ASA then you will need to NAT the public IP to the private IP on the inside interface in a hairpinning manner.
    Keep in mind that when using DNS doctoring you would need to have an ACL permitting traffic from the internal IP to the private IP of the server if traffic is being denied to the private IP.
    For NATing the public IP to the private IP on the inside interface you could do something like the following:
    object network SERVER
      host 10.0.0.100 (keeping with Karthik's example ;-)  )
    object network LAN
      subnet 192.168.100.0 255.255.255.0
    object network SERVER-PUB-IP
      host 1.1.1.1
    same-security-traffic permit intra-interface
    nat (inside,inside) source static LAN LAN destination static SERVER SERVER-PUB-IP
    Please remember to select a correct answer and rate helpful posts

  • How to access external drive attacked to AirPort Extreme from ipad

    Have attached external drive to AirPort Extreme via USB, how can I access those files from iPad / iPhone?

    Check to see if the File Browser App can do this:
    App Store - FileBrowser - Access files on remote computers

  • The circuit of my macbook is dead yet the hard drive is fine.  I need to access a file from the hard drive, how can i do this? is there a cable i can connect to another mac that will let me transfer the file?

    The circuit of my macbook is dead yet the hard drive is fine.  I need to access a file from the hard drive, how can i do this? The mac turns on the screen freezes as bright blue.  Is there a cable i can connect to another mac that will let me transfer the file?

    There is another option if the Macbook will start up in Target Disk Mode.
    Restart the computer while holding down the T key. If you see the firewire symbol moving around on the screen you can connect this one to another one in TDM. You will need a suitable cable to connect the two Macs.
    http://support.apple.com/kb/ht1661
    Firewire symbol:

  • How to send a file from FTP to external server

    My requirement is to send a file from FTP to D3(External) server.
    Now I am able to store the file in Appln server.
    I want to send the file created by the program thru FTP to D3 server.
    I know the username,Password,HostID,RFC destination details.
    How to send the file from FTP to D3.
    If u have any program,Plz send it...
    I dont want the function modules name...I want the example code ....
    Thanks in advance.

    Hi Sumi,
    You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
    To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
    What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
    Here's a sample of ftp-script for windows:
    echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
    echo USERNAME>> c:zftp_transfer.ftp
    echo PASSWORD>> c:zftp_transfer.ftp
    echo put YOUR_FILE>> c:zftp_transfer.ftp
    echo quit>> c:zftp_transfer.ftp
    ftp -s:c:zftp_transfer.ftp
    also take a look here for more details:
    http://support.microsoft.com/?kbid=96269
    Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
    Regards,
    Ville

  • How can i copy files from one external hard disk to another using macbook pro with retina display

    How can i copy files from one external hard drive to another using macbook pro with retina display?

    That's odd - if you open Disk Utility (Applications->Utilities) and select the disk(s), how are they formatted? If you're only going to be used with your Mac, they should be formatted as "Mac OS Extended (Journaled)".
    Clinton

Maybe you are looking for

  • Pro Applications Update 2010-02 installed, but not installed.

    I downloaded and installed the latest software update and it said it was successfully installed, but when I look at the applications, they are not updated (e.g. Compressor is version 3.5.2 when it should be 3.5.3). I have opened the applications just

  • How to reinstall my recently lost copy of Premier Elements 10

    I use PSE 10 primarily for family slide shows.  I am beginning to learn PRE 10 for movies but currently use to complete the slide show DVD's.  My PC had come down with multiple issues. I put temporary copies of PSE10  and PRE 10 and content to my wif

  • Opinions, Mac pro 12 core or 6 core for video editing?

    Hello everyone, I know that this a most likely a rhetorical question but i currently have a mac pro 12 core 2.4ghz 12 gigs of ram (plan on upgrading to 32 gigs) and a 6 core 3.33ghz 12 gigs of ram. I do a lot of video editing (starting to use Final c

  • EPMA Deploy - Additions and Delete for same member on Compare

    We migrated our Account dimension from another environment, but it didn't have some members we had in the source environment, so on the Compare from EPMA, it was showing some members were going to be Deleted. So we imported back our original Account

  • Unable to start replicat due to invalid username/password

    below is my parameter: REPLICAT MSREP SOURCEDEFS /u01/app/oracle/gg/dirdef/emp.def USERID gg_user, PASSWORD welcome1 MAP hrschema.emp, TARGET gg_user.emp; when I start the replicat, I got an error invalid username/password. If I log into SQLPLUS with