Reference faces-config.xml file from java code.

I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
For example:
Navigation Rule:
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pricingEngine</from-outcome>
<to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
Any ideas?

I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
For example:
Navigation Rule:
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>pricingEngine</from-outcome>
<to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
Any ideas?

Similar Messages

  • Generation of xml file from java code

    hi,
    I want to manipulate data in a xml file with java code.I have read data from xml file and also changed it. But i am unable to covert it again in xml file from java code. Can you please tell me how i can do this?

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • How to Generate XML File from Java Code.

    I want to generate the xml file from the java code.
    Could you plz suggest any webSite address with example?

    Here is the code
    import java.io.File;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    public class CreateXML {
         private DocumentBuilderFactory factory = null;
         private DocumentBuilder builder = null;
         private Document document = null;
         public CreateXML() {
              try {
                   factory = DocumentBuilderFactory.newInstance();
                   builder = factory.newDocumentBuilder();
                   document = builder.newDocument();
              } catch (FactoryConfigurationError e) {
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
         /** Creates the document for xml. */
         public Document createDocument(){
              try{               
                   Element root = document.createElement("Root");
                   Element child = document.createElement("child");
                   root.appendChild(child);
                   document.appendChild(root);
              }catch(RuntimeException e){
                   e.printStackTrace();
              return document;
         /** Saves the document as xml. */
         public void saveDocument(Document document){
              try{
                   TransformerFactory transFactory = TransformerFactory.newInstance();
                   Transformer transformer = transFactory.newTransformer();
                   DOMSource source = new DOMSource(document);
                   StreamResult stream = new StreamResult(new File("sample.xml"));
                   transformer.transform(source, stream);
                   System.out.println("XML Created !!");
              }catch(TransformerConfigurationException e){
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
         public static void main(String args[]){
              CreateXML createXML = new CreateXML();
              Document document = createXML.createDocument();
              createXML.saveDocument(document);
    }

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • Creating jsf faces-config.xml file

    Hello.
    I'm a newbee on Sun Java Studio Enterprice and have just converted from Borland Jbuilder.
    In borland, if I create a new "webmodule" and include the jfs library, Borland automaticaly creates the faces-config.xml file for me. The IDE then helps me keep this file up to date.
    After creating a new project in Sun Java Studio Enterprice I have gone into propereties and included the jsf-1_1_01.zip file (I googled jsf library and found this file. If I include this file I get access to the <h: -taglib etc so it seems to be working). But the IDE doesn't create the faces-config.xml file.
    Do I need to create this manually or what do I do wrong?

    As an alternative to Creator (which mostly implies WYSIWYG editing of JSP pages) you can consider NetBeans 5.0 or NetBeans 5.5 Beta. They also support JSF.

  • Problem trying to save the faces-config.xml file (ADF BC)

    When I try to save this file, I get the following error:
    The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.NullPointerException
         at oracle.bm.diagrammer.shape.BaseDiagramEdge.startMove(BaseDiagramEdge.java:2721)
         at oracle.bm.diagrammer.track.MoveTracker.<init>(MoveTracker.java:215)
         at oracle.bm.diagrammer.track.SelectionTracker.mousePressed(SelectionTracker.java:754)
         at oracle.bm.diagrammer.track.ModularTracker.processEvent(ModularTracker.java:191)
         at oracle.bm.diagrammer.track.SelectionTracker.processEvent(SelectionTracker.java:138)
         at oracle.bm.diagrammer.track.TrackerStack.processEvent(TrackerStack.java:389)
         at oracle.bm.diagrammer.BaseDiagramView$53.processEvent(BaseDiagramView.java:719)
         at oracle.bm.diagrammer.PageView$PageViewPanel.fireEvent(PageView.java:2904)
         at oracle.bm.diagrammer.PageView$PageViewPanel.processEvent(PageView.java:3090)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Also, a few of my navigations have the label of "!NLS Error"
    If anyone has any information to help me I would appreciate it, thank you.

    i replaced the "faces-config.oxd_faces" file. it is found under:
    C:\jdevadf\jdev\YourApplication\ViewController\model\public_html\WEB-INF
    if you have an older copy of this file, just replace it, your faces-config.xml file might get moved around, mine took me over an hour to rearrange my page flows but it did the trick.

  • Working with multiple faces-config.xml files

    I would organize the menu definitions of my application in different faces-config.xml files. I would also put the label in different properties files.
    The SRDemo application uses a unique properties file for the menu used in the el expression from the faces-config.xml.
    Is it possible to have the same approach with not only one faces-config.xml file but has many faces-config.xml i want for my application.
    If yes does the binding name to be different or may be the same for each file ?

    We still have a litlle problem we don't find the reason. May be you can help us.
    The second menu level never appear in the menu list. The menu list appear as empty.
    The menu bar seem to be correct. We put twice the same model tree to be sure it was working well. Both menu appears. It is correct.
    Here is our faces-config-menu-flexsystem.xml file
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <description>Create menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Create</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.create']}</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <null-value/>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>linkToCreateNewFlexSystem</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <description>Manage menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Manage</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.manage']}</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <value>\FlexHome.jspx</value>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>linkToManageFlexSystem</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <description>Root menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Root</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>children</property-name>
    <list-entries>
    <value-class>flex.view.util.MenuItem</value-class>
    <value>#{menu_menuitem_FlexSystem_Create}</value>
    <value>#{menu_menuitem_FlexSystem_Manage}</value>
    </list-entries>
    </managed-property>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.root']}</value>
    </managed-property>
    </managed-bean>
    <application>
    <message-bundle>flex.view.resources.MenuFlexSystemProperties</message-bundle>
    <locale-config>
    <supported-locale>fr_CH</supported-locale>
    </locale-config>
    </application>
    <managed-bean>
    <managed-bean-name>resources</managed-bean-name>
    <managed-bean-class>flex.view.util.ResourceAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/FlexHome.jspx</from-view-id>
    <navigation-case>
    <from-outcome>linkToCreateNewFlexSystem</from-outcome>
    <to-view-id>/CreateNewFlexSystem.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/FlexHome.jspx</from-view-id>
    <navigation-case>
    <from-outcome>linkToManageFlexSystem</from-outcome>
    <to-view-id>/ManageFlexSystem.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>menu_FlexSystem</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuTreeModelAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>childProperty</property-name>
    <value>children</value>
    </managed-property>
    <managed-property>
    <property-name>listInstance</property-name>
    <list-entries>
    <value-class>flex.view.util.MenuItem</value-class>
    <value>#{menu_menuitem_FlexSystem_Root}</value>
    <value>#{menu_menuitem_FlexSystem_Root}</value>
    </list-entries>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>menuModel</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuModelAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>viewIdProperty</property-name>
    <value>viewId</value>
    </managed-property>
    <managed-property>
    <property-name>instance</property-name>
    <value>#{menu_FlexSystem.model}</value>
    </managed-property>
    </managed-bean>
    </faces-config>

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • Error message in adf-faces-config.xml file in myEclipse

    hello,
    i'm trying to customize appearance of my JSF/ADF Faces app (which worked fine until now), and tried to insert a adf-faces-config.xml file in my WEB-INF directory, this is it (copied from a tutorial) :
    <?xml version="1.0"?>
    <adf-faces-config xmlns="http://xmlns.oracle.com/adf/view/faces/config">
    <!-- Enable debug output -->
    <debug-output>true</debug-output>
    <!-- Pick accessibility options based on a per-user managed bean -->
    <accessibility-mode>#{user.accessibilityMode}</accessibility-mode>
    <!-- A silly use of EL: English users get one appearance, -->
    <!-- others get another -->
    <skin-family>
    #{view.locale.language=='en' ? 'minimal' : 'oracle'}
    </skin-family>
    </adf-faces-config>
    after saving the file (in myEclipse) i get the following error message on the second line :
    cvc-elt.1 : Cannot find the declaration of element 'adf-faces-config'
    what does that mean and what should i do ?
    thx...

    hello,
    i'm trying to customize appearance of my JSF/ADF
    Faces app (which worked fine until now), and tried to
    insert a adf-faces-config.xml file in my WEB-INF
    directory, this is it (copied from a tutorial) :
    <?xml version="1.0"?>
    <adf-faces-config
    xmlns="http://xmlns.oracle.com/adf/view/faces/config">
    <!-- Enable debug output -->
    <debug-output>true</debug-output>
    <!-- Pick accessibility options based on a per-user
    managed bean -->
    <accessibility-mode>#{user.accessibilityMode}</accessi
    bility-mode>
    <!-- A silly use of EL: English users get one
    appearance, -->
    <!-- others get another -->
    <skin-family>
    #{view.locale.language=='en' ? 'minimal' : 'oracle'}
    </skin-family>
    </adf-faces-config>
    after saving the file (in myEclipse) i get the
    following error message on the second line :
    cvc-elt.1 : Cannot find the declaration of element
    'adf-faces-config'
    what does that mean and what should i do ?
    thx...Hello again,
    i'm still stuck with this, could somebody PLEASE give me a hint ?
    thx,
    dom.

  • The Managed Bean in the faces-config.xml File

    I am still very new to JSF. I am confused about the managed bean.
    For example, I have a button in my web page. A click on this button invokes an action; say, ListAction.java.
    In this ListAction class, I instantiate a business delegate; say, ListPersonnel.java and call a method in this business delegate to return an ArrayList: personnel. Of course, this business delegate goes through facade, DAO, etc. to populate the ArrayList. This ArrayList is a collecation of a JavaBean called PersonnelBean that gets and sets a number of personnel information; such as ssn, name, etc.
    Upon this ArrayList is successfully populated and received by the ListAction class, I am going to display a web page with a table. In JSF, it is <h:dataTable ...>.
    My questions are regarding the managed bean in the faces-config.xml file.
    1. Which one is my <managed-bean-class>? packageName.ListAction? or packageName.PersonnelBean? or something else?
    2. What should be my <managed-bean-name>? I guess that I can give a name I like. Is it right? What about xyz?
    3. Then, how do I specify the "value" attribute of my <h:dataTable ...> tag when I display a web page to show the data table? Is it correct to specify value="#{xyz.personnel}"? What is the correct specification if it is wrong?
    4. I guess that I can give any name to the "var" attribute in the <h:dataTable ...> tag. Is it right?

    1. Which one is my <managed-bean-class>?
    packageName.ListAction? or
    packageName.PersonnelBean? or something else?ListAction
    2. What should be my <managed-bean-name>? I guess
    that I can give a name I like. Is it right? What
    about xyz?Anything you like. xyz is OK.
    3. Then, how do I specify the "value" attribute of my
    <h:dataTable ...> tag when I display a web page to
    show the data table? Is it correct to specify
    value="#{xyz.personnel}"? What is the correct
    specification if it is wrong?xyz.personnel is OK assuming that ListAction class has a public
    method getPersonnel() which returns the ArrayList of PersonnellBeans.
    4. I guess that I can give any name to the "var"
    attribute in the <h:dataTable ...> tag. Is it right?Yes, you can give any name you like.

  • Error with adf-faces-config.xml file in myEclipse

    hello,
    i'm trying to customize appearance of my JSF/ADF Faces app (which worked fine until now), and tried to insert a adf-faces-config.xml file in my WEB-INF directory, this is it (copied from a tutorial) :
    <?xml version="1.0"?>
    <adf-faces-config xmlns="http://xmlns.oracle.com/adf/view/faces/config">
    <!-- Enable debug output -->
    <debug-output>true</debug-output>
    <!-- Pick accessibility options based on a per-user managed bean -->
    <accessibility-mode>#{user.accessibilityMode}</accessibility-mode>
    <!-- A silly use of EL: English users get one appearance, -->
    <!-- others get another -->
    <skin-family>
    #{view.locale.language=='en' ?  'minimal' : 'oracle'}
    </skin-family>
    </adf-faces-config>
    after saving the file (in myEclipse) i get the following error message on the second line :
    cvc-elt.1 : Cannot find the declaration of element 'adf-faces-config'
    what does that mean and what should i do ?
    thx...

    hello,
    i'm trying to customize appearance of my JSF/ADF
    Faces app (which worked fine until now), and tried to
    insert a adf-faces-config.xml file in my WEB-INF
    directory, this is it (copied from a tutorial) :
    <?xml version="1.0"?>
    <adf-faces-config
    xmlns="http://xmlns.oracle.com/adf/view/faces/config">
    <!-- Enable debug output -->
    <debug-output>true</debug-output>
    <!-- Pick accessibility options based on a per-user
    managed bean -->
    <accessibility-mode>#{user.accessibilityMode}</accessi
    bility-mode>
    <!-- A silly use of EL: English users get one
    appearance, -->
    <!-- others get another -->
    <skin-family>
    #{view.locale.language=='en' ? 'minimal' : 'oracle'}
    </skin-family>
    </adf-faces-config>
    after saving the file (in myEclipse) i get the
    following error message on the second line :
    cvc-elt.1 : Cannot find the declaration of element
    'adf-faces-config'
    what does that mean and what should i do ?
    thx...Hello again,
    i'm still stuck with this, could somebody PLEASE give me a hint ?
    thx,
    dom.

  • Navigation Rule not found in faces-config.xml file

    Hi All,
    I have a B2C custom Webshop application where in the startpage i have a client logo and when i click on that it will navigate to another page for that i have a header.xhtml page in that i have a code <h:link id="iLkL" outcome="toStartPage" value="#{i18n['main.ui.header.logo']}" styleClass="fw-header-logo"> but i was unable to find  <Navigation-rule> of  toStartPage which is mentioned in the outcome="toStartPage" in the faces-config.xml file. I have checked in the standard component also but didn't find anything. Please help me where can i find the toStartpage value.
    Regards,
    Rahul.

    Hi Rahul,
    As correctly mentioned by Steffen earlier, the navigation targets are maintained in the ui-repository.xml files (or navigation-rules.xml files) for each module. Since, you would like to see the definition of the target toStartPage (which is a target accessible and relevant throughout the application), it should be in the WEC main module's (wec/~/main/ui) ui-repository.xml file. Please note that sometimes, the targets are maintained in a file called navigation-rules.xml, which itself is then included into the ui-reppsitory.
    Please let me know if you got what you need here.
    Best Regards
    Pranshu Agarwal

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • Issue with faces-config.xml file

    Hi,
    I'm working on a project which needs more no. of JSF Pages and JSF Navigations,
    But when i trying to creat pages more than 25 pages,the process becoming too slow,does this
    effects the Application performance?Can any one suggest me why it happens and what are the
    limitations for creating the JSF pages.
    Does their any alternative to solve this Issue,I'm thing to create more faces-config.xml files as the
    Jsf pages increases,does this solves?
    Please suggest me.
    Thank you,
    Bandaru,

    Hi Bandaru,
    Are you trying to use the visual diagram option of faces-config? Coz i encountered difficulties when using it with many pages (more than 40) and the faces-config.oxd_faces was no longer able to support the diagram. "Solution" was to use only the overview and the sources of the faces-config. I don't know exactly but my problems were caused by the faces-config.oxd_faces and i don't think it affects performances for the application.
    For information, that was on a Jdev 10.1.3.0.4
    Regards,
    Tif

Maybe you are looking for