facebook

Split struts-config-xml with Entities in a technical way

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #212984 Reply

    jschlier
    Member

    Hey all,
    we have to enhance an existing project and would use the MyEclipse struts-config.xml file editor. But there are a problem. The file is splitted in a technical and a professional way. So there are files that only contains the forms for professional part A and another file that contains the forms for professional part B. In addition there are a file for the actions of professional part A or all global forwards.

    the struts-config.xml looks like this and will help you to understand what i mean:

    <?xml version=”1.0″ encoding=”ISO-8859-1″ ?>

    <!DOCTYPE struts-config PUBLIC
    “-//Apache Software Foundation//DTD Struts Configuration 1.1//EN”
    http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd&#8221; [

    <!ENTITY external-globals SYSTEM “struts-config/globals.xml”>
    <!ENTITY external-common-forms SYSTEM “struts-config/common-forms.xml”>

    <!ENTITY external-giro-pk-forms SYSTEM “struts-config/giro-pk-forms.xml”>
    <!ENTITY external-produktverkauf-forms SYSTEM “struts-config/produktverkauf-forms.xml”>
    <!ENTITY external-beratung-forms SYSTEM “struts-config/beratung-forms.xml”>
    <!ENTITY external-service-forms SYSTEM “struts-config/services-forms.xml”>

    <!ENTITY external-common SYSTEM “struts-config/common.xml”>

    <!ENTITY external-giro-pk SYSTEM “struts-config/giro-pk.xml”>
    <!ENTITY external-produktverkauf-anlegen-sparen SYSTEM “struts-config/produktverkauf-anlegen-sparen.xml”>
    <!ENTITY external-produktverkauf-vorsorge SYSTEM “struts-config/produktverkauf-vorsorge.xml”>

    <!ENTITY external-beratung SYSTEM “struts-config/beratung.xml”>

    <!ENTITY external-services SYSTEM “struts-config/services.xml”>
    <!ENTITY external-services-giro SYSTEM “struts-config/services-giro.xml”>
    <!ENTITY external-services-sparen SYSTEM “struts-config/services-sparen.xml”>
    ]>

    <struts-config>

    <form-beans>
    &external-common-forms;
    &external-giro-pk-forms;
    &external-produktverkauf-forms;
    &external-beratung-forms;
    &external-service-forms;
    </form-beans>

    &external-globals;

    <action-mappings>
    &external-common;
    &external-giro-pk;
    &external-produktverkauf-anlegen-sparen;
    &external-produktverkauf-vorsorge;
    &external-beratung;
    &external-services;
    &external-services-giro;
    &external-services-sparen;
    </action-mappings>

    <controller>
    <set-property property=”nocache” value=”true”/>
    </controller>

    <message-resources parameter=”ApplicationResources”/>

    </struts-config>

    Ok, if i want to add struts capabilities, so the folowwing Error occures:

    Invalid struts 1.0 config file found.
    org.jdom.JDOMException: Error in line 7: Relative URI “struts-config/globals.xml”; kann nicht ohne eine Basis-URI aufgelöst werden.

    What does JDOM means with Basis-URI? Is there a way to edit the struts-config content if it is splitted like this?

    Thanks

    #213066 Reply

    Riyad Kalla
    Member

    I will check with the struts developer about this.

    #214020 Reply

    Hello rkalla,
    what does the struts developer think about the problem ?

    Fredy & jschlier

    #214041 Reply

    support-michael
    Keymaster

    Hi Fredy,

    1) The modularized XML file strategy is legitimate. We have a little more research to understand what the JDom complaint is about.

    2) But this structure of file will be incompatible with the MyEclipse Struts tools including the StrutsConfigEditor. The issue with the editor is that is works directly off of the editor’s source instead of an aggregated file with the entity source expanded. The latter would be very challenging for our tooling since it forms a many->1 merged file at edit time. A similar issue arrises with use of the Struts wizards.

    Regards,

    #220285 Reply

    I would like to add that I experience a similar problem with a “generic” XML file modularized just like you mention. So this problem is not Struts-specific. I will post again under a more specific topic.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Split struts-config-xml with Entities in a technical way

You must be logged in to post in the forum log in