Using getResource() to load file from a war

Hi:
          I am using the method getResource() of ServletContext to load "web.xml"
          file from a webapp.
          It works fine when my web application is not packed into a war file. But
          when I pack it in a war file, I got MalformedURLException.
          Does anyone know the reason?
          Fun
          

Thanks Mahendra, I checked my weblogic.properties, and it looks fine.
          fun
          Mahendra Dhamdhere wrote:
          > Is your deployed application name in weblogic.properties same as your
          > previously deployed web application name?
          >
          > Fun <[email protected]> wrote in message
          > news:[email protected]..
          > > Hi:
          > >
          > > I am using the method getResource() of ServletContext to load "web.xml"
          > > file from a webapp.
          > >
          > > It works fine when my web application is not packed into a war file. But
          > > when I pack it in a war file, I got MalformedURLException.
          > >
          > > Does anyone know the reason?
          > >
          > > Fun
          > >
          

Similar Messages

  • How to use  _root to load file from HDD

    I have main moviclip.Inside this movieclip I have 2 layers.
    On the 1st keyframe of layer1 I have _root to moviclip to load
    [ _root.section != "a.swf"; {
    _root.section = "a.swf";
    _root.transition.gotoAndPlay("closing"); ]
    thing is this is not leading me to the a.swf. I need to know
    the road to that a.swf.
    P.S. If I have the 2 layers on scene1 the path, shown above,
    works

    nowhere in that tutorial do i see that mangled script.. first
    of all, brackets are array access operators, and do not belong
    anywhere in what you gave, which means syntax error. second, you
    don't have an ending curly bracket, which means syntax error..
    third, your opening curly bracket is doing nothing because you
    haven't defined anything in an if statement, another syntax error.
    fourth, there is nothing in the code you provide that loads
    anything. This is probably what it should be
    if(_root.section != "a.swf") {
    _root.section = "a.swf";
    _root.transition.gotoAndPlay("closing");
    which is saying... if, on the root timeline the variable
    section doesn't equal a.swf, then on the root timeline, the
    variable section equals a.swf, also on the main timeline, the movie
    clip with instance name transitions needs to goto and play frame
    labeled closing.
    "I repeat...it's not a sintax error.....this is code for
    loading external movie wich has connection to preloader code and so
    on.."
    you are wrong, there is nothing right about this script, this
    doesn't load anything.

  • How to open a file from a .war achive

              i can't open a file from a .war achive.
              i can open it before I packaged it to a .war.
              i must package it to a .war,how to do it.please help me!!!!!
              

    You can place your file in /WEB-INF and use
              ServletContext.getResourceAsStream("WEB-INF/...") to read it, or,
              if it is in the classpath (classes ir lib), you can use
              Class.getResourceAsStream().
              kai.yang <[email protected]> wrote:
              > i can't open a file from a .war achive.
              > i can open it before I packaged it to a .war.
              > i must package it to a .war,how to do it.please help me!!!!!
              Dimitri
              

  • I changed my password to use migration to transfer files from a G4 to a new macbook pro but now I have to sign in every time. How do I avoid the sign in?

    I changed my password to use migration to transfer files from a G4 to a new macbook pro but now I have to sign in every time. How do I avoid the sign in?

    I clicked on keychain access but getting a warning that it quit unexpectedly and it won't reopen.

  • How can I use JAVA to copya file from a location to another location?

    Hello all,
    I am planning to design a web page (let say an HTML has a form that post fields to a jsp page) that allow me to select a file and then copy it to another location like what we see in email attachement.
    Is the any related java class that i can use for this matter or ready JavaBean?
    Thanks in advance
    Yahya

    jspSmartUpload
    look for package named com.jspsmart.upload.
    Very easy to use to pull a file from a person's pc up to where the form is posted to. You will need to setup your form to type to be multi-part form. Use an input type of file to generate the file browse button.

  • Program/T-Code to load files from local system to XI system's tmp folder

    Dear all,
    Do we have any program or transaction to load files from our local system to the usr/tmp folder of XI system.
    Please share the info, if anyone has already faced the similar requirement.
    regards,
    Younus

    1) goto SXDA_TOOLS Transaction code
    2) Provide the Following details
    Object Type : DXPROJECT
    Program Type: BAPI
    Program/Method: CREATE
    3) Click on Copy Button
    4) Select the Source as Presentation Server
    a) Select the File where you saved in your Local machine
    5) Select the Target as Application server
    a) Check the check box Remote Server
    b) Select the File type as Physical
    c) In File name give /usr/sap/SSD/DVEBMGS00/work\Your file name (This the Server path
    Where the file is going to save)
    6) Click on Continue
    Go to AL11 and check whether the File has been create in the following path /usr/sap/SSD/DVEBMGS00/work
    Provide this path in the Communication channel path when you select the Transport Protocol as NFS and you place the file in AL11 directory.

  • HT203106 Can I use AirDrop to send files from iPhone 5 to my iPad Air 2?

    Can I use AirDrop to send files from iPhone 5 to my iPad Air 2?

    Yes.
    Use AirDrop to wirelessly share content - Apple Support

  • Using srw to load graphics from file in different path

    Hi all,
    I work with report 6i and I want to build a report with dynamic graphics. I stored the file name and directory in field of my data base.
    I want to know if it is possible to load graphics in report with package srw. If it is possible, can you tell me how can I proceed?
    best regard.

    Not sure if this option is available in reports 6i, but in reports help contents search for:
    'read from file'
    In data model get the database field having image path. In report layout, open property inspector of this field and change property 'Read from File' from No to Yes and also change property 'File Format'.

  • Loading file from jar in webstart 1.5.0_16

    Hello all,
    We have recently updated form 1.5.0_15 to 1.5.0_16. Since the update, our application is bombing when it attempts to read an xml file from a jar in cache.
    JDOModin.xml.XMLFileReaderError in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
    org.jdom.JDOMException: Error in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:617)
         at odin.xml.XMLFileReader.readFile(XMLFileReader.java:53)
         at odin.xml.XMLFileReader.<init>(XMLFileReader.java:40)
    Clearly the path to the jar file is incorrect.
    The url is retrieved like this:
    private URL getURL(String filePath)
            URL url = getClass().getResource(filePath); // relative path "/lookups/version.xml"
            return url;
    } This worked fine in the previous version. Any help would be much appreciated.

    Hi Andrew,
    We are having huge problems fixing this, and have spent quite a while searching the forums for info about it. The closest I've got is two posts where you mention that there are other posts. I can't find them.... Bloody annoying that Sun hasn't updated the webstart FAQ to tell people how to get around this very annoying problem.
    By the way, if you google 1.5.0_16, your post comes up as the second hit.
    Any pointers to threads that offer solutions to resource loading from Jars (images, auth.conf etc) when using webstart, now that it's broken in 1.5.0_16??
    Any help would be greatly appreciated!
    Thanks,
    Craig

  • How to load files from old external hard drive to new PC

    Copied files from old PC (Windows XP) to external hard drive. Purchased new PC (Windows 7). Paid technicians to transfer files from old PC to new PC. Some files were lost in the process.
    Please walk me through (step by step) on how to load spicific files from an external hard drive onto my new PC.
    Thanx, rp1

    Click anywhere on the open desktop so that the Finder menus are displayed at the top of the screen.
    Click Go > Network
    Double click the Time Capsule icon, then double click the icon representing the drive to mount it on the Mac's desktop. It is named "Data" unless you have changed it
    You can drag/drop files to the "Data" icon on the desktop
    235 GB is going to take forever if you try to do this using wireless. If at all possible, connect an Ethernet cable from your Mac to one of the LAN <-> ports on the Time Capsule.
    Even using Ethernet, you are probably looking at 10-12 hours for the file transfer.  All bets are off with wireless only, but a guess would be several days....or even more.

  • Using SQLLDR to load files

    I guess this is kind of a newbie question, so sorry in advance, but I can't figure this out from the documentation.
    I would like to use SQLLDR to load a series of files (a.txt, b.txt, c.txt, for example) to a CLOB. I want one file per row as each one is a separate document. I want everything in the file loaded up until EOF, then I want to move on to the next file.
    It sounds fairly simple, but so far I haven't been very successful. Could anyone post an example control file.
    Thanks.

    Use DBMS_LOB.LoadFromFile to do this (files must be accesible from the Oracle server to do this).
    Message was edited by:
    Kamal Kishore

  • Does flash player (latest) use GPU while loading videos from HD

    i am using flash player to load several videos in an event over keys press, in my last event some videos got stuck while playing. i am using AS3 with loader.load code for swf which contain flv player with path embed in it.
    I was playing my event with Intel i7 4th Gen (i7-4771, CPU 3.5 GHz) with 20GB DDR3 RAM & GPU NVIDIA GTX 760.
    the answer i need is what if i was using NVIDIA Quadro K1100M (2 GB GDDR5 dedicated)
    is flash player using GPU, if yes then GTX series or QUADRO series, which one is better?
    thank you

    Hi,
    You cannot request a file from a UNC path in Flash directly. In fact, this is not possible in HTML either. This might work locally, but will not work when the SWF is published.
    I recomment that you look into your server configuration. Ideally, you would have your Flash application request a file from http://www.someserver.com/myfile.flv. Then in your server configurations, you redirect this request to your network share.
    A word of caution: be sure to set appropriate permissions on these folders.
    This is a document that should get you started if you're using IIS:
    http://technet.microsoft.com/en-us/library/dd296641%28WS.10%29.aspx
    -Stephen
    Flash Player team

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • What path to use to access network files from Java app running on Mac

    I have a Java app running on a Mac with OS X that I'm using to check for files that exists on Windows servers within our network.
    Using a path like /Volumes/<Share>/ works because I've already connected to the drive using Finder. If I try to use a fully qualify the path with "smb://<Server>/<Share>" then my app doesn't see anything. Is there any way that I can get Java to connect to a directory without first having mapped or made the connection via some external tool like Finder?
    Here's the code I'm testing with:
    package FileImports;
    import java.io.File;
    import java.util.Arrays;
    public class Dir {
    static int indentLevel = -1;
    static void listPath(File path) {
    File files[];
    indentLevel++;
    files = path.listFiles();
    if (!(files == null)){
    Arrays.sort(files);
    for (int i = 0, n = files.length; i < n; i++) {
    for (int indent = 0; indent < indentLevel; indent++) {
    System.out.print(" ");
    System.out.println(files.toString());
    if (files[i].isDirectory()) {
    listPath(files[i]);
    indentLevel--;
    } else System.out.println("Directory not accessible!");
    public static void main(String args[]) {
    // this path works where <share> = the directory where my files exist.
    listPath(new File("/Volumes/<share>"));
    // this path returns a null result in files
    // listPath(new File("smb://<Server>/<Share>/"));
    Thanks,
    Alex
    Edited by: agates on Sep 25, 2008 11:14 AM

    agates wrote:
    Thanks for the response. I'll have to dig a little deeper into JCIFS. It looks like it would work great windows to windows. I haven't been able to find in the documentation where it would work on OS X without having to mount the targeted file system first. Has anyone had success creating a connection to a windows file system from OS X with JCIFS?Since jCIFS is written in pure Java and implements the entire SMB/CIFS protocoll on it's own it doesn't require any support from the OS (apart from a normal JVM runnig). Thus it should work exactly the same in OS X and Windows (and Linux and Solaris and ...).

  • Load files from bridge into photoshop lagers

    I am trying without success to load (two) files from bridge to Photoshop as layers.

    I am not exactly sure what you are asking, but I know you can create stacks in Bridge by simply selecting the desired files and pressing ctrl G on the PC (command G on MAC?) I believe there is a forum dedicated to Bridge scripting. You might have better luck there.

Maybe you are looking for

  • Firefox showing up to date and out of date at the same time.

    Trying to use www.workflowy.com and the sites says my firefox is out of date. Help > About Menu shows I'm at 5.0.1 and up to date, but when I went to http://whatsmyuseragent.com/ it gave me this info: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; r

  • In Desperate need for help with Security Settings

    I am currrently working on a project that requires a Flash submenu running through an HTML Browser window and running from a CD. The problem is that the final destination for these CDs will be on computers without the capability to connect to the int

  • Error: Vendor 500075 does not have a bank account in transaction currency

    Hi Experts, I am getting a hard error while trying to post Vendor FI invoice. Error: Vendor 500075 does not have a bank account in transaction currency Message no. Z0066 Please advise. Regards, Simar

  • Required Note for 4.6C  version

    Dear Exports when we save the output to local file in material code the last digit is truncated.  The  filed is of 10 digits but only 9 digits are getting saved. We are using “4.6C” version so kindly provide the NOTE to resolve this problem. Regards

  • Entourage question

    Forgive me if this question is answered elsewhere. I just bought my first Mac a week ago, the mac book pro. I was reading other posts about contacts, etc and several people reference entourage.. what is that? Is that a software for mac? Sorry if this