How to find my own property file in a war in soloaris

Hi, there;
I have a question whcih bothers me quite long. I packaged a property file in a
war file and use console to uploaded. I can access to the servlet through browser
and the servlet reference another class which looks like
try {
InputStream is = getClass().getResourceAsStream "/data_ctrmw.properties");
error +="InputStream property file 1nd try: "+is;
if(is==null){
is = getClass().getResourceAsStream("data_ctrmw.properties");
System.err.println("data_ctrmw.properties found! ");
error +=" InputStream property file 2nd try: "+is;
Same code works on windows wls6.1, but not on soloris machine.
One other question:
How can I write out to a log file? I am unable to write out to a log file.
Thanks a lot

Sorry;
Yesterday, I finally found that my web.xml had an error. I didn't define .properties
as MIME extension type. I change property file type to .txt and put in MIME type.
It works!
Thanks
"raymond" <[email protected]> wrote:
>
Hi, Chala;
Thanks for your good suggestion. However, it seems still not working,
I also tried
getResourceAsStream("/") trying to find from app context root. By the
way, in
this function, the arg is
String path, right now, I am just add the param-name element in web.xml
for a
specific servlet. But actuall, I want the properties to be exposed to
the application.
Also, I tried context-param element in web.xml, it even can't be uploaded
to jrun
or weblogic.
I guess, it might be possible to warp it in an .ear file and put these
in sth
like application.xml
Any suggestion?
Thanks lot
"Arjuna Chala" <[email protected]> wrote:
Have you tried using
ServletConfig.getServletContext().getResourceAsStream().
"raymond" <[email protected]> wrote in message
news:3c5f0b20$[email protected]..
Hi, there;
I have a question whcih bothers me quite long. I packaged a propertyfile
in a
war file and use console to uploaded. I can access to the servlet
through
browser
and the servlet reference another class which looks like
try {
InputStream is = getClass().getResourceAsStream"/data_ctrmw.properties");
error +="InputStream property file 1nd try: "+is;
if(is==null){
is = getClass().getResourceAsStream("data_ctrmw.properties");
System.err.println("data_ctrmw.properties found! ");
error +=" InputStream property file 2nd try: "+is;
Same code works on windows wls6.1, but not on soloris machine.
One other question:
How can I write out to a log file? I am unable to write out to a logfile.
Thanks a lot

Similar Messages

  • How to find out web content files linked in folio through scripting

    Hi all,
    Please suggest me, how to find out web content files linked in folio through scripting.
    Regards,
    Moorthy

    @Moorthy – can you tell us a bit more? By mentioning "folio", I think you are referring to Adobe Digitial Publishing Suite (ADPS or short: DPS). If yes:
    1. Do you want to analyze Folio files *.folio and get the linked web content files?
    2. Or do you want to check an InDesign file with an overlay and check what files are linked as web content?
    3. Or something else?
    Where is your base problem?
    Packaging the InDesign files and copy/relinking the web content files after the packaging process?
    Uwe

  • How to find our own postings

    Hi
    Can any one let me know how to find your own postings in this forum, before the updates on this forum
    it was esy by giving our handle name in search options we can find it, but now am facing problems to find it.
    can anyone let me know about it.
    thanks in advance. :-)

    There may be (and hopefully is) an easier way, but this seems to work:
    1. In the URL of the page that's returned by clicking <b>Search for all user messages</b>, find your user ID. The URL should look something like this:
    http://forums.oracle.com/forums/search.jspa?userID=<your user ID>
    2. Add the "userID=<your user ID>" as a parameter in the URL of any search results page to filter the results for your own postings only. For example, to see all your postings, the following URL seems to work:
    http://forums.oracle.com/forums/search.jspa?userID=<your user ID>&dateRange=all
    Hope this helps.

  • How to find that which flat file is belongs to which application server?

    How to find that which flat file is belongs to which application server?

    Hi,
    Search im www.sap-img.com, you will get most of answers.
    Jogdand M B

  • Where can I find the forum premiere elements? and how to find my own questions asked return?

    waar vind ik het premiere elements forum en hoe vind ik mijn eigen gestelde vragen terug?
    where can I find the forum premiere elements? and how to find my own questions asked return?

    arkitsa wrote:
    thank you 99jon, but still difficult to find your own questions back.
    Click on this:
    then this:
    and finally this:
    And your posts will be listed.

  • How to find desktop background image file

    I am preparing an old PowerBook G4 laptop to be sold. I had previously lent it to a friend and I am selling it to another friend. The friend to whom I lent it asked me for the desktop image file so he can use it as his desktop on the Mac he owns.
    I shot that photo years ago and I can't find the original .jpg for it, so I am hoping that I can find the desktop version of it before I finish preparing my PowerBook for sale. I have searched everywhere, but that image file does not show up on the PowerBook.
    I figure that since I can see the photo when I am logged in, it must be somewhere, but where? I originally had it in iPhoto, but it was deleted from there at least two years ago. This PowerBook only has one account, so there's not a lot of places to look through.
    If anyone has any pointers on how to find an image file on a PowerBook running Mac OS X 10.4.11, please let me know.

    HI Stanely,
    Try going to System Preferences/Desktop&ScreenSaver. Click the Desktop tab. Now, go thru the folders listed there to see if the image shows up there. If it does, then go to Spotlight and type in the name of the folder where the image was. Spotlight will populate a list for you. At the top of the list click where it says: Show All. A pane will open. Look for the folder, then on the right click the little white circle with an "i" in it. That will give you the path to find the folder where the image resides.
    You can search Spotlight by typing in these extensions: jpg tiff png pict gif bmp psp that's another way to search for an image.
    Also, open a Finder window and look in the Sidebar on the left. Click where it says: Pictures. Might be in there also.
    Carolyn

  • How to find out the Trace file

    Hi Dba's
    I need to find out the trace file with the Request id. how can i find out it?
    Thanks

    There are many ways to create a trace file in the apps. Pl provide details on how you enabled trace, as that will determine where the trace file is created.Concurrent requests trace files are always created under USER_DUMP_DEST directory.

  • How to find username from trace file for deadlock due to user

    This is the info from the trace file.
    *** 2003-08-18 08:07:40.590
    *** SESSION ID:(560.60728) 2003-08-18 08:07:40.560
    DEADLOCK DETECTED
    Current SQL statement for this session:
    SELECT S.AVAILABLE,GET_AVAIL(S.PRODUCT_ID),S.ON_HAND,S.W_PL,S.PRODUCT_GROUP,S.SIZE_ID,S.COLOR_ID,S.ONEZ,S.COST,IS_IT_KIT(:b1),
    NVL(PR.R_AVAIL,0),NVL(PR.R_SOLD,0),NVL(PR.UNIT_OF_MEASURE,'QTY'),NVL(DECODE(PR.AV_CT,0,1,PR.AV_CT),1) FROM ACNTV.SKU S,ACNTV
    .PRERED_QUANTITIES PR WHERE S.PRODUCT_ID = PR.PRODUCT_ID (+) AND S.PRODUCT_ID = :b1 FOR UPDATE OF S.ON_HAND,
    S.W_PL,PR.R_AVAIL
    The following deadlock is not an ORACLE error. It is a
    deadlock due to user error in the design of an application
    or from issuing incorrect ad-hoc SQL. The following
    information may aid in determining the deadlock:
    Deadlock graph:
    ---------Blocker(s)-------- ---------Waiter(s)---------
    Resource Name process session holds waits process session holds waits
    TX-0021004b-000125d8 366 560 X 329 135 X
    TX-0008003b-000125fc 329 135 X 366 560 X
    session 560: DID 0001-016E-00000002 session 135: DID 0001-0149-00000002
    session 135: DID 0001-0149-00000002 session 560: DID 0001-016E-00000002
    Rows waited on:
    Session 135: obj - rowid = 00017FAC - AAAX+sAAPAAAS9/AAP
    Session 560: obj - rowid = 0001586C - AAAVhsABXAAAAIRAAN
    We know the objects ,but how to find out the username ?
    Thanks

    Hi;
    Please see:
    How To Check If a Profile Option Is Set In Oracle Application [ID 470102.1]
    How to list E-Business Suite Profile Option values for all levels using SQLPlus [ID 201945.1]
    How to Search all of the Profile Options for a Specific Value [ID 282382.1]
    Regard
    Helios

  • How to find whether a m4a file is of kind apple lossless programmatically

    Hi,
    Through my application i am transferring music files to windows machine but as we know that windows can not play apple lossless file (.m4a) and thus while trassferring i have to check whether the file is apple lossless or not. I am unable to find a way to find the kind of file programmatically. How should i read the file tags ? or any other similar way.
    thanks in advance.
    ibook g4   Mac OS X (10.4.4)   1.42 ghz powerpc g4 processor

    Hi All,
    I have found he solution and sharing the solution wih u all.
    Actually i found a apple script in dougs website. In that we just have to compare the kind of file with Lossless. You can find the script on Dougs url as i dont remember the exact link.
    Thanks for viewing my query.
    Regards
    @mit
    ibook g4   Mac OS X (10.4.4)   1.42 ghz powerpc g4 processor

  • How to find os x lion file in new macbook pro?

    I bought macbook pro about a month ago( already installed os x lion when it came out), and i tried to install windows 7 in newest macbook pro. But i realized i need os x lion dvd file for install windows 7 in macbook pro successfully. How can i find os x lion file? 

    min.k. wrote:
    .... i need os x lion dvd file for install windows 7 in macbook pro successfully.
    Why?  Use Bootcamp Assitant (Applications->Utilities->Bootcamp Assistant)
    Boot Camp: Windows 7 installation frequently asked questions
    Boot Camp Installation & Setup Guide

  • How to find the right XML files

    Hi all
    I need to customize OBIEE according to the custommers needs,Is there any tool to find the xml source files where I can make the changes.
    Currently I'm using 'psoug' to edit the page source code , for example I want to modify those values:
    <tbody>
    <tr>
    <td class="XUISectionHeadingTitle">Columns</td>
    </tr>
    <tr>
    <td class="XUISectionHeadingText">
    Click on column names in the selection pane to add them to the request. Once added, drag-and-drop columns to reorder them. Edit a column's format, formula and filters by clicking the buttons below its name.
    and I don't find the xml file to update it.
    Anyone knows how I can find it?

    *(BIInstallDir)\OracleBI\web\msgdb\l_en\messages*
    Under this path you can find the list of XML files....
    These XMLs are named to indicate what type of info it contain..

  • How to read values from Property file into BPEL process local variable?

    I would like to use a Property file with some parameters e.g.
    <myparm1>12345</myparm1>
    How can I read from a BPEL process such a Property file and assign it into e.g. local variable "intparm1"?
    Where (in which directory) should I put this XML Property file to have it always available for reading?
    Peter

    Hi,
    You can also use
    ora:readFile( ) function as follow :
    ora:readFile(xml file location (ex. "file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xml"),xsd file location (ex."file:///D:\\SOA\\FileAdapters\\readFile\\test\\test.xsd"))
    inside the assign activity and assign this to the variable you want.
    regards
    arababah
    Edited by: arababah on Aug 10, 2009 12:55 AM

  • How to know if a property file that I use in my program is updated

    Hi everyone,
    I was wondering how my program can know as soon as the property file/any file that I'm intersted in, has been updated at runtime. Something like JBoss descriptor etc, as soon as we make a change the app server knows of that change ?
    I need this technique for updateing my static variables in memory as soon as there was a manual change to any properties at runtime.
    Any help will be appreciated.
    Thanks,
    - Liju P.Oommen.

    One way to do it would be to wrap the process used to update the property file itself. For example if you provided a GUI that people used to change the properties and this GUI also notified your program when the properties changed you could maintain consistency.

  • How can we locate the property file and read from it in .js page?

    HI
    I am having an static html page where in the url is hardcoded,so i wanted to read it from a property file and which can be done by using .js files
    i wanted to know how to deal with property files in .js?
    Thankx

    I assume you know that Java and JavaScript only share a name and they are both programming languages but little else.
    You can load JavaScript in Java 6. However for questions on what the JavaScript should do I suggest you try a javascript forum.

  • How to deal with a property file and EJB

    Hello,
    I'm quite new to the EJB technology.
    My problem is, how to handle a property file?
    Let's say I have a custom 'property.xml' (that holds some application specific constants) somewhere in my EJB jar or in a related jar (so it is in the classapth).
    Usually (not with EJB) I would write a class (let's name it 'Props', see below) which reads the property file once and initialize some public static members.
    In an object (see below 'MyClass') I would then use 'Props.memberName' if I want to have access to a constant property.
    class with public static constants members; read the file only once; properties are in memory ...
    public class Props
      public static String FOO = null;
      static
        Properties props = new Properties();          
        try
          props.loadFromXML(CConstants.class.getClass().getClassLoader().getResourceAsStream("propertyFile.xml"));
          FOO = props.getProperty("FOO");
        catch(Exception e){...}
    }The class that uses the properties<br>
    public class MyClass
      public void doSomething()
        String s = Props.FOO + " BAR";
    }But unfortunately static things are not allowed in EJB ...
    What is the preferred way to get access to the properties?
    To read the file each time an EJB is used, will cause much disc-I/O and xml parsing (this is very unefficient).
    Is there no mechanism to read such things once only?
    I would be very pleased to get an answer, because I don't know how to solve this problem
    Thanks

    Use the @Resource annotation on fields representing the application-specific constants. Override those values as you see fit with the standard ejb-jar.xml file's env-entry element.

Maybe you are looking for

  • How can I read a image file through URI?

    I have a image file store in my computer's Image directory on drive E. I name the pathname as: file:////MyComputerName/e:/image/ the image filename is MyImage.JPG so I create a ImageIcon use: String uri  = "file:///MyComputerName/e:/image/"; String i

  • Missing transactions in outgoing payments / incoming payments

    Hello Experts, My customer operated the year transfer process and created a new DB. From that point , he faces a problem with the outgoing payments and incoming payment forms. In the new DB there are missing transactions in the forms mentioned above.

  • Where are Themes saved?

    Hi, I was wondering if there is a certain place that Custom Themes are saved by default. I've created a theme and would like to give it to someone else to use, but I can't find the file anywhere on my computer. I can find the built-in themes, but not

  • After purchasing Quicktime Pro, how do you start the program?

    I recently purchased Quicktime Pro and received the order acknowledgement along with the license key.  I added this as instructed, clicked "apply" and nothing changed.  I cannot find QP anywhere.  I only see the Quicktime Player that I already have. 

  • 2 tables 1 datasource

    Hi, I have a single datasource with two tables. In table 1 I have lots of data with a single column (Notes) containing a value (1-4) which relates to a note. In table 2 I have the corresponding note number and description: TBL1 Column = Notes 1 TBL2