Java tags in the include files

Hi.. I have a code for javatag, which works well if you put it directly into the jsp.. But, if I try to put it as part of the include file, called from the same jsp there is no luck. Code would not be executed. I am using WebSphere server. If any one has any ideas how to make it work, would be greatly appreciated!
Thank you very much in advance !!
Hanna

Hi.. thank you for trying to help me!!
More details on my problem.. In my application I have a jsp which pworks like a template. We plag in it top nav bar, left nav bar and a content into it. All those three components are include files (HTML + JavaScript content) with extention *.inc.
To get those files into the jsp, I am using
<jsp:include page="abc.inc" flush="true"/>
Because they are not JSPs, I can't use
<%@ include file="/abc.jsp"%>
Problem is when I put custom tag
<ibmstore:getMyTag param="ABCD"/>
directly in the JSP, I can see the result perfectly..
But if the same code is inside abb.inc, java code is not executed. There is no error, it is being ignored, only in the source I can see the code. And I do need that tag
be inside the abc.inc :((
thank you!!!

Similar Messages

  • UIX: Problem with the include file

    Hello,
    I am totally lost here. I am trying to follow the example of including a code snippet in an uix file from the user guide at: http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/includes.html
    The parent file that I have is as follows ( test.uix )
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="test"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <pageLayout title="test">
    <corporateBranding>
    <image source="" destination="http://oracle.com"/>
    </corporateBranding>
    <productBranding>
    <image source="" destination="http://oracle.com"/>
    </productBranding>
    <tabs>
    <tabBar>
    <contents>
    <link text="tab1" destination=""/>
    </contents>
    </tabBar>
    </tabs>
    <pageHeader>
    <globalHeader>
    <contents>
    <link text="page header" destination=""/>
    </contents>
    </globalHeader>
    </pageHeader>
    <globalButtons>
    <include ctrl:node="testinclude"/>
    </globalButtons>
    <copyright>
    <styledText text="Copyright Oracle 2006"
    styleClass="OraCopyright"/>
    </copyright>
    <privacy>
    <link text="Privacy Statement" destination=""/>
    </privacy>
    <contents/>
    <pageButtons/>
    <start/>
    <end/>
    <about/>
    </pageLayout>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    The include file that I have is as follows ( testinclude.uix )
    <?xml version="1.0" encoding="windows-1252"?>
    <globalButtonBar xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <globalButton text="first button"/>
    <globalButton text="second button"/>
    </contents>
    </globalButtonBar>
    When I try to compile the test.uix ( which is my parent file ) I get the following error message:
    Warning(45,59): test.uix: Parsing error, line 45, column 59: attributes in the namespace:http://xmlns.oracle.com/uix/ui are only allowed with the "data" expressionLanguage
    How can I resolve this ?
    This is what I am trying to do - and maybe there is a better way:
    I have an application with two tabs, each tab has two (or more) subTabs/PageHeaders. Each pageHeader has a sideNav with atleast three elements. Each of the element goes to a differnt page. So far I have managed to create a template for the tabs and the pageHeaders. I do the switch for the pageheaders using the switcher element with the tabSelectedIndex as my "case". However I could not figure out a way to do the switcher based on the tab and the page header selected ( two conditions ), hence I thought of writing an include file with the sideNav and including it in the code corresponding to the page headers ( the code that I have posted is a very simple globalButton include - this is the most simplest thing that I could think of to experiment )
    Thanks !

    Perhaps if you try like this
    <sideBar rendered="${uix.rootAttr.indiceTopo != -1}" width="220">
    <contents>
    <include rendered="${uix.rootAttr.indiceTopo == 0}"
    node="${ctrl:parsePage(uix,'/MeuAmbiente/menuMeuAmbiente')}"/>
    <include rendered="${uix.rootAttr.indiceTopo == 1}"
    node="${ctrl:parsePage(uix,'/Declaracao/menuDeclaracao')}"/>
    note , this include tag is inside one mainTemplate.uit and see the rendered atribute is passed by parameter to this template.
    As a metter of fact menuMeuAmbiente.uix is only the stiledlist tag and it's styledItens, i have one menu<Module>.uix for each superior tab
    I hope this helps;

  • How about adding a meta tag to the index file.....

    This is another way to get verified with Google and other search engines. Does anyone know a way that you could add a meta tag to the index file generated by iweb??
    Thanks for any help....Matt
    http://www.want2takecredit.com

    I'm glad it worked. Nevertheless you might think of uploading an html file as well. The index.html sometimes gets overwritten by iweb, thus the meta-tag would disappear and you would have to do it again. The html file instead stays where it is.
    Here's how to procede:
    When they will ask you to verify that it really is your website. “Choose verification method” select “Upload an HTML file” and now you will have to build that verification file (here’s a How-to by Roddy).
    1. Go to your applications folder and launch Text Edit.
    2. Don't put anything on the blank page.
    3. Select File/Save As.
    4. In the popup window "Save As" box enter your Google number (something like google05a23d347cXXXXXX )
    5. In the "Where" box select desktop.
    6. In "File Format" menu select HTML.
    7. Click "Save".
    8. A file will appear on your desktop called google05a23d347cXXXXXX.html
    9. This is what you upload to your server or iDisk.
    Upload that file to your main folder on your server so that it will be http://www.yoururl.com/google05a23d347cXXXXXX.html (not in the subfolder of the Sites folder named with the title of your site...*).
    For .Mac go to the Finder menu and select Go/iDisk/My iDisk/ or hit SchiftCommand(Apple)i and then go to /Web/Sites/. Drop your file into the "Sites" folder
    Entering: http://web.mac.com/username/google05a23d347cXXXXXX.html in your browser should bring up this file. If it doesn’t you placed the file in the wrong location.
    Entering: http://yourbaseurl.com/google05a23d347cXXXXXX.html in your browser should bring up this file. If it doesn’t you placed the file in the wrong location.
    Regards,
    Cédric
    +I just noticed your other posts on the forum and that you got it solved I'll leave the explanation for other people wondering and stumbling over the thread+

  • Instance variable to hold the element of a tag in the xml file

    Hi I have an xml file that is handled using this parser
    <attr id="MY_NAME" >
    this parser hanled the above tag but now I want to have it handle
    <attr id="MY_NAME" desc="GOOD">
    but I need to create an instance variable to handle the desc element in the attr tag .
    Can some one help me out as this is not my file and I am having trouble to do please......
    import java.util.*;
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
       The SupportMatrix class provides static variables and methods to simplify
       the determination of whether or not a given attribute is supported for a
       certain object type (queue manager, channel, etc.), depending on the version
       and platform of the queue manager to which it belongs.
       The SupportMatrix class may not be instantiated. Its constructor is private.
       An instance of the class is created internally in the static initializer so
       that the XML parsing methods are available.
       A corresponding XML document, SupportMatrix.xml, is parsed to create the various
       HashMaps which contain the version/platform dependency information. A number of
       inner classes are used to represent the various elements of the XML matrix
       definition.
       Here's a sample document:
       <!-- The supportmatrix tag opens the document -->
       <supportmatrix>
         <!-- Objects are keyed by classid. "1" is the classid of a queue manager object. -->
         <object classid="1">
           <!-- Versions group attributes according to the queue manager version where they
                were introduced. The "base" cmdlevel encompasses all versions up to 5.1. -->
           <version cmdlevel="base">
             <!-- Attributes are defined by the attr tag. -->
             <attr id="MQCA_Q_MGR_NAME">
               <!-- Support elements define the platform-specific requirements for an attribute. -->
               <support platforms="UNIX,WINDOWS,OS400,VMS,NSK" maxlen="48" type="MQCFST"/>
               <support platforms="MVS" maxlen="4" type="MQCFST"/>
             </attr>
             <attr id="MQCA_Q_MGR_DESC">
               <!-- Specific attribute characteristics, most notably maximum len for string parms,
                    are defined in the support element. As shown in the following example, it may
                    apply to all platforms. -->
               <support platforms="all" maxlen="64" type="MQCFST"/>
             </attr>
             <!-- Support elements are optional. -->
             <attr id="MQIA_PLATFORM"/>
             <attr id="MQIA_COMMAND_LEVEL"/>
           </version>
           <!-- The version element may 'include' other versions. Note that object elements
                may also refer to other objects via the 'include' parm of the object tag.
                This is to allow common attributes (especially for queues and channels) to
                be shared by multiple definitions in order to reduce some of the
                redundancy. -->
           <version cmdlevel="520" include="base">
           </version>
         </object>
       </supportmatrix>
       The inner classes, and their hierarchical relationships are as follows:
         SupportObject - corresponds to the <object> element. Stored in a static HashMap, and
                         keyed by classid.
           VersionObject - corresponds to the <version> element. Stored in a HashMap instance
                           variable of the SupportObject class, keyed by cmdlevel.
             AttributeObject - corresponds to the <attr> element. Stored in a HashMap instance
                               variable of the VersionObject class, keyed by attribute name.
               PlatformObject - corresponds to the <support> element. Stored in HashMaps belonging
                                to the AttributeObjects, keyed by platform. A single PlatformObject
                                instance is created when the support tag is encountered. The
                                "platforms" attribute of the support element is then processed. For
                                each platform in the comma-delimited list, an entry is added to the
                                collection of PlatformObjects. This is to greatly simplify later
                                lookups.
       In order to support the 'include' feature of object and version elements, certain
       functions are recursive. If the attribute to be validated is not found for the passed
       cmdlevel, the 'parent' VersionObject is consulted by means of the 'include' value. If
       the chain of VersionObjects has been exhausted and the attribute in question has still not
       been located, the next SupportObject in the chain is consulted in a similar fashion.
    public class SupportMatrix extends DefaultHandler {
        /** The objects collection holds all the SupportObjects, keyed by classid. */
        private static HashMap objects;
        /** xmlFile will name the xml document to be parsed. Note that using the
            default class loader expects the string to be the path to the file. It must
            NOT begin with the '/' character. */
        private static String xmlFile =
            ResourceManager.getApplicationProperties().getProperty("SupportMatrixFile");
        private Stack stack;
        /** This static initializer allocates the static objects collection, creates an
            instance of the SupportMatrix class for xml parsing purposes, and initiates
            the parse operation to populate the collection. */
        static {
            objects = new HashMap();
            // Create a parser and process the xml doc
            SupportMatrix handler = new SupportMatrix();
            InputSource is = null;
            try {
                is = new InputSource(ClassLoader.getSystemClassLoader().getResourceAsStream(xmlFile));
                XMLReader xmlReader =
                    SAXParserFactory.newInstance().newSAXParser().getXMLReader();
                xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
                xmlReader.setContentHandler(handler);
                if (is == null) {
                    System.err.println("No input stream, dammit");
                xmlReader.parse(is);
            } catch(Exception e) {
                e.printStackTrace();
        /** Private constuctor, used only for XML parsing. */
        private SupportMatrix() {
            stack = new Stack();
        /** Add a SupportObject instance to the objects collection. */
        private void addObject(SupportObject obj) {
            String key = obj.getClassId();
            objects.put(key, obj);
        /* DefaultHandler methods                                              */
        /** Not used. */
        public void characters(char[] ch, int start, int length) {}
        /** Not used. */
        public void endDocument() {}
        /** For the version, object, and attr elements, pop the top element of the stack. */
        public void endElement(String uri, String localName, String qName) {
            if (localName.equals("version") || localName.equals("object") || localName.equals("attr")) {
                stack.pop();
        /** Not used. */
        public void setDocumentLocator(Locator locator) {}
        /** Not used. */
        public void startDocument() {}
        /** Most of the work is done here. Create the appropriate inner class instance for
            element; for object, version, and attr, push the element onto the stack so that
            child elements may be added to their collections as needed. */
        public void startElement(String uri, String localName, String qName,
                                 Attributes attributes) {
            String include = attributes.getValue("include");
            if (localName.equals("object")) {
                SupportObject obj = new SupportObject(attributes.getValue("classid"), include);
                addObject(obj);
                stack.push(obj);
            } else if ( localName.equals("version")) {
                VersionObject ver = new VersionObject(attributes.getValue("cmdlevel"), include);
                ((SupportObject)stack.peek()).addVersion(ver);
                stack.push(ver);
            } else if ( localName.equals("attr")) {
                AttributeObject a = new AttributeObject(attributes.getValue("id"));
                //String desc = StringFactory.getString(attributes.getValue("desc"));
                //if(desc != null)
                   //     a.setAttribute();
                String readonly = attributes.getValue("readonly");
                String exclude = attributes.getValue("exclude");
                if (include != null && exclude != null) {
                    Log.log(Log.ERROR, this, "include and exclude are mutually exclusive, exclude value ignored");
                    exclude = null;
                if (include != null) {
                    a.setCondition(include, true);
                if (exclude != null) {
                    a.setCondition(exclude, false);
                if (readonly != null)
                    a.setReadonly(readonly.equals("y"));
                ((VersionObject)stack.peek()).addAttr(a);
                stack.push(a);
            } else if (localName.equals("support")) {
                String platforms = attributes.getValue("platforms");
                String readonly = attributes.getValue("readonly");
                String maxlen = attributes.getValue("maxlen");
                String type = attributes.getValue("type");
                int attrType = 0;
                if (type != null) {
                    if (type.equals("MQCFIN")) {
                        attrType = CMQCFC.MQCFT_INTEGER;
                    } else if (type.equals("MQCFIL")) {
                        attrType = CMQCFC.MQCFT_INTEGER_LIST;
                    } else if (type.equals("MQCFST")) {
                        attrType = CMQCFC.MQCFT_STRING;
                    } else if (type.equals("MQCFSL")) {
                        attrType = CMQCFC.MQCFT_STRING_LIST;
                    } else if (type.equals("EXBIN")) {
                        attrType = MqcConstants.EXCFT_BINARY;
                    } else if (type.equals("EXPCF")) {
                        attrType = MqcConstants.EXCFT_PCF;
                PlatformObject p = null;
                if (readonly == null) {
                    p = new PlatformObject(platforms);
                } else {
                    p = new PlatformObject(platforms, readonly.equals("y"));
                String exclude = attributes.getValue("exclude");
                if (include != null && exclude != null) {
                    Log.log(Log.ERROR, this, "include and exclude are mutually exclusive, exclude value ignored");
                    exclude = null;
                if (include != null)
                    p.setCondition(include, true);
                if (exclude != null)
                    p.setCondition(exclude, false);
                if (attrType != 0)
                    p.setType(attrType);
                if (maxlen != null)
                    p.setLen(Integer.parseInt(maxlen));
                ((AttributeObject)stack.peek()).addPlatform(p);
        public static boolean isExported(int attribute, TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isExported(name, node);
        public static boolean isExported(String attribute, TopologyModelNode node) {
            // Find the qmgr node to fetch platform and cmdlevel
            TopologyModelNode qmgr = node.getModel().getQMgrNode(node.getAddress());
            // If there's no qmgr for this node, it must be one of 'ours'.
            if (qmgr == null)
                return false;     // None of 'our' objects can be exported to MQSC.
            String classId = node.getClassId();
            String cmdLevel = qmgr.getAttributeValue("MQIA_COMMAND_LEVEL");
            String platform = qmgr.getAttributeValue("MQIA_PLATFORM");
            return isExported(attribute, classId, cmdLevel, platform, node);
        public static boolean isExported(int attribute, String classId, String cmdLevel, String platform,
                                         TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isExported(name, classId, cmdLevel, platform, node);
        /** Determine if an attribute is exportable. The attribute name, the classid of the object to
            which it belongs, plus the command level and platform of the queue manager are all needed
            to make this determination.
            Start by finding the AttributeObject for the combination of attribute, classid, and
            command level. If we can't find the AttributeObject, we assume that the attribute
            is not exported. Otherwise, find out if it is exportable for the selected platform.
        public static boolean isExported(String attribute, String classId, String cmdLevel, String platform,
                                         TopologyModelNode node) {
            AttributeObject attr = getAttributeObject(attribute, classId, cmdLevel);
            if (attr == null) {
                return false;
            } else {
                return attr.isExported(platform, node);
        public static boolean isSupported(int attribute, TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isSupported(name, node);
        public static boolean isSupported(String attribute, TopologyModelNode node) {
            // Find the qmgr node to fetch platform and cmdlevel
            TopologyModelNode qmgr = node.getModel().getQMgrNode(node.getAddress());
            // If there's no qmgr for this node, it must be one of 'ours'.
            if (qmgr == null)
                return true;
            String classId = node.getClassId();
            String cmdLevel = qmgr.getAttributeValue("MQIA_COMMAND_LEVEL");
            String platform = qmgr.getAttributeValue("MQIA_PLATFORM");
            return isSupported(attribute, classId, cmdLevel, platform);
        public static boolean isSupported(int attribute, String classId, String cmdLevel, String platform) {
            String name = ResourceManager.getAttributeName(attribute);
            return isSupported(name, classId, cmdLevel, platform);
        /** Determine if an attribute is supported. The attribute name, the classid of the object to
            which it belongs, plus the command level and platform of the queue manager are all needed
            to make this determination.
            Start by finding the SupportObject for the classid. If it isn't there, we make the assumption
            (for now) that the attribute is supported. The only classids for which this can occur are
            broker, agent, and the various container objects.
            Propagate the isSupported request to the chain of SupportObjects (based on 'include' values)
            until we get a 'true' result or we run out of SupportObjects. */
        public static boolean isSupported(String attribute, String classId, String cmdLevel, String platform) {
            if (attribute == null)
                return false;
            SupportObject obj = (SupportObject)objects.get(classId);
            // If the object type isn't even in the support matrix, we interpret that to
            // mean that it's a Broker or Agent, in which case all attributes are supported
            // at present.
            if (obj == null)
                return true;
            boolean result = false;
            while (result == false && obj != null) {
                result = obj.isSupported(attribute, cmdLevel, platform);
                if (result == false && obj.getInclude() != null) {
                    obj = (SupportObject)objects.get(obj.getInclude());
                } else
                    obj = null;
            return result;
        /** Locate an AttributeObject for a given attribute name, object type, and command level.
            This is a helper function for the getMaxLen and getType methods. */
        private static AttributeObject getAttributeObject(String attr, String classID, String cmdLevel) {
            AttributeObject result = null;
            SupportObject obj = (SupportObject)objects.get(classID);
            while (result == null && obj != null) {
                result = obj.getAttr(attr, cmdLevel);
                if (result == null && obj.getInclude() != null) {
                    obj = (SupportObject)objects.get(obj.getInclude());
                } else
                    obj = null;
            return result;
        /** Determine the maximum length for a given combintation of attribute name, object type,
            command level, and platform. If the AttributeObject can't be found, or if the length
            hasn't been set, return -1. */
        public static int getMaxLen(String attr, String classId, String cmdLevel, String platform) {
            AttributeObject a = getAttributeObject(attr, classId, cmdLevel);
            if (a == null)
                return -1;
            return a.getMaxLen(platform);
        /** Determine the PCF parm type for a given combintation of attribute name, object type,
            command level, and platform. If the AttributeObject can't be found, or if the length
            hasn't been set, return -1. */
        public static int getType(String attr, String classId, String cmdLevel, String platform) {
            AttributeObject a = getAttributeObject(attr, classId, cmdLevel);
            if (a == null)
                return -1;
            return a.getType(platform);
        /** Inner class to contain platform-specific info for an attribute. */
        class PlatformObject {
            /** This instance variable will contain the comma-delimited string of all
                platforms to which this object applies. */
            private String platform;
            private int maxlen;
            private String condition = null;
            private boolean include;
            private boolean readonly;
            private boolean lenSet;
            private int attrType;
            private boolean typeSet;
            public PlatformObject(String p, boolean readonly) {
                platform = p;
                this.readonly = readonly;
                lenSet = false;
                typeSet = false;
            public PlatformObject(String p) {
                this(p, false);
            public void setCondition(String condition, boolean include) {
                this.condition = condition;
                this.include = include;
            public boolean isReadonly() {
                return readonly;
            public boolean isExported(TopologyModelNode node) {
                if (condition != null) {
                    boolean test = false;
                    try {
                        test = Utilities.evaluateCondition(node, condition);
                    } catch (Exception e) {}
                    if (include ^ test)
                        return false;
                return !readonly;
            public void setLen(int len) {
                maxlen = len;
                lenSet = true;
            public void setType(int type) {
                attrType = type;
                typeSet = true;
            public String getPlatform() {
                return platform;
            public int getMaxLen() {
                if (!lenSet)
                    return -1;
                return maxlen;
            public int getType() {
                if (!typeSet)
                    return -1;
                return attrType;
        /** This class represents a specific MQSeries attribute. It can optionally contain
            instances of the PlatformObject class as needed. When the 'platforms' collection
            is empty, the attribute is supported on all platforms. It is also possible to
            include a PlatformObject for the 'all' platform, if specific attribute characteristics
            need representation. When the 'platforms' collection is non-empty, it will include one
            entry for each platform where the attribute is supported. */
        class AttributeObject {
            private String attribute;
            private String attrValue;
            private HashMap platforms;
            private String condition = null;
            private boolean include;
            private boolean readonly = false;
            public AttributeObject(String a) {
                this(a, false);
            public AttributeObject(String a, boolean readonly) {
                attribute = a;
                platforms = new HashMap();
                this.readonly = readonly;
            public void setCondition(String condition, boolean include) {
                this.condition = condition;
                this.include = include;
            public void setReadonly(boolean readonly) {
                this.readonly = readonly;
            public boolean isReadonly() {
                return readonly;
            public void addPlatform(PlatformObject p) {
                for (StringTokenizer st = new StringTokenizer(p.getPlatform(), ","); st.hasMoreTokens() ;) {
                    platforms.put(st.nextToken(), p);
            public PlatformObject getPlatform(String platform) {
                PlatformObject p = (PlatformObject)platforms.get(platform);
                if (p == null)
                    p = (PlatformObject)platforms.get("all");
                return p;
            public String getAttribute() {
                return attribute;
            public int getMaxLen(String platform) {
                PlatformObject p = getPlatform(platform);
                if (p == null)
                    return -1;
                return p.getMaxLen();
            public int getType(String platform) {
                PlatformObject p = getPlatform(platform);
                if (p == null)
                    return -1;
                return p.getType();
            public boolean isSupported(String platform) {
                if (platforms.isEmpty()) {
                    return true;
                if (platforms.containsKey(platform)) {
                    return true;
                if (platforms.containsKey("all")) {
                    return true;
                return false;
            public boolean isExported(String platform, TopologyModelNode node) {
                if (readonly) {
                    Log.log(Log.DEBUG, this, attribute + " is readonly, returning false");
                    return false;
                if (condition != null) {
                    Log.log(Log.DEBUG, this, "Testing condition = " + condition);
                    boolean test = false;
                    try {
                        test = Utilities.evaluateCondition(node, condition);
                        Log.log(Log.DEBUG, this, "Condition result is " + test);
                    } catch (Exception e) {
                        Log.log(Log.ERROR, this, "Condition through an exception");
                    if (include ^ test)
                        return false;
                if (platforms.isEmpty()) {
                    return true;
                PlatformObject p = getPlatform(platform);
                if (p == null) {
                    Log.log(Log.DEBUG, this, platform + " not found for " + attribute + ", returning false");
                    return false;
                return p.isExported(node);
        /** This class represents a specific value of a queue manager's command level. A
            given instance of this class may 'include' a 'parent' instance through its
            include instance variable. The traversal of the parent/child hierarchy is
            delegated to the SupportObject class, since that is where the collection of
            VersionObjects lives. */
        class VersionObject {
            private String cmdLevel;
            private String include;
            private HashMap attributes;
            public VersionObject(String cmdLevel, String include) {
                this.cmdLevel = cmdLevel;
                this.include = include;
                attributes = new HashMap();
            public void addAttr(AttributeObject attr) {
                attributes.put(attr.getAttribute(), attr);
            public AttributeObject getAttr(String attr) {
                return (AttributeObject)attributes.get(attr);
            public String getCmdLevel() {
                return cmdLevel;
            public String getInclude() {
                return include;
            public boolean isSupported(String attr, String platform) {
                AttributeObject obj = (AttributeObject)attributes.get(attr);
                if (obj == null) {
                    return false;
                } else
                    return obj.isSupported(platform);
        /** This class represents an MQSeries object type, as identified by its classid, e.g.
            queue manager or local queue. This class implements an include facility similar to
            that described for the VersionObject. The traversal of that hierarchy is delegated
            to the static isSupported method, because the collection of SupportObject instances
            is a static variable of the SupportMatrix class. */
        class SupportObject {
            private String classId;
            private String include;
            private HashMap versions;
            public SupportObject(String classId, String include) {
                this.classId = classId;
                this.include = include;
                versions = new HashMap();
            public void addVersion(VersionObject obj) {
                String key = obj.getCmdLevel();
                versions.put(key, obj);
            public String getClassId() {
                return classId;
            public String getInclude() {
                return include;
            public boolean isSupported(String attr, String cmdLevel, String platform) {
                boolean result = false;
                VersionObject obj = (VersionObject)versions.get(cmdLevel);
                if (obj == null)
                    obj = (VersionObject)versions.get("base");
                // I don't actually know what it means if obj is null at this point.
                // It probably can't happen.
                if (obj == null)
                    return false;
                while (result ==  false && obj != null) {
                    result = obj.isSupported(attr, platform);
                    if (result == false && obj.getInclude() != null) {
                        obj = (VersionObject)versions.get(obj.getInclude());
                    } else
                        obj = null;
                return result;
            public AttributeObject getAttr(String attr, String cmdLevel) {
                AttributeObject result = null;
                VersionObject obj = (VersionObject)versions.get(cmdLevel);
                if (obj == null)
                    obj = (VersionObject)versions.get("base");
                // I don't actually know what it means if obj is null at this point.
                // It probably can't happen.
                if (obj == null)
                    return null;
                while (result ==  null && obj != null) {
                    result = obj.getAttr(attr);
                    if (result == null && obj.getInclude() != null)
                        obj = (VersionObject)versions.get(obj.getInclude());
                    else
                        obj = null;
                return result;
    }

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

  • Jsp ok but IDE display errors in javascript+tags and taglibs include file

    Hi,
    The JDev 10.1.3 IDE display errors on running JSP in following cases:
    1) When tag libs declaration in include file.
    2) When jstl/struts tags are used in javascript
    JDev 10.1.2 didn't diplay those errors
    More details:
    extracts:
    Type of error: Character data not allowed in head
    alert("Your session has been closed automatically after a long period of inactivity.\nOR\nYou used an invalid or old bookmark.");
    javascript comments: (use for debugging)
    // alert("agt: "+agt+", is_ie: "+is_ie);
    Type of error: element <used tag> not expected here
    <fmt:bundle basename="com.photoswing.webview.MainshopAppMessageResources">
    alert("<fmt:message key="alert.timeout.noRedirection"/>");
    </fmt:bundle>
    JDev 10.1.3 has no javascript editor, so it should ignore the content of <script> .. </script>
    Regards
    Fred

    Hi,
    Same message but with formatting tags.
    Closing tag is [ / code ] without blanks.
    Thanks to Didier,
    IDE displayed errors => jsp runs and compiles ok.
    It is not obvious to reproduce those errors because they vary upon external or internal tag declaration.
    Remark:
    I tried replacing jsp tag declaration:
    <%@ include file="../../helper/TagLibsInclude.jsp"%>by simple file but it doesn't help:
    <%@ include file="../../srcInclude/tagLibs.inc"%>Case 1) all tag declaration are external but jstl c and fmt also internal:
    <%@ include file="../../helper/TagLibsInclude.jsp"%>  
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>Element c:out not expected:
    =====================
    <c:set var="numberOfRows">
      <c:out value="${bindings.LoadedPhotos}" />
    </c:set>Element logic:messagesPresent not expected
    ==================================
         </tr>
        <logic:messagesPresent message="true" >
            <html:messages message="true" id="msg">
             <tr>
              <td colspan="5" class="txtMed txtBold">
                 <c:out value="${msg}"/><br/>
              </td>
             </tr>
            </html:messages>
        </logic:messagesPresent>
        <tr>Element fmt:param not expected .
    ========================
                  <fmt:message key="event.photoCommentInLang.prompt">
                   <fmt:param value="${pageScope.langName1}"/>
                  </fmt:message>
    ..Case 2) all tag declaration are external
    Element set not expected .
    ===================
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <c:set var="sourceId" value="${bindings.EventId.attributeValue}"/>
      <c:set var="sourceId1" value="${bindings.AlbumId.attributeValue}"/>
    ...Element bundle not expected .
    ======================
    </head>
    <body>
    <fmt:bundle basename="com.photoswing.webview.MainshopAppMessageResources">error: Character data not allowed in head
    =============================
    Example:
    <script language="JavaScript" type="text/javascript">
    function FL_init() {
      <c:if test="${not empty requestScope.SessionWasInvalid}">
        alert("<fmt:message key="general.loggedIn.timeout"/>");
        location.href="<c:url value="/accountLogin.do"/>";
      </c:if>
    </script>Regarding my workaround:
    You don't have to remove the tag declaration, but I prefer to keep my jsp as clean as possible.
    But I found another problem, this time it's a serious one, when you reformat the source ALL tag prefixes are removed.
    Example
    <c:set ... becomes <setOther example:
      <c:set var="numberOfRows">
      <c:out value="${bindings.LoadedPhotos}" />
      </c:set>becomes:
        <set var="numberOfRows">
         <out value="${bindings.LoadedPhotos}"/>
        </set>Good luck!
    Fred

  • Modifying the search path of the include files when compiling with CC

    Hi All,
    In my current task, i am working on a new module.
    - There are many source-files where header-files of type, "#include <something.h>" are included.
    - The new Module just replaces the body of "something.h".
    Originally <something.h> is present in system-wide location.
    Now, i am trying to compile the code with the new files created, using "-I-" option.
    http://download.oracle.com/docs/cd/E19205-01/821-1384/bjadq/index.html
    Section 2.16.1 in above says:
    For include files of the form #include "foo.h", search the directories in the following order:
    1. The directories named with -I options (both before and after -I-).
    2. The directories for compiler-provided C++ header files, ANSI C header files, and special-purpose files.
    3. The /usr/include directory.
    For include files of the form #include <foo.h>, search the directories in the following order:
    1.The directories named in the -I options that appear after -I-.
    2. The directories for compiler-provided C++ header files, ANSI C header files, and special-purpose files.
    3. The /usr/include directory.
    When i used the "-I-" option,[[ -I-  -I/my/own/module/path ]] it could not include the common header files. [like <functional>, <algorithm>...etc]
    If "-I-" option is not used it could find the above headers.
    Could someone tell me what am i doing wrong here?
    Thanks & Regards,
    Sreekar

    Extension to the above. [could't edit and save it, hence placing it here]
    I know that specifying a system-wide locations manually is not standard, but tried the following to see if there is any work-around.
    I manually included "/usr/include/c++/4.1.1" to search for <algorithm> and then CC complained saying that, it could not find "bits/c++locale.h" which is internally included in "<algorithm>" .
    I am working on RHEL 5.4 (x86_64 arhictecture)
    When included "/usr/include/c++/4.1.1/x86_64-redhat-linux", got the following error:
    $ CC -m32 -c -library=rwtools7,iostream,Crun,no%Cstd -I- -I/data1/users/nfr1dev2/include -I. -I./gen  -I/data1/users/nfr1dev2/pvcs/cms_ba2ap/cms/source/include -I/usr/include -I/usr/include/c++/4.1.1 -I/usr/include/c++/4.1.1/x86_64-redhat-linux -o utsislist.o utsislist.cc
    "/usr/include/c++/4.1.1/x86_64-redhat-linux/bits/c++locale.h", line 55: Error: uselocale is not defined.
    "/usr/include/c++/4.1.1/x86_64-redhat-linux/bits/c++locale.h", line 55: Error: __uselocale is not defined.
    "/usr/include/c++/4.1.1/x86_64-redhat-linux/bits/c++locale.h", line 56: Error: "__gnu_cxx::__typeof()" is expected to return a value.
    "/usr/include/c++/4.1.1/x86_64-redhat-linux/bits/c++locale.h", line 61: Error: __locale_t is not defined.
    "/usr/include/c++/4.1.1/x86_64-redhat-linux/bits/gthr-default.h", line 593: Error: PTHREAD_MUTEX_RECURSIVE is not defined.
    "/usr/include/c++/4.1.1/bits/stl_algobase.h", line 577: Error: memset is not a member of __gnu_cxx::std.
    "/usr/include/c++/4.1.1/bits/stl_uninitialized.h", line 119: Error: memmove is not a member of __gnu_cxx::std.
    "/usr/include/c++/4.1.1/bits/allocator.h", line 124: Error: A declaration does not specify a tag or an identifier.
    "/usr/include/c++/4.1.1/bits/allocator.h", line 124: Error: Use ";" to terminate declarations.
    "/usr/include/c++/4.1.1/limits", line 378: Error: __CHAR_BIT__ is not defined.
    "/usr/include/c++/4.1.1/limits", line 378: Error: An integer constant expression is required here.
    Compilation aborted, too many Error messages.Cheers,
    Sreekar

  • Can iTunes write corrected ID3 tags to the main files?

    I'm sure this has been posted somewhere already, but I can't find it, so here goes.
    I have changed several hundred ID3 tags by editing the files in iTunes. Titles, artists, album, etc. The problem is, the main files aren't updating. SO if I change an entire album's ID3 info in iTunes, then delete it from iTunbes, then import it again, it's not updated. Is there a way iTunes can transfer whatever information I have changed within the application to the main files? I tried using the "Convert ID3 Tags" inside of iTunes and it didn't work.

    villenuv27 wrote:
    It does for most fields, but it won't change the song title.
    I still don't understand what you mean by "main files" or why you are deleting and re-importing. Sorry, but without more information, I don't have any suggestions. iTunes writes tags just fine for me but I allow iTunes to organize all my music. My iTunes files are my only music files.

  • How do I delete some text in a tag in the XML file?

    I need help with removing some text inside the tags so I can use it as a XMLfile
    string example
    Code
    <Event xmlns="http://SwitchKing.Common/Entities/RESTSimplified/2010/07" >
    <Description i:nil="true"/>
    So these are the tags inside the file that is stopping my work. 
    I cant seem to find a way to remove the xmlns.... or the i:nil...
    The i:nil gives of a error when trying to read the file and the xmlns stops the search for other tags in the file.
    So when I have loaded the data I need to delete some text in the tags.
    Help!

    If you want to delete photo stream photos, just deleted them from your device and they will be deleted from iCloud and your other devices.  Be sure you don't want them as you cannot get them back once you delete them.

  • XSLT - How to pass a Java object to the xslt file ?

    Hi ,
    I need help in , How to pass a java object to xslt file.
    I am using javax.xml.transform.Tranformer class to for the xsl tranformation. I need to pass a java object eg
    Class Employee {
    private String name;
    private int empId;
    public String getName() {
    return this.name;
    public String getEmpId() {
    return this.empId;
    public String setName(String name) {
    this.name = name;
    public String setEmpId(int empId){
    this.empId = empId;
    How can i access this complete object in the xsl file ? is there any way i can pass custom objects to xsl using Transformer class ?

    This is elementary. Did you ask google ? http://www.google.com/search?q=calling+java+from+xsl
    ram.

  • Element tag in the WSDL file.

    I have the following interface for the webservice:
    public interface DocumentProvider extends Remote {
    public void deleteDocument(String documentId) throws
    RemoteException;
    I use the wscompile command to generate the wsdl file and it creates a complex type like this:
    <complexType name="deleteDocument">
    <sequence>
    <element name="String_1" type="string" nillable="true"/>
    </sequence>
    </complextType>
    Is there an option in the wscompile command to change "String_1" to "Document" as it is called in the interface.
    I have run out of idea, pls. help if you know how.
    TIA

    I suggest, if possible, that you switch from JAX-RPC to JAX-WS. JAX-WS is the latest APIs for doing Web Services. JAX-RPC is no longer actively developed. The JAX-WS RI is an open source project on java.net (http://jax-ws.dev.java.net) that is widely used, actively developed, much faster than JAX-RPC. With JAX-WS you have much more control of the mapping Java <-> WSDL. For example, your interface below could be written like the following to achieve what you want.
    @WebService
    public class DocumentProvider {
    public void deleteDocument(@WebParam(name="Document")String documentId) { ... }
    Notice that an interface is no longer needed, you can use a POJO directly as long as you annotate it with @WebService. Also, you no longer need to extend Remote or throw RemoteExceptions. Check it out, I think you will really like it.

  • How to put color combination like red/blue tag in the XML file

    Hi experts,
    i have developed one program to capture some DATA in one internal table.it contains 2 fields called addition flag and dedletion flag.then i have wriiten the following code for converting  the XML file for the above internal table data.i am passing this internal table in the following FM ''SDIXML_DATA_TO_DOM'.But as per our requirement,they need the REd color tag for addition flag and blue Color tag for the deletion flag in the Above XML File for the respective addition data item and deletion data item.how to do???
    Any suggestion can be Appreciated.its very urgent
    Thanx in advance.
    Regards,
    HPP.
    The code is wriiten for converting internal table to XML file.
    DATA: l_dom TYPE REF TO if_ixml_element,
      m_document TYPE REF TO if_ixml_document,
      g_ixml TYPE REF TO if_ixml,
      w_string TYPE xstring,
      w_size TYPE i,
      w_result TYPE i,
      w_line TYPE string,
      it_xml TYPE dcxmllines,
      s_xml LIKE LINE OF it_xml,
      w_rc LIKE sy-subrc.
      DATA: xml TYPE dcxmllines.
      DATA: rc TYPE sy-subrc,
      BEGIN OF xml_tab OCCURS 0,
      d LIKE LINE OF xml,
      END OF xml_tab.
    *XML conversion -internal table to XML Format.
      CLASS cl_ixml DEFINITION LOAD.
      g_ixml = cl_ixml=>create( ).
      CHECK NOT g_ixml IS INITIAL.
      m_document = g_ixml->create_document( ).
      CHECK NOT m_document IS INITIAL.
      WRITE: / 'Converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          name         = 'it_prop'
          dataobject   = it_prop[]
        IMPORTING
          data_as_dom  = l_dom
        CHANGING
          document     = m_document
        EXCEPTIONS
          illegal_name = 1
          OTHERS       = 2.
      IF sy-subrc = 0.
        WRITE 'Ok'.
      ELSE.
        WRITE: 'Err =',
        sy-subrc.
      ENDIF.
      CHECK NOT l_dom IS INITIAL.
      w_rc = m_document->append_child( new_child = l_dom ).
      IF w_rc IS INITIAL.
        WRITE 'Ok'.
      ELSE.
        WRITE: 'Err =',
        w_rc.
      ENDIF.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          document      = m_document
        IMPORTING
          xml_as_string = w_string
          size          = w_size
        TABLES
          xml_as_table  = it_xml
        EXCEPTIONS
          no_document   = 1
          OTHERS        = 2.
      IF sy-subrc = 0.
        WRITE 'Ok'.
      ELSE.
        WRITE: 'Err =',
        sy-subrc.
      ENDIF.
      LOOP AT it_xml INTO xml_tab-d.
        APPEND xml_tab.
      ENDLOOP.
      CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          bin_filesize = w_size
          filename     = 'C:\prop.XML'
          filetype     = 'BIN'
        TABLES
          data_tab     = xml_tab
        EXCEPTIONS
          OTHERS       = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    TailOfGon wrote:
    Do you want to extract all the data with type='unknown'?
    Then try the XPath like this: 
    resource[type='unknown']/code
    Hi,
    Yes I want to extract all the data of the type = "unknown", I tried Xpath resource[type='unknown']/code but it didnt work , I still getting all other data of different type .
    Thanks,
    Ankit G

  • What does Java do with the input file?

    Hello everyone --
    I have a freaky Java problem. I'm running a program that takes an input file, reads it one line at a time, and determines whether the info I'm looking for is contained in it or not. For each line it reads, it decides if that line is good or bad, and broadcasts the findings in a System.out.println(). Every line gets one. When I run the program, I redirect the output to a log file. What's going on when the input file is 13000+ lines long and the log file is only 2500 lines long? This is tweakin' me out.
    Thanks for the advice,
    -Kwj.

    Here's what I have:
    boolean isGood = true;
    int count = 1;
    while((line = in.readLine()) != null)
    if (/*some condition is met*/)
    {*do some stuff*/}
    else
    isGood = false;
    System.out.println("***" + line);
    if (isGood)
    /*do some more stuff*/
    System.out.println(count + ". " + line)
    count++;
    }//process all lines
    As far as I can tell, I have every line accounted for in the else statement or the last if statement. If the line doesn't meet the req., it doesn't get to go on to the last if processing. All the good ones get processed. I think.

  • How to remove html tags from the pdf file ?

    Hello,
    Using BI publisher we are generating a pdf file. In the table, we have data which contains html tags. for example " test1<br> 2.test2<br> 3.test3<br> ".
    In the pdf file we need to get the output like this
    test1
    test2
    test3
    But the output is as follows :"test1<br> 2.test<br> 3.test3<br> "
    Any idea, how these html tags can be removed from the pdf file and obtain the required result?
    Thanks in advance!!
    Archana

    Archana,
    Can you wrap your code in <code> tags (use square brackets rather than angled ones), as the forum software is interpretting the HTML tags, in other words we can't see what you mean ;)
    In any case, there are a few different options (guessing at what your problem is, without seeing the actual data), you could use htf.escape_sc or replace, regexp_replace etc to substitute the values before you output them to your PDF.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Usung a href Tag, open the linked file in associated editor

    Hi,
    I have a functionality where a file location would be fetched from the database, shown to the user as a hyperlink. On clicking the hyperlink the file should open in its associated editor i.e if it is a .doc it should open in word, if it is an xls it should open in Excel.
    I tried different ways but its opening in the IE browser itself ,Is there a way that it opens up in its associated editor.
    Infact even if it opens in browser its ok, but then if a user modifies the xls and tries to "SAve AS" the pop up does not appears to save the file.How can i get the pop up so that user can save the modified file in it local computer.

    Hi ,
    Thanks a lot. What i have done is
    File excelFile = new File("\full file name");
    ServletOutputStream out = res.getOutputStream ();
    // Set the output data's mime type
    //res.setContentType( "application/text" ); // MIME type for pdf doc
    res.setContentType( "application/vnd.ms-excel");
    // create an input stream from fileURL
    String fileURL =
    full file name";
    // Content-disposition header - don't open in browser and
    // set the "Save As..." filename.
    // *There is reportedly a bug in IE4.0 which ignores this...
    res.setHeader("Content-disposition",
    "attachment; filename=\"file name\"");
    // PROXY_HOST and PROXY_PORT should be your proxy host and port
    // that will let you go through the firewall without authentication.
    // Otherwise set the system properties and use URLConnection.getInputStream().
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    try {
    // Use Buffered Stream for reading/writing.
    bis = new BufferedInputStream(new FileInputStream(excelFile));
    bos = new BufferedOutputStream(out);
    byte[] buff = new byte[2048];
    int bytesRead;
    // Simple read/write loop.
    while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
    bos.write(buff, 0, bytesRead);
    } catch(final Exception e) {
    System.out.println ( "Exception" );
    throw e;
    } finally {
    if (bis != null)
    bis.close();
    if (bos != null)
    bos.close();
    This is the code for excel, and its doing what i needed.
    I havent tested it for other formats hopefully it would work. :)

  • How to parse all the data of the particular tag in the xml file

    Hi All,
    I have a xml file, which have tags like, code,rev_num,type...volunteer.I want to parse the xml and save the all data(code,rev_num...) of the tag <type>unknown </type>in a text file. I tried to use a Match node vi but I not geting the output i need.attach is my attempt , can anyone suggest me or help me out.(Sorry Cant attach the xml hence i saved it as an text file.)
    Thanks,
    Ankit G
    Solved!
    Go to Solution.
    Attachments:
    teeth.txt ‏385 KB
    Xml parse.vi ‏22 KB

    TailOfGon wrote:
    Do you want to extract all the data with type='unknown'?
    Then try the XPath like this: 
    resource[type='unknown']/code
    Hi,
    Yes I want to extract all the data of the type = "unknown", I tried Xpath resource[type='unknown']/code but it didnt work , I still getting all other data of different type .
    Thanks,
    Ankit G

Maybe you are looking for