Unusual read, write XML request.

I have a program that builds a JTree based upon a template , and properties file passed to it.
I need a program that will rip through an xml file such as this xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Device>
  <Module name="Module 1">
           <status>
                <device Name="Yellowfin Demo"
                               Description="Beta Tag mapper"
                               Location="Jim's 13 slot rack"
                               Contact="Jim"
                               Serial Number="" >                 
                </device>
                 <network></network>
                 <chassis></chassis>
                 <chassis></chassis>
            </status>
            <projedit></projedit>
            <projmngt></projmngt>
            <admin>
                  <network></network>
                  <device></device>
                  <users></users>
            </admin>
            <logging></logging>
       </Module>          
</Device>and create a properties file that has this information in it:
Devices.Module 1.Status.Device.Name=Yellowfin Demo
Devices.Module 1.Status.Device.Description=Beta Tag mapper
Devices.Module 1.Status.Device.Location=Jim's 13 slot rack
Devices.Module 1.Status.Device.Contact=Jim
Devices.Module 1.Status.Device.Serial Number=
Devices.Module 1.Status.Network.Ethernet 1.MAC Address=
Devices.Module1.Status.Network.Ethernet 1.IP Adress=
Devices.Module1.Status.Network.Ethernet 1.SubNet Mask=
Devices.Module1.Status.Network.Ethernet 1.Default Gateway=
Devices.Module1.Status.Network.Ethernet 2.MAC Address=
Devices.Module1.Status.Network.Ethernet 2.IP Adress=
Devices.Module1.Status.Network.Ethernet 2.SubNet Mask=
Devices.Module1.Status.Network.Ethernet 2.Default Gateway=
etc...This properties file is fead to the program and creates the JTree
Is it possible?

Yes, of course there's a way to do this whatever you have in mind actually. What makes your request unusual is that you have posted an ill-formed XML document and an output that is inconsistent with this document. An unambiguous description of how to construct the lines of the output file would also have been a great step forward to get a detailed answer.

Similar Messages

  • Cluster and Read Write XML

    In my applications I allow users to save their settings. I used to do this in a Ini file. So I wrote a Vi that could write any cluster and it worked ok. When I discovered that in the newer versions of LabVIEW you could Read/Write From/To xml, I changed inmediatly because it have some advantages form me but I am having some trouble.
    Every time I want to save a cluster I have to use
    Flatten To XML -> Escape XML -> Write XML
    and to load
    Load From XML -> Unescape XML -> Unflatten from XML.
    I also do other important things each time I save or load settings. So it seems to be reasonable to put all this in just two subvi's. (One for loading, One for saving). The problem is that I want to use it with any cluster
    What I want with can be summarized as following:
    - SaveSettings.vi
    --Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    --Outputs
    ---Error Out
    -LoadSettings.vi
    Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    Outputs
    ---DataFromXML
    ---Error Out
    I have tried using variants or references and I was not able to make generic sub vi (sub vi that don't know what is in the cluster). I don't want to use a polymorphic vi because it will demand making one load/save pair per each type of settings.
    Thanks,
    Hernan

    If I am correct you still you need to wire the data type to the Variant To Data. How can you put in a subvi ALL that is needed to handle the read/write of the cluster? I don't want to put any Flatten To XML or Unflatten From XML outside.
    The solution I came out with INI files was passing a reference to a cluster control but it is real unconfortable because I have to itereate through all items.
    When a control has a "Anything" input, is there any way to wire that input to a control and remains "Anything"?
    Thanks
    Hernan

  • Read/write xml data from/to adobe livecycle forms (pdf)

    Hello,
    I need some help reading xml data from pdfs created by Adobe LiveCycle and also writing xml data back to the form.
    The forms have been created using PROD LC 8.2 and in the future they will be created using PROD LC 9.5.
    I am using Visual Basic .NET to access the data programatically.
    Can anyone help me with some hints? A library, SDK? Any information would be very helpful.
    I am quite new with this Electronic Forms issue and I do not even know where to start.
    Thank you,
    Ionel

    Hi lonel,
    Do you want an online solution?
    I mean, it follows this workflow:
    1. The user will open the PDF by clicking a link, and a server-side program will generate the PDF and prepopulate it with data from some data sources, and render the PDF to the client (Browser),
    2. The user will fill the PDF.
    3. The user will click a Submit button and save the PDF and Data on the server.
    4. If the user wants to edit the Submitted Form, he will click a link to open the save PDF and possibly prepopulate some fields with data from other data sources, and complete the cycle of filling and saved the PDF and Data on the server.
    5. While the user is filling the PDF (inside a Browser), there might be a need to perform some lookup on the server, and update the form parts accordingly as a result of the lookup process.
    For 1-4 above, I have developed a complete base library using ASP.NET which helps you to perform the above.
    You can goto my Google Workspace and you will find a bunch of documents, sample PDFs, collections and VB Classes. To best view them, login using some Google Account.
    For point 4 above, one way to perform this effect, is to regenerate the required XML Data (which has the saved data before and the new lookup data), remerge the entire XML result with and empty PDF Form, and render the XFA (PDF Form) back to the client. But, if the PDF has one or more signatures, it will not work. So, in this case, you can update the Form Fields of a Saved PDF Form with new Data from the server, but the net effect is that you will have to loose all the signatures that were added on the PDF before.
    For 5 (above) there are 3 methods:
    1. Using a Web Service as a Data Connection. This is very easy if you have a traditional Web Service. I have used this method several times and will use it again if the need be. But, there is a problem. If the result of the Web Service is an Array of some Data, and you want to remerge the XFA to get the required effect after executing the web service ... and ... if there are some Drop-Down-List (DDL) fields, the bindings of the DDL Items of those fields will be lost. But, you can rebuild them (on enter event of the DDL Field)  if you have saved them in the embedded XML Data.
    2. You can update few (not many) fields while the PDF is opened (under the Browser via IFRAME) by passing the new field values using the URL Query String method. I have not done this, but I like this method, and I think it is cool. You need to write a server side code to ensure the the new filed values are passed back to the client using the correct URL with the Query String, and you need to write some javascript code inside the PDF to parse the URL and get the new field values and update them accordingly. See this as an example:
    http://www.halnesbitt.com/pages/pdfqs.php
    3. This method is very advanced and uses message communication ques between the Browser and the PDF (which is opened inside IFRAME element) using HostContainer object. This method will enable 2-way communication between the Browser and the PDF on the client side using javascript. I'd love to use this method one day. See example here:
    http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm
    I hope this will be of help to you.
    Tarek.

  • Read/write XML via OO4O

    We have some ASP code (Active Server Pages) that uses OO4O to select/insert data in an Oracle 8i rel. 2 database (The OO4O objects are from the same release 8.1.6). Now we would like to enhance it to read and store some XML documents directly (the XML documents are about 10 KB and have nested master/detail like structure).
    Our first idea was to write a stored procedure with a string argument to save the XML document, and to write a stored function also returning a string to retrieve the same data. But it appears that there is a 4KB limitation here (we thought it was a 32 KB limitation, but have only been able to get 4 KB?).
    Then we tried to use the RAW parameter type (although the documentation recommends not to), but this apparently requires the data top be transformed to binary format (the XML is in ISO8859-1 format).
    Have you any suggestions on how to overcome these limitations?
    Or are we simply going in the wrong direction (Is there a better way to use XML via OO4O than with stored procedures)?
    Regards
    Tom Bjerre.
    NB: The stored procedures written in Java look like:
    public static String get_xml(String key) throws SQLException{...}
    public static void set_xml(String key, String xmlStr) throws SQLException{...}
    with call specs of:
    CREATE OR REPLACE PACKAGE TEST AUTHID DEFINER AS
    FUNCTION GET_XML ("key" IN VARCHAR2)
    RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'Test.UtilXML.get_xml(java.lang.String) return java.lang.String';
    PROCEDURE SET_XML ("key" IN VARCHAR2, "xmlStr" IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Test.UtilXML.set_xml(java.lang.String, java.lang.String)';
    END TEST;
    null

    CHAR is limited to 2k.
    VARCHAR2 is limited to 4k.
    You should be using CLOB if you're
    saving XML strings.

  • Reading an XML file and write the contents to another xml file in java

    Hi,
    I am new to xml parsing.My requirement is that I am getting a message (xml) using ibm MQ in the ByteArrayInputStream format.I have to read this xml message and write to another file.
    I am creating a POC for this.
    First I used simple reading and writing concept but the output is "java.io.FileInputStream@3e25a5 "
    Sample xml file
    - <Client>
    <ClientId>1234</ClientId>
    <ClientName>STechnology</ClientName>
    <DTU_ID>567</DTU_ID>
    <ClientStatus>ACTIVE</ClientStatus>
    - <LEAccount>
    <ClientLE>678989</ClientLE>
    <LEId>56743</LEId>
    - <Account>
    <AccountNumber>9876543678</AccountNumber>
    </Account>
    </LEAccount>
    - <Service>
    <Cindicator>Y2Y</Cindicator>
    <PrefCode>980</PrefCode>
    <BSCode>876</BSCode>
    <MandatoryContent>MSP</MandatoryContent>
    </Service>
    </Client>
    code:
    import java.io.ByteArrayInputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              byte currentXMLBytes[] = inputStream.toString().getBytes();
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    Please suggest me how can I use DOM/SAX parser ,I can see several code on net for reading xml file using SAX/DOM parser but writing an xml file after reading it using ByteArrayInputStream I am not getting .A help through some example Link will also be helpful for me.
    Thanks
    Sumit
    Edited by: user8687839 on Apr 30, 2012 2:37 AM
    Edited by: user8687839 on Apr 30, 2012 2:43 AM

    Thanks I got the result.
    package com.sumit.collections;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              ByteArrayOutputStream buffer = new ByteArrayOutputStream();
              int nRead; byte[] data = new byte[1024];
              while ((nRead = inputStream.read(data, 0, data.length)) != -1) {
              buffer.write(data, 0, nRead); } buffer.flush();
              byte currentXMLBytes[]= buffer.toByteArray();
              /* byte currentXMLBytes[] = inputStream.toString().getBytes();*/
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    }

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • Read and Write XML files

    I work on a Flex application that will be used to record time entries for manufacturing plan. I have two problems to solve:
    1- Can I read an XML file from a local drive? (C: /temp/file)
    2- If the system where I call the web service is offline, I must create local file that are going to be read later vwhen the system will be up again. How can I create local file from Flex?

    A web-based app cannot access the local drive w/o user permission.
    Sometimes, folks upload local files to a server (also requiring user
    permission) and then request the file from the server.
    You can use local SharedObject to store data, although there are limits to
    how much data.
    The recommended option is to create an AIR app.  It will be able to access
    the local drive once it is installed.

  • Reading & writting code for XML doc

    I need help with writting a java code that will read the XML dopcument below & output it as given below. thanks.
    <?xml version="1.0"?>
    <!-- Employee expenses by department. -->
    <firm>
    <!-- Hmmm, suspicious. -->
    <dept name="Accounting">
    <emp name="Boswell" amt="437.46" />
    <emp name="Austen" amt="124.07" />
    <emp name="Johnson" amt="184.19" />
    <emp name="Boswell" amt="423.99" />
    <emp name="Keats" amt="321.14" />
    </dept>
    <!-- Why so much travel and always to Russia in summer? -->
    <dept name="Finance">
    <emp name="Tolstoi" amt="224.46" />
    <emp name="Turgenev" amt="532.11" />
    <emp name="Tolstoi" amt="149.08" />
    <emp name="Gogal" amt="643.26" />
    <emp name="Tolstoi" amt="265.91" />
    </dept>
    <!-- Marketing, smarketing -->
    <dept name="Marketing">
    <emp name="Mishima" amt="754.18" />
    <emp name="Kawabata" amt="398.07" />
    <emp name="Kawabata" amt="398.07" />
    </dept>
    <!-- High pay, high stress: deserve to travel -->
    <dept name="Technology">
    <emp name="Hesse" amt="156.44" />
    <emp name="Handke" amt="174.21" />
    <emp name="Hesse" amt="365.21" />
    <emp name="Hesse" amt="452.33" />
    </dept>
    </firm>
    OUTPUT:
    Accounting
    Austen --> $124.07
    Bosworth --> $861.45
    Johnson --> $184.19
    Keats --> $321.14
    Finance
    Gogal --> $643.26
    Tolstoi --> $639.45
    Turgenev --> $532.11
    Marketing
    Kawabata --> $796.14
    Mishima --> $754.18
    Technology
    Handke --> $174.21
    Hesse --> $973.98
    ----------------------------------------------------

    /* INTERFACE */
    import java.util.*;
    import java.util.regex.*;
    abstract public interface XMLInterface {
    abstract public void parse(String file_name);
    abstract public String getStartTag(String item);
    abstract public String getEndTag(String item);
    abstract public Map getAttributes(String item);
    abstract public int getXMLType(String item);
    public static final String start_tagSA =
    "<[\\s]*[\\w]+[\\s]*>";
    public static final String end_tagSA =
    "</[\\s]*[\\w]+[\\s]*>";
    public static final String pi =
    "<\\?[\\W\\w\\s]*\\?>";
    public static final String comment =
    "<!--[\\s]*[\\W\\w]+[\\s]*-->";
    public static final String elementSA =
    "<[\\s]*[\\w\\W]+[\\s]*[]?>";
    public static final String attribute =
    "[:\\w]+[\\s]*=[\\s]*([\\'|\"])[\\w\\d\\.$\\s]+\\1";
    public static final int XML_BAD_TYPE = 0;
    public static final int XML_COMMENT = -1;
    public static final int XML_ELEMENT = -2;
    public static final int XML_PI = -3;
    public static final int XML_START_TAG = -4;
    public static final int XML_END_TAG = -5;
    /* IMPLIMENTATION */
    import java.io.*;
    import java.util.*;
    import java.util.regex.*;
    public class ParserXML implements XMLInterface {
    public void parse(String file_name) {
    readFile(file_name);
    compile_patterns();
    Iterator it = records.iterator();
    while (it.hasNext()) {
    String next = (String) it.next();
    int type = getXMLType(next = next.trim());
    switch (type) {
    case XMLInterface.XML_START_TAG:
    System.out.println("Start tag: " + next);
    String tag = getStartTag(next);
    if (tag != null)
    System.out.println("\tTag is " + tag);
    break;
    case XMLInterface.XML_END_TAG:
    System.out.println("End tag: " + next);
    break;
    case XMLInterface.XML_ELEMENT:
    System.out.println("Element: " + next);
    Map m = getAttributes(next);
    if (m != null) {
    Set s = m.keySet();
    Iterator iter = s.iterator();
    while (iter.hasNext()) {
    Object key = iter.next();
    System.out.println("\tAttribute: " + key + " = " + m.get(key));
    break;
    case XMLInterface.XML_COMMENT:
    System.out.println("Comment: " + next);
    break;
    case XMLInterface.XML_PI:
    System.out.println("Processing instruction: " + next);
    break;
    default:
    System.out.println("Bad XML type: " + next);
    break;
    public int getXMLType(String item) {
    Matcher m = null;
    m = start_tagSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_START_TAG;
    m = end_tagSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_END_TAG;
    m = elementSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_ELEMENT;
    m = comment.matcher(item);
    if (m.matches()) return XMLInterface.XML_COMMENT;
    m = pi.matcher(item);
    if (m.matches()) return XMLInterface.XML_PI;
    return XMLInterface.XML_BAD_TYPE;
    public String getStartTag(String item) {
    Matcher m = start_tagSA.matcher(item);
    if (m.find())
    return m.group();
    else
    return null;
    public String getEndTag(String item) {
    return null;
    public Map getAttributes(String item) {
    Matcher m = attribute.matcher(item);
    if (!m.find()) return null;
    m.reset();
    Map attributes = new HashMap();
    int n = 0;
    while (m.find(n)) {
    String[ ] key_value = m.group().split("=");
    attributes.put(key_value[0].trim(), key_value[1].trim());
    n = m.end();
    return attributes;
    private void readFile(String filename) {
    records = new ArrayList();
    try {
    BufferedReader input = new BufferedReader(new FileReader(filename));
    String record = null;
    while ((record = input.readLine()) != null)
    records.add(record);
    input.close();
    catch(Exception e) {
    e.printStackTrace();
    System.exit(-1);
    private void dump() {
    Iterator it = records.iterator();
    while (it.hasNext())
    System.out.println(it.next());
    private void compile_patterns() {
    elementSA = Pattern.compile(XMLInterface.elementSA);
    comment = Pattern.compile(XMLInterface.comment);
    pi = Pattern.compile(XMLInterface.pi);
    start_tagSA = Pattern.compile(XMLInterface.start_tagSA);
    end_tagSA = Pattern.compile(XMLInterface.end_tagSA);
    attribute = Pattern.compile(XMLInterface.attribute);
    private List records;
    private Pattern elementSA;
    private Pattern comment;
    private Pattern pi;
    private Pattern start_tagSA;
    private Pattern end_tagSA;
    private Pattern attribute;
    /* DRIVER */
    class ParseDriver {
    public static void main(String[ ] args) {
    if (args.length < 1) {
    System.out.println("ParseDriver <filename>");
    return;
    ParserXML parser = new ParserXML();
    parser.parse(args[0]);

  • XML Reader/Writer

    Is there a simple class for Reading an XML file in, getting it's elements/attributes etc, and one for writing to an XML file?
    Here is a simple XML file contents:
    <?xml version="1.0" ?>
    <java>
    <temp value="98.6 F" />
    </java>
    It's just a few lines of basic text. Right now I am just reading/writing using a standard BufferedReader, PrintWriter combo and the logic flows based on a known tag-flow. But
    what if I dont know what and where different tags in a file? Isent there a Reader-Writer for
    this that will collect the tags and their attributes/values for me???

    Hi there,
    Why do you want to re-invent the wheel when some cars running on these wheels already exists.
    There are APIs that specialize in parsing a XML Document to it's shreds.
    Xerces by http://xml.apache.org/xerces is one of them. The choice that you have is either to use the SAX portion of the API or the DOM portion. The easiest alternative is to use neither and go for the JDOM api. http://www.jdom.org.
    If you want to learn more about xml processing with Java I would advise you read Brett McLaughlin's Java/XML book or look at http://www.ibiblio.org

  • Pls How do I read/write a xml file using java

    I want to read/write trough a server/client a file.xml from evt. the same computer, this is the code for the client
    import java.io.*;
    import java.net.*;
    class client
    public static void main (String args[]) throws Exception
    final String msg = "<beg>note</beg>";
    // BufferedReader in = new BufferedReader(new FileReader("note.xml"));
    final Socket clientSocket = new Socket ("localhost", 8000);
    final OutputStream clientStream = clientSocket.getOutputStream ();
    clientStream.write (msg.getBytes ());
    // clientStream.write (in.getBytes ());
    clientSocket.close ();
    // BufferedReader in = new BufferedReader(new FileReader("note.xml"));
    // System.out.println(in.readLine());
    I want to read it and put it in a buffer...
    please somebody help me!!!
    regards
    Harry

    Pls read this:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=271751
    And don't post the same message twice. It's annoying.

  • Unusual disk read write and system lockup - Gen 1 MacPro dual Intel

    I have had this issue for a while - but I think it is getting worse (or I'm just more tired of it). The disks start reading/writing ( I can see it in Activity Monitor) and continue for several minutes. Meanwhile, the system is fully occupied and cant be used.
    In the Activity Monitor window, I notice that ICalExternalSync is using up nearly a gig or memory and 2 gigs virtual memory - is this normal?
    Also, the kernal_task item is using up 58 threads, another gig of virtual memory but just 80mb of real memory. Just seems odd.
    Any suggestions?
    Phil
    Model Name: Mac Pro
    Model Identifier: MacPro1,1
    Processor Name: Dual-Core Intel Xeon
    Processor Speed: 2.66 GHz
    Number Of Processors: 2
    Total Number Of Cores: 4
    L2 Cache (per processor): 4 MB
    Memory: 3 GB
    Bus Speed: 1.33 GHz
    Boot ROM Version: MP11.005C.B08
    SMC Version (system): 1.7f10

    I answered my own question - it stopped when I quit IcalExternal sync using the Activity Monitor - so now the answer is why is this service flooding my system with disk read/writes?

  • MICR font not displayed in PDF on SUSE Linux Server for Check Writer (XML)

    We are generating checks by running the Check Writer(XML) concurrent request and are not able to see MICR fonts on the Check. We downloaded the free version from IDAutomationSMICR.ttf and the fonts were registered under /usr/local/fonts/micr directory. I registered in APPS and uploaded the file IDAutomationSMICR.ttf. Am I missing any steps. The DBA's have registered the fonts under /usr/local/fonts/micr on SUSE Linux Server . The custom Checks are generated but no luck with the fonts. Please advise. Can I download MICR fonts other than IDAutomation site? Appreciate your response.
    Thanks,
    Hari

    I use version 11i, so the steps are probably different. Download a font file (gnuMICR for me). Extract it to a location of your choice on your operating system.
    Follow these steps to load the MICR font to the server. (Step 11 was missing in some of the metalink documents in late 2007. I think Jan. 2008 will be OK).
    1.     Log in as XML Publisher Administrator.
    2.     Navigate to Administration->Font Files->Create Font File.
    3.     Fields are Font Name and File. For Font Name choose any descriptive name. File will browse your PC to locate the font file.
    4.     Navigate to Font Mappings->Create Font Mapping Set.
    5.     Mapping name is the name you will give to a set of fonts. [MICR Font]
    6.     Mapping code is the internal name you will give to this set. [MICR]
    7.     Type: 'PDF Form' for PDF templates. 'FO to PDF' for all other template types.
    8.     Create Font Mapping (this allows you to add multiple fonts to a set).
    9.     Font Family is the exact same name you see in Word under Fonts. If you don't use the same name the font will not be picked up at runtime. [GnuMICR]
    10.     Style and weight must also match how you use the font in Windows. Normal and Normal are good defaults. [Normal, Normal]
    11.     DO NOT enter Language or Territory
    12.     Choose a value for Font Type. [Truetype]
    13.     Search for the Font you just created in step 3. [GnuMICR]
    14.     Navigate to Configuration -> FO Processing -> Font Mapping Set. Can also be done at data def and template level under Edit Configuration. Hierarchy is Site-> Data Def -> Template.
    15.     Select your new mapping set.
    16.     Make sure the font is not referenced under File->Properties->Custom in the RTF template file.
    17.     Select a temporary directory on your concurrent processing node (Configuration -> General). This needs to be a private area not shared by other processes, read writeable by the applmgr (owner of the $APPL_TOP file system). It should be fairly large 5 GB or 20x larger than any datafile being used. The fonts will be downloaded here the first time they are used.
    18.     Also at this site level select your font mapping set.
    19.     Upload a template that uses your special font and test using preview.

  • Read of HTTP Request POST parameters failed:Read timed out

    Hi !
    Any one seen this exception . any ideas of the cause?
    java.lang.RuntimeException: Read of HTTP Request POST parameters failed: Read timed out
    at org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpRequestBase.j ava:665)
    at org.apache.catalina.connector.HttpRequestBase.getParameterValues(HttpRequestBase.java :737)
    at org.apache.catalina.connector.RequestFacade.getParameterValues(RequestFacade.java:170 )
    Thanks,

    Assuming there is nothing wrong with
    org.apache.catalina.connector.HttpRequestBase.parseParameters
    I can only think of 2 things:
    1. The timeout is set for an extremely short time in the Apache settings (server.xml&#51032;)
    2. The client application is sending the POST verry slow or incorrect. For example the
    client says that the POST is 500 long than sends 200 and leaves the connection open.
    You can try and post the following:
    request.txt:
    POST /somePath/somefile.js HTTP/1.1
    Host: localhost:44
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 45
    depreciatedButWontPostWithoutAName=some+valueThe client sending the request:
    import java.io.*;
    import java.net.*;
    import java.io.DataOutputStream;
    import java.applet.Applet;
    public class appTest extends Applet implements Runnable {
         public static final int HTTP_PORT = 80;
         public static final String hostName = "localhost";
         public void run() {
              try{
                   InetAddress addr = InetAddress.getByName(hostName);
                   Socket s = new Socket(addr,HTTP_PORT);
                   BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(s.getOutputStream(), "UTF8"));
                   s.setSoTimeout(2000);
                   File fileToSend = new File("request.txt");
                   FileInputStream fleHTML = new FileInputStream(fileToSend);
                   StringBuffer sbHTMFile = new StringBuffer();
                   int b = fleHTML.read();
                   while(b!=-1){
                        sbHTMFile.append((char) b);
                        b = fleHTML.read();
                   wr.write(sbHTMFile.toString());
                   wr.flush();
                   BufferedReader rd = new BufferedReader(new InputStreamReader(s.getInputStream()));
                   String line;
                   while ((line = rd.readLine()) != null) {
                        System.out.println(line);
                   wr.close();
                   rd.close();
                   } catch (Exception e) {
                        e.printStackTrace();
         public void init(){
              new Thread(this).start();
         public appTest(){
              new Thread(this).start();
         // main program
         public static void main(String argv[]) throws Exception {
              new appTest();
    }In appTest.java change HTTP_PORT to the port you need and hostName to the
    hostname you need.
    In request.txt change the /somePath/somefile.js to the location you desire.
    And change Host: localhost:44 to the hostname and post you desire.

  • Problem using saxparser(reading japanese xml file)

    Hi everybody,
    I hav a problem while reading japanese xml file.(UTF-8 charset)
    I have to read the file and process it.
    But in the characters function of the saxparser(defaulthandler) the japanese chatracters are not read properly and the program is
    displaying some junk values(????) instead of the actual japanese characters.
    I am also usind xsd validation.
    I am not able to where the characters manipulation is being done.
    Please help me as soon as possible .
    Thanks in advance,
    Charan.

    There are a couple of things probably going on.
    1) When I've done things using Unicode unusual characters, they do not print properly if you do System.out.println( ). If you have a Gui panel and can put them into a JTextArea or JEditorPane, they may show up properly if you have set the font for that object to one that can display the characters.
    2) Many people starting with SAX write their code assuming that the characters method is only called once for each element that has text content. This is incorrect. The characters method can be called many times, and it is your responsibility to catch all of the data. In 1.4 you can use a StringBuffer, or in 1.5 there is a StringBuilder. You use these to accumulate the data from all of the calls to charactrers() between the startElement and endElement.
    Each parser can decide how often it calls characters, so you have to be able to process data from several calls.
    Dave Patterson

  • How does a servlet read incoming XML??

    how does a servlet read incoming XML??
    thanks in advance
    annie
    Message was edited by:
    annie613

    Hi, anyone have an example code of sending a file to servlet and receiving the file in servlet?
    I have a JUNIT TEST wit the following code:
    ==========================================
                   HttpURLConnection connection = (HttpURLConnection) url.openConnection();
                   connection.setDoOutput(true);
                   connection.setDoInput(true);
                   connection.setAllowUserInteraction(false);
                   connection.setRequestMethod("POST");
                   out = new DataOutputStream(connection.getOutputStream());
                   BufferedReader reader = new BufferedReader(new FileReader(
                             "/Performance.zip"));
                   String line = null;
                   while ((line = reader.readLine()) != null) {
                        out.write((line + "\n").getBytes());
                   out.close();
                   // Read Response
                   InputStream in = connection.getInputStream();
                   int x;
                   while ((x = in.read()) != -1) {
                        System.out.write(x);
                   in.close();
                   BufferedReader r = new BufferedReader(new InputStreamReader(in));
                   StringBuffer buf = new StringBuffer();
                   while ((line = r.readLine()) != null) {
                        buf.append(line);
    =================================================
    and my SERVLET code is like following:
                   ServletInputStream in = request.getInputStream();
                   parameters = request.getParameterMap();
                   path += "file_" + request.getSession().getId() + ".zip";
                   // write the input stream to file
                   OutputStream fileOut = new FileOutputStream(path);
                   CRC32 crc = new CRC32();
                   long size = 0;
                   int read;
                   byte[] buf = new byte[8 * 1024];
                   while ((read = in.read(buf)) != -1) {
                        fileOut.write(buf, 0, read);
                        size += read;
                        crc.update(buf);
    Still when reading the InputStream, nothing is received in the servlet.
    Any idea how to fix it?
    thanks,
    Jari

Maybe you are looking for

  • Can only run one prog at a time

    Sorry for posting this again - I accidentally marked the prev posting as answered and couldn't undo it I'm experiencing a frustration problem. I can't run two adobe programs a the same time - ie, Lightroom and photoshop, After effects and photoshop,

  • Audio Tracks playing but instrument tracks almost mute - anybody had this?

    I have two audio tracks which are playing correctly but the instrment tracks are playing almost mute. I don' tthink I changed anything to cause this to happen... Any ideas? thanks

  • HT5826 How do I change the PDF file name and author?

    I can not seem to find how to change the title and author of a PDF file in ibooks on my mac.

  • Cluster install, high availability

    Hi All, Does anyone have a guide or can detail the steps (differences from a single server install) to install BPC 7.0 Microsoft version in a Cluster Environment(High Availability). Cheers

  • Dynamic Accordion

    Hi -- I would like to build an accordion by iterating through a record set and create the open and close tags for the accordion based on a value in my database. However, when I try using the <cfif>/<cfelse> tags with <cfformgroup> inside I get an err