Problem in reading the JDK1.4Logger configuration file from java prog

I have written a java program and want to log the messages in a log file , I'm using commons logging with JDK1.4logger as logging subsystem .
I am facing the problem in reading the JDK1.4Logger configuration file which is commons-logging .properties file from my java program as a result my log messages are appearing directly on the screen while I try to run program , during compilation no error is shown . I have tried to set java.util.logging.config.file ="Path of my commons-logging .properties file " by setting system properties also.
Please suggest the appropriate solution for this .

Some webservers won't recognise the resource bundle provided in message-resources
In that case, you need to specify that resource bundle information in web.xml at the time of specifying the action servlet like this. Check for the init-param application.
<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>resource.ApplicationResource</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>In this, the drawback is, you can not specify the key for your resource bundle. In the JSP, you have to access the property like this.
<bean:message key="label.fName"/>

Similar Messages

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • How to read the name of .csv file from a particular folder using Oracle.

    Gurus,
    I have a folder called 'data_dir' in Oracle Server and it contains 10 different .csv files and the name of the each file is being suffixed by date and time(24 hrs format).
    First i need to read all the file names then i have to process those files by UTL_FILE to load the data into a relational table.
    Is there any mechanism is available in Oracle to read the file names?
    (In this case all the 10 different csv file names)
    If so, then please help me accomplish this.
    Thanks in advance.
    Regards,
    Venugopal.K

    Is there any mechanism is available in Oracle to read the file names?Sounds to me like you need to use External Tables (*not* utl_file).
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/et_concepts.htm

  • How to read the contents of a file from batch file

    Hi
    I have a text file which contains exe files.  I need to read those exe file names and then execute the same in order they occur. Sample content of the text file a.txt is as below.
    "If you are looking at previous version then use 8792xINT.EXE if you are looking for the current version then check 8793xINT.exe
    please use README.TXT file before you use any above files" 
    I need to read and execute 8793xINT.exe from above text in batch file.  Here number 8793 is variable changes as version changes but xINT.exe is constant.
    Thank you in advance
    DBC
    DBC

    Sorry... 
    code i use is here -
    strScriptFile = Wscript.ScriptFullName ' C:\Patch\test_download3.vbs
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.GetFile(strScriptFile)
    strFolder = objFSO.GetParentFolderName(objFile) 
    Set objShell = CreateObject("WScript.Shell")
    strLink = "http://dbc.download.com/patches/" 
    strSaveTo = "C:\patches"
    objShell.CurrentDirectory = strSaveTo
    objShell.Run Quotes(strFolder & "\wget.exe") & " " & Quotes(strLink) & " -N",1,True
    objShell.CurrentDirectory = strFolder
    Function Quotes(strQuotes)
    Quotes = chr(34) & strQuotes & chr(34)
    End Function
    the above code geneates index.html.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
     <HEAD>
      <TITLE>Index of /140410/patches/</TITLE>
     </HEAD>
     <BODY>
    <H1>Index of /140410/patches/</H1>
    <PRE>   <A HREF="?N=D">Name</A>                              <A HREF="?M=A">Last modified</A>        <A
    HREF="?S=A">Size</A>  
    <HR>
    <IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="..">Parent Directory</A>                  12-Oct-2014 16:25     1k  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="8792KB.exe">8792KB.exe</A>                      18-Oct-2014 1:19  6.4M  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="8793KB.exe">8793KB.exe</A>                      18-Oct-2014 2:19  4.2M  
    <IMG SRC="/icons/dir.gif" ALT="[FILE]"> <A HREF="2834KB.exe">2834KB.exe</A>                      20-Oct-2014 16:18  2.5M  
    <IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="extra/">extra/</A>                            17-Sep-2013 23:09     1k  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="readme.txt">readme.txt</A>                        30-Jan-2012 11:54    20k  
    </PRE><HR>
    </BODY></HTML>
    From above generated index file and re run the above script to in loop to download the exe files in c:\patches and deploy the same with schedule task on the PC in our Isolated ODC. Number of exe files this time only 3 exe.  I am using counter to loop
    the down load. 

  • Java.io.filepermission error while executing a batch file from java prog

    Hi,
    i want run a java program which executes a batch file, both are in a jar file. while am trying this using webstart it shows error:access denied java.io.filepermission <<ALL FILES>>execute. why this happens how to rectify this.
    By
    Vinod

    Clearly, it would be a security vulnerability to be able to do such a thing from the web w/o user granting trust to the application.
    Java Web Start applications run in the Java SE secure sandbox unless they have been granted all-permissions by the user:
    1.) sign all jar files.
    2.) add <security><all-permissions/></security> to the jnlp file.
    The user would then be prompted to grant trust to the applications.
    /Andy

  • Problem of reading the content of this .txt files

    currently i have a problem of reading the content of this file castle.txt
    #Server Ready.
    Lee Siaw Kang 50256808:08:382004/03/15Abdul Rahman 60296008:13:242004/03/15Kenneth Lee 60299308:13:532004/03/15Ho Kid Peng 31337508:17:442004/03/15Tonny Sherbern 50271108:19:132004/03/15Frederick Foh 50257908:20:212004/03/15Jason Kho 61702908:21:312004/03/15Lois Lee Liarn Huee 61897408:22:522004/03/15Victor Palau Udih 31337308:23:202004/03/15Michelle Sim 61899008:27:412004/03/15Alan Hong 50262708:30:312004/03/15Frederick Foh 50257908:33:412004/03/15Douglas Aseng 50255808:36:442004/03/15Atika Abang 31347508:36:592004/03/15David Dzrandinuraidi 61239608:38:012004/03/15Sentia Brangking 61896808:39:502004/03/15Dinah Samuel 61704608:40:582004/03/15Dr. Anderson Tiong 61702508:42:102004/03
    it is something like this ...i want to break it into readable format ...i have tried vector with is the following code.
    import java.util.*;
    import java.io.*;
    public class parseCastle {
    public static Vector parseInfo(String str) {
    int recordSize = 59;
    Vector v = new Vector();
    for (int i=0; i<str.length(); i+=recordSize) {
    String str1 = str.substring(i, i+recordSize);
    Vector vi = new Vector();
    vi.addElement(str1.substring(0, 35));
    vi.addElement(str1.substring(35, 41));
    vi.addElement(str1.substring(41, 49));
    vi.addElement(str1.substring(49, 59));
    v.addElement(vi);
    return v;
    //constructor
    parseCastle(){
    try
    FileInputStream fin = new FileInputStream("castle.txt");
    File fprop = new File("castle.txt");
    byte[] data = new byte[(int)fprop.length()];
    int total = fin.read(data);
    if (total != data.length) {
    System.err.println("Error loading file");
    return;
    //System.out.println(data.length);
    Vector v = parseInfo(new String(data));
    for (int i=0; i<v.size(); i++) {
    Vector vi = (Vector)v.elementAt(i);
    for (Enumeration e = vi.elements(); e.hasMoreElements();)
    System.out.println(e.nextElement());
    System.out.println();
    //*** Alternative ***
    //for (int k=0; k<vi.size(); k++)
    // System.out.println(vi.elementAt(k));
    catch (IOException e)
         System.out.println("Error: "+e);
         e.printStackTrace();
    But it gave me error. like it exceeds array boundary...can someone expert help me out

    You should be aware that these kind of effort always involves certain amount of risk because the proper record format is not hundred percent guaranteed. So, make sure to use properly formatted file, or genuine database instead.
    import java.io.*;
    import java.util.regex.*;
    public class ParseCastle2{
      public static void main(String[] args) throws Exception{
        String line, data;
        BufferedReader br = new BufferedReader(new FileReader("castle.txt"));
        br.readLine(); //discard #Server Ready line
        line = br.readLine();
        Pattern pat = Pattern.compile("([ .A-Za-z]+)([/0-9:]+)");
        Matcher mat = pat.matcher(line);
        Pattern subPat = Pattern.compile("(\\d+):(\\d\\d:\\d\\d)(.+)");
        while (mat.find()){
          System.out.println(mat.group()); // if name only, use group(1) ... beware trailing space
          data = mat.group(2);
          Matcher subMat = subPat.matcher(data);
          while (subMat.find()){
            System.out.println(" cdID = " + subMat.group(1));
            System.out.println(" Time = " + subMat.group(2));
            System.out.println(" Date = " + subMat.group(3));

  • Reading the AirPort Extreme configuration...

    AirPort Extreme: 7.4.1
    AirPort Utility: 5.4.2
    OS X Version: 10.5.7
    When using AirPort Utility of my 2.33 GHz MacBook Pro I get a long wait (either Manual or Continue) while the pinwheel spins next to "Reading the AirPort Extreme configuration..." After about 5 mintes a get a dialog box
    "An error occurred while reading the configuration.
    Make sure your Apple wireless device is plugged in and in range of your computer or connected via Ethernet and try again. (-6753)"
    The Airport Extreme shows up in Finder, but I cannot access it. I'm connected to the internet just fine (I'm posting this).
    Any ideas how I get to actually access the AEBS? I've read other threads on this (they're old and closed) but did not see a conclusion.
    Regards,
    John

    Just went through the same thing myself. Set everything up, it worked like a charm, then I clicked on this innocent little button: Allow setup over WAN. I unchecked it because I don't want to allow WAN connections to configure my router, thank you very much.
    However, what that checkbox really means is, "You are screwed, you can never configure your router ever again, regardless of whether you are connecting over the WAN, the wireless network or even the LAN (direct ethernet connection).
    The other thing I discovered while researching this is, If you want to reset the router as you will absolutely HAVE TO DO to get around this problem once you've clicked and saved that one setting, and you have a blinking amber light, and holding the reset button for minutes doesn't appear to have any effect, what you do is: unplug the router, push the reset button and hold it, plug in the router while holding the reset button. 5 or so seconds later you will get a quick flashing amber like and you have successfully reset it.
    Now I need to figure out how to file a bug to Apple. I assume this is a bug. It's a huge security whole and I am really ****** off about it.

  • AirPort Utility hangs on "Reading the AirPort Extreme configuration"

    Our main router is our AirPort Extreme. We have two other AirPort expresses on the WDS. Everything was working fine till tonight. All the computers can connect with the router and with each other, but the AirPort Extreme doesn't want to connect to the internet or let the AirPort Utility connect to it. When you click on it for either Auto or Manual config, it just hangs with the message, "Reading the AirPort Extreme configuration". After a while it will time out and say, "An error occurred while reading the configuration." I've tried connecting with both a MBP over wifi and a G5 tower via ethernet. Same result each time. Finally I did a factory reset on the thing. After a while of reconnecting I was able to load up a saved .baseconfig file and reinstall it onto the APExtreme. The AirPort freaked out again. It still gives out IPs and routes network traffic, but it wont connect to the internet and it wont let me connect to it via AirPort Utility.
    Any ideas?
    Message was edited by: kidhack
    Message was edited by: kidhack

    Check the firmware of the airport, versus the software of the airport utility on the computers in question, the 2 should match reasonably; the latest of the 2 are airport utility 5.4.1, and firmware 7.4.1. So for instance if you have airport utility 5.4.1 and airport firmware 7.4 the 2 will not read correctly and may hang in random spots, or give you other weird problems. Assuming this does not fix it connect the airport directly to the computer through one of the LAN ports and configure it that way

  • Stuck on "Reading the airport extreme configuration"

    Strange problem here. I have an AEBS with a Win7 PC and my Mac Pro connected to it, sharing a USB printer. All good until yesterday when I needed to troubleshoot a printer problem and tried to verify settings on the AEBS via my Mac Pro. It won't allow me in, just says "Reading the airport extreme configuration"... I let this go on for over 30 mins.
    I tried restarting from Airport Utility. No luck.
    I tried unplugging it, then waiting, then plugging it back in. No change.
    I tried re-setting it using a paper clip. No change, but...
    Airport Utility popped up on the Win 7 PC, and it allowed me in, no problemo. I restored and then verified my settings, etc.
    But on my Mac, I can't get in. Any insights would be much appreciated.
    Thanks

    Add me to the list of users who are having the same problem. We are a school district that has 125 airports in 6 buildings. 70 of them are the new Airport Extreme Dual Band units. Of the 70 new units, 18 are having this problem.
    "File -> Configure Other" does not change the behavior of the 18 unresponsive units. They can be programmed after a factory reset, and sometimes connected to shortly after the initial "Update" but after few hours, they cannot be accessed anymore.
    I have been in contact with Apple support. Their only solution was to shrug their shoulders and tell me to start replacing them. After replacing 2, I had the same problems with 1 of the two replacements.
    Something that may also be related. We have occasional short term power outages (3 seconds or less). After an outage like that, a significant number of the airports will reject clients until they (the airports) are properly rebooted.
    Sounds like they need to fix the firmware.
    Message was edited by: JasonBolbach

  • Is there a way to automatically backup the Airport Extreme Configuration file (.baseconfig)?

    Is there a way to automatically backup the Airport Extreme Configuration file (.baseconfig).
    I know (in hindsight) that I can manually export it from the Airport Utility, but ideally I would like to include it in my Time Machine backup. I had a situation where my Airport Extreme (3rd generation) just stopped working (no lights, no power). I had not exported the config file. I bought a new Airport Extreme (5th generation) and had to manually configure the new router.
    Thanks

    One option would be to use Automator and record the actions to run the AirPort Utility; save the configuration file to the desktop (or any other location you want), and then, close the utility. You can then either make this a part of your login startup programs. Time Machine then should be able to make backups.

  • How to make iTunes read the song's name/singer from the file's name itself?

    Hi everyone,
    So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
    So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.

    iTunes doesn't use file names to determine how music appears in your library,  Rather, it uses metadata that is split between:
    data elements that are embedded within the media files
    data elements that are included in the entries in the iTunes database
    No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes.  Using your example:
    the value of the track number element is 1
    the value of the artist element is "Elvis Presley"
    the value of the song name element is "Blue Suede Shoes"
    Depending on how you configure iTunes then the file name is either:
    completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
    dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
    then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
    the file is in a folder called "Elvis Presley" (the name of the album)
    that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
    Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works.  There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step.  However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes.

  • Read the text in pdf file

    Dear all,
    I have checked a lot of post about reading pdf in this forum. However, is it possible to read the text in pdf file. In my case, I need to read the content of pdf to do further process. Could anybody give me some suggestions. Thank you.

    I have a similar problem, can anybody help us....

  • Which process reads the spfile/init.ora file

    Hi,
    When we start the Oracle DB using "STARTUP" command, which background process reads the spfile/init.ora file?
    Also on startup, which process reads the control file?

    Hi,
    I think the oracle executable.. In the alert log file below you can see that spfile is read first. After that the oracle background processes are initialized.
    Starting ORACLE instance (normal)
    ****************** Large Pages Information *****************
    Total Shared Global Region in Large Pages = 0 KB (0%)
    Large Pages used by this instance: 0 (0 KB)
    Large Pages unused system wide = 0 (0 KB) (alloc incr 4096 KB)
    Large Pages configured system wide = 0 (0 KB)
    Large Page size = 2048 KB
    Using parameter settings in server-side spfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileDB01.ora
    System parameters with non-default values:
    PMON started with pid=2, OS id=30425
    Tue Aug 13 10:45:51 2013
    PSP0 started with pid=3, OS id=30427
    Tue Aug 13 10:45:52 2013
    VKTM started with pid=4, OS id=30429 at elevated priority
    VKTM running at (1)millisec precision with DBRM quantum (100)ms
    Tue Aug 13 10:45:52 2013
    GEN0 started with pid=5, OS id=30433
    Tue Aug 13 10:45:52 2013
    DIAG started with pid=6, OS id=30435
    Tue Aug 13 10:45:52 2013
    DBRM started with pid=7, OS id=30437
    Tue Aug 13 10:45:52 2013
    DIA0 started with pid=8, OS id=30439
    Tue Aug 13 10:45:52 2013
    MMAN started with pid=9, OS id=30441
    Tue Aug 13 10:45:52 2013
    DBW0 started with pid=10, OS id=30443
    Tue Aug 13 10:45:52 2013
    LGWR started with pid=11, OS id=30445
    Tue Aug 13 10:45:52 2013
    CKPT started with pid=12, OS id=30447
    Tue Aug 13 10:45:52 2013
    SMON started with pid=13, OS id=30449
    Tue Aug 13 10:45:52 2013
    RECO started with pid=14, OS id=30451
    Tue Aug 13 10:45:52 2013
    MMON started with pid=15, OS id=30453
    Tue Aug 13 10:45:52 2013
    MMNL started with pid=16, OS id=30455
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    starting up 1 shared server(s) ...
    ORACLE_BASE from environment = /u01/app/oracle
    Tue Aug 13 10:45:52 2013
    ALTER DATABASE   MOUNT
    Cheers
    Legatti

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

  • Can't read the airport express configuration

    hi there,
    i've got an AIPORT EXPRESS (b/g) V 6.3, which has been working marvellously for 4 year, with 3 different laptop ( powerbook, macbook pro and PC).
    since last week end, my connection on internet was really slow (with the ethernet cable the connection is really fast as usual).
    So I've reseted it. then reconfigure it. no problem.
    then this saturday my girl friend couldn't see the network on her PC.
    so I've resetted it again!
    since then my macbook pro see it, also my airport utility, but it can't connect to it....
    airport utility says :reading the airport express configuration... and nothing !!!!
    EDIT: also iTunes can't see the AE anymore...
    i just don't know what to do.
    thank you for your solution
    (hope my english not to bad)
    Message was edited by: Relaxxx
    Message was edited by: Relaxxx

    Hello Relaxxx. Welcome to the Apple Discussions!
    Although I know you have tried several resets, please try another "factory default" reset to get the AirPort Express Base Station (AX) back to its original factory configuration so that we can administer it.
    After resetting it, connect your MacBook Pro directly, using an Ethernet cable, to the Ethernet port of the AX, and then, run the AirPort Utility to configure it. Where you able to access it now?
    Once configured, you can disconnect the Ethernet cable. Using the AirPort Status icon in the menu bar, verify that you are connected to the AX's wireless network. Are you now able to both find it and connect from the icon?
    Once you verified that you can access the AX, both via wire and wirelessly from the Mac, try the PC.

Maybe you are looking for

  • Datatype of columns in a table

    How do I get the data type of a column without using data dictionary? Is there any generic construct to find the datatype which will work for SQL Server and Oracle?

  • How to set the URL??

    Hello Friends, I am using the Oralce BPEL process manager 10.1.2 . In my BPEL program (in BPEL jdeveloper->BPEL process manager )I have deployed the wsdl of SALESFORCE.COM I had accessed the Login api of salesforce.com and login is sucessful. After t

  • Command F2 not working on 2010 iMac for TDM

    I want to convert my 2010 iMac to be just a monitor for a 2011 MacBook Pro. Have thunderbolt cable between. command F2 does nothing. I have verified that the keyboard preferences are NOT using F2 as standard function key. I am using an Apple wireless

  • CAN'T I LOG INTO MY AOL ACCUNT

    I CAN'T LOG INTO  MY AOL ACCOUNT.  I AM ONLINE, BUT WANT TO LOG DIRECTLY INTO MY AOL HOME PAGE WITHOUT IE. I THINK SOMETHING NEEDS TO BE CHANGED IN MY SETTING BUT I DON'T WANT TO SCREW SOMETHING UP.

  • Optimum Child Systems for each CUA

    Hi, Is there a limit to the number of child systems a CUA server can administer ? Or Is there a recommended number for optimum performance ? Thanks