Parsing (skipping) unknown tags with JAXB...

Does anybody know how can I skip unrecognised tags, during unmarshalling an XML document with JAXB?
For example : the schema-compliant document is :
<document>
<Version>3.20</Version>
<Account>Account</Account>
<Password>Password</Password>
</document>
and a possible modification would be :
<document>
<Version>3.21</Version>
<unknowntag>aaaabbbb</unknowntag>
<Account>Account</Account>
<Password>Password</Password>
</document>
(a new unknown tag was introduced).
so : the document is well-formed anyway (not strictly valid), but the second time a new unknown tag was introduced. I couldn't map it to a Java object (of course, because my data model could not foresee it), but I would like JAXB to skip it and have the program flow behaving exactly as the first case... ignoring this new unknown tag.
Thanks for any answer anybody could ever give me...
Emilio.

Finally I found a workaround to this problem :
I used an XSL transformation from the incoming document into itself, according to the pattern matching provided by an xsl stylesheet, before giving it to JAXB. Definitely an XSL specular preprocessor (wow! sound cool!).
That is :
having an incoming XML document, I write an XSL stylesheet that transforms the original XML document into another XML having the same tags (that is... itself).
In this way, I can then give to JAXB a resulting XML document that contains ONLY those tags that I was expecting it to elaborate, since all the others (the unknown ones) were discarded by the xsl preprocessor.
And... that's it.
In this way I finally wrote an application able to skip unrecognized tags and elaborating by JAXB only the know ones. And that's what I was looking for :-)
Hope it could help you.
Bye,
emils.

Similar Messages

  • Taglib problem: Cannot parse custom tag with short name table

    Hello!
    I am having problems deploying a jsp tag in web as. The same war file works fine on websphere, jboss. SAP web as seems to be complaining about the short name in the tld.
    Can any body me to any known web as issues with jsp tags?
    Thanks
    [code]
    Application error occurs during processing the request.
    Details: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: Internal error while parsing JSP page /usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/dispear/servlet_jsp/disp/root/test.jsp.
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:85)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.getClassName(JSPServlet.java:207)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.compileAndGetClassName(JSPServlet.java:369)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:164)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Cannot parse custom tag with short name table.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:129)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.ElementCollection.action(ElementCollection.java:52)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.initParser(JSPParser.java:307)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:74)
         ... 18 more
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Unknown class name java.lang.Object.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.convertString(TagBeginGenerator.java:365)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:187)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:212)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:269)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:127)
         ... 21 more
    [/code]

    Hi Ray,
    I am facing similar kind of issue.
    Can you please help to resolve it?
    Thanks in advance.
    Logs are as below [Here I am using standard tag lib]::
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name [out].
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:183)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspIncludeDirective.action(JspIncludeDirective.java:51)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.customTagAction(JspElement.java:994)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.action(JspElement.java:228)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:69)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.GenerateJavaFile.generateJavaFile(GenerateJavaFile.java:72)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:270)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.generateJavaFile(JSPProcessor.java:194)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:126)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassName(JSPChecker.java:319)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.compileAndGetClassName(JSPChecker.java:248)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassNameForProduction(JSPChecker.java:178)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.processJSPRequest(JSPChecker.java:109)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JspParser.generateJspClass(JspParser.java:154)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:193)
         ... 47 more
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Attribute [value] of [<c:out>] can accept only static values.
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.calculateAttributeValue(TagBeginGenerator.java:476)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:394)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:562)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:678)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:181)
         ... 64 more
    Regards,
    Sankalp

  • .exception.JspParseExcept Cannot parse custom tag with short name [out].

    Hi
         I have almost migrated an application from jboss to CE 7.1 sp3 maxdb 32 bit
         however I am getting the following error on c:out tag of standard jslt.
    Runtime error in processing of the JSP file [C:\usr\sap\CE1\J00\j2ee\cluster\apps\<....>\servlet_jsp\<application_context_name>\root\jsp\view\<jsp_name>.jsp].
    Line:----
    The error is: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name [out].02004C4F4F50001F0000002D000012B000B0688132009833
    Line:----
    Do anybody have some idea why is it happening.
    My guess would be because of jslt version mismatch. but its working fine in jboss. I am not sure what version cE 7.1 support may be 1.2. any idea how to chek the supported version in the server.
    The jsp code is something like
    Line:----
    <code>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %>
    <c:url var="thumbnailStream" value="/do/<action_tag>">
               <c_rt:param name="stream_id"      value="<%= <variable1> %>"/>
               <c:param    name="stream_id_type" value="<variable2>"/>
               <c:param    name="content_kind"   value="<variable3>"/>
            </c:url>
    <img border="0" src="<c:out value="$"/>">
    </code>
    Line:----
      from the SAP help text its said that jslt is being overrided by server to use from global library rather than local webapplication library. Couls woud explain where is this global library located in the server directory.
    Thx.
    Ashutosh

    Hi are you able to solve this issue.I am getting similar kind of issue.
    Logs for the same are ::
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name out.
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:183)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspIncludeDirective.action(JspIncludeDirective.java:51)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.customTagAction(JspElement.java:994)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.action(JspElement.java:228)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:69)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.GenerateJavaFile.generateJavaFile(GenerateJavaFile.java:72)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:270)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.generateJavaFile(JSPProcessor.java:194)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:126)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassName(JSPChecker.java:319)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.compileAndGetClassName(JSPChecker.java:248)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassNameForProduction(JSPChecker.java:178)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.processJSPRequest(JSPChecker.java:109)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JspParser.generateJspClass(JspParser.java:154)
    at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:193)
    ... 47 more
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Attribute value of <c:out> can accept only static values.
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.calculateAttributeValue(TagBeginGenerator.java:476)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:394)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:562)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:678)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:181)
    ... 64 more

  • Marshalling HashMap with JAXB 2.0 - empty tags & ill schema

    Hi all,
    I expected JAXB 2.0 to be capable to handle basic classes like HashMap, but it does not look so. I have two classes: SimpleNegotiationManager which has a property HashMap in which are stored the instances of SimpleInitiatedConversation:
    package xml;
    import javax.xml.bind.annotation.*;
    import java.util.HashMap;
    @XmlAccessorType(AccessType.FIELD)
    @XmlRootElement
    public class SimpleNegotiationManager {
        @XmlElement
        protected HashMap<String, SimpleInitiatedConversation> initiatedConversations;
        public SimpleNegotiationManager() {
        public HashMap<String, SimpleInitiatedConversation> getInitiatedConversations() {
            if (initiatedConversations == null) {
                initiatedConversations = new HashMap();
            return initiatedConversations;
        public void setInitiatedConversations(HashMap<String, SimpleInitiatedConversation> initiatedConversations) {
            this.initiatedConversations = initiatedConversations;
    }and
    package xml;
    import javax.xml.bind.annotation.*;
    import java.util.ArrayList;
    import java.util.List;
    @XmlAccessorType(AccessType.FIELD)
    @XmlType
    public class SimpleInitiatedConversation {
        @XmlElement
        protected List<String> messages;
        protected String conversationID;
        protected int protocolState;
        public SimpleInitiatedConversation() {
        public List<String> getMessages() {
            if (messages == null) {
                messages = new ArrayList();
            return messages;
        public void setMessages(List<String> messages) {
            this.messages = messages;
        public int getProtocolState() {
            return protocolState;
        public void setProtocolState(int protocolState) {
            this.protocolState = protocolState;
        public String getConversationID() {
            return conversationID;
        public void setConversationID(String conversationID) {
            this.conversationID = conversationID;
    }When I marshalled SimpleNegotiationManager while the HashMap was filled with several <String,SimpleInitiatedConversation> entries, in the output were empty tags initiatedConversations:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <simpleNegotiationManager>
      <initiatedConversations>
      </initiatedConversations>
    </simpleNegotiationManager>When I used schemagen to generate a schema, it produced:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:complexType name="simpleInitiatedConversation">
        <xs:sequence>
          <xs:element name="messages" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
          <xs:element name="conversationID" type="xs:string" minOccurs="0"/>
          <xs:element name="protocolState" type="xs:int"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="simpleNegotiationManager" type="simpleNegotiationManager"/>
      <xs:complexType name="simpleNegotiationManager">
        <xs:sequence>
          <xs:element name="initiatedConversations" type="hashMap" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="hashMap">
        <xs:complexContent>
          <xs:extension base="abstractMap">
            <xs:sequence/>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:complexType name="abstractMap" abstract="true"/>
    </xs:schema>Particularly the description of HashMap seems ill - there is not specified that the HashMap has keys String and values SimpleInitiatedConversation.
    Unfortunatelly, the j2s-xmlAdapter-field example available with JAXB 2.0 is more complicated than I need. I just need to store/load HashMap into/from XML and I do not care what it looks like. Is it possible to avoid extending XmlJavaTypeAdaptor for a simple storing a HashMap into XML? Perhaps I use improper annotations in the source code, but I cannot get it working. Any clue?

    Ok i figured out one way of doing this by using some classes from JAXP...
    SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema s = null;
    try{
        s = sf.newSchema(new File("Sources/schema/test.xsd"));                    
    }catch(Exception e){
        System.err.println("Exception e: " + e.getMessage());
    marshaller.setSchema(s);
    //MyValidationHandler class implements the ValidationEventHandler interface
    MyValidationHandler gv = new MyValidationHandler();
    marshaller.setEventHandler(gv);If anyone has something to add let me know!!

  • Unknown tag name: [session] in XML node: [toplink-configuration].

    I get this exception at runtime, running TOPLink as persistence manager for my BMP WL7 beans. My sessions.xml validates according to the sessions_4_5.dtd file supplied with TOPLink, but yet I get this excpetion. Below is my complete sessions.xml, as well as teh header of the exception stack
    Sessions.xml
    <?xml version="1.0" encoding="US-ASCII"?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink for JAVA 4.5//EN" "sessions_4_5.dtd">
    <toplink-configuration>
         <session>
              <name>entitySession</name>
              <project-class>za.co.discovery.legalentity.persistence.TOPLinkProject</project-class>
              <session-type>
                   <server-session/>
              </session-type>
              <login>
                   <uses-external-connection-pool>true</uses-external-connection-pool>
                   <uses-external-transaction-controller>true</uses-external-transaction-controller>
              </login>
              <external-transaction-controller-class>oracle.toplink.jts.wls.WebLogicJTSExternalTransactionController</external-transaction-controller-class>
              <enable-logging>true</enable-logging>
              <logging-options>
                   <log-debug>false</log-debug>
                   <log-exceptions>true</log-exceptions>
                   <log-exception-stacktrace>true</log-exception-stacktrace>
                   <print-thread>false</print-thread>
                   <print-session>true</print-session>
                   <print-connection>true</print-connection>
                   <print-date>false</print-date>
              </logging-options>
         </session>
    </toplink-configuration>
    and the stack trace:
    1) testAll(za.co.discovery.legalentity.ejb.test.ClassVersionTest)java.rmi.RemoteException: Exception in ejbFindByPrimaryKey; nested exception is:
         EXCEPTION [TOPLINK-7094] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: LOCAL EXCEPTION STACK:
    EXCEPTION DESCRIPTION: Several [2] SessionLoaderExceptions were thrown:
    EXCEPTION [TOPLINK-9002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unable to load Project class [za.co.discovery.legalentity.persistence.TOPLinkProject].
    INTERNAL EXCEPTION: java.lang.ExceptionInInitializerError
    EXCEPTION [TOPLINK-9001] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unknown tag name: [session] in XML node: [toplink-configuration].
    INTERNAL EXCEPTION: java.lang.reflect.InvocationTargetException
    TARGET INVOCATION EXCEPTION: java.lang.NullPointerException
         at oracle.toplink.exceptions.SessionLoaderException.finalException(Unknown Source)
         at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getDescriptor(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getWrapperPolicy(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.findByPrimaryKey(Unknown Source)
         at oracle.toplink.ejb.bmp.BMPEntityBase.findByPrimaryKey(Unknown Source)
         at za.co.discovery.legalentity.ejb.LegalEntityEJB.ejbFindByPrimaryKey(LegalEntityEJB.java:67)
    all help appreciated!
    thanks
    Alwyn ([email protected])

    Hi Alwyn
    I've seen this exact problem before when the sessions.xml file has been parsed by a different version of xerces from the one provided in TopLink. Is this a possibility?
    JIM

  • How can I use a 3rd party XML parser such as xerces with OC4J ?

    Hi all tech experts,
    I am using Oracle Application Server 10g Release 2 (10.1.2) and i have
    installed Portal and Wireless and OracleAS Infrastructure on the same
    computer.
    i tried all the solutions on this thread
    Use of Xerces Parser in out application with Oracle App Server 9.0.4
    but still fighting.
    I have also posted this query on OTN on following thread
    How can I use a 3rd party XML parser such as xerces with OC4J?
    but no reply....
    Please help me on this issue.
    Since OC4J is preconfigured to use the Oracle XML parser which is xmlparserv2.jar.
    i have read the following article which states that
    OC4J is preconfigured to use the Oracle XML parser. The Oracle XML parser is fully JAXP 1.1 compatible and will serve the needs of applications which require JAXP functionality. This approach does not require the download, installation, and configuration of additional XML parsers.
    The Oracle XML parser (xmlparserv2.jar) is configured to load as a system level library of OC4J through it's inclusion as an entry in the Class-Path entry of the oc4j.jar Manifest.mf file. This results in the Oracle XML parser being used for all common deployment and packaging situations. You are not permitted to modify the Manifest.mf file of oc4j.jar.
    It must be noted that configuring OC4J to run with any additional XML parser or JDBC library is not a supported configuration. We do know customers who have managed to successfully replace the system level XML parser and the Oracle JDBC drivers that ship with the product, but we do not support this type of configuration due to the possibility of unexpected system behavior and system errors that might occur from replacing the tested and certified libraries.
    If you absolutely must use an additional XML parser such as xerces, then you have to start OC4J such that the xerces.jar file is loaded at a level above the OC4J system classpath. This can be accomplished using the -Xbootclasspath flag of the JRE.
    i have also run the following command
    java -Xbootclasspath/a:d:\xerces\xerces.jar -jar oc4j.jar
    but no success.
    How could i utilize my jar's like xerces.jar and xalan.jar for parsing instead of OC4J in-built parser ?
    All reply will be highly appreciated.
    Thnx in advance to all.
    Neeraj Sidhaye
    try_catch_finally @ Y !

    Hi Neeraj Sidhaye,
    I am trying to deploy a sample xform application to the Oracle Application Server (10.1.3). However, I encountered the class loader issue that is similar to your stuation. I tried all the three solutions but the application is still use the Oracle xml paser class. I am wondering if you have any insight about this?
    Thanks for your help.
    Xingsheng Qian
    iPass Inc.
    Here is the error message I got.
    Message:
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
    Stack Trace:
    org.chiba.xml.xforms.exception.XFormsException: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.dispatch(Unknown Source)
         at org.chiba.xml.xforms.Container.initModels(Unknown Source)
         at org.chiba.xml.xforms.Container.init(Unknown Source)
         at org.chiba.xml.xforms.ChibaBean.init(Unknown Source)
         at org.chiba.adapter.servlet.ServletAdapter.init(ServletAdapter.java:153)
         at org.chiba.adapter.servlet.ChibaServlet.doGet(ChibaServlet.java:303)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.xml.parser.v2.XMLElement
         at org.chiba.xml.xforms.Instance.iterateModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.initializeModelItems(Unknown Source)
         at org.chiba.xml.xforms.Bind.init(Unknown Source)
         at org.chiba.xml.xforms.Initializer.initializeBindElements(Unknown Source)
         at org.chiba.xml.xforms.Model.modelConstruct(Unknown Source)
         at org.chiba.xml.xforms.Model.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.performDefault(Unknown Source)
         at org.chiba.xml.xforms.XFormsDocument.dispatchEvent(Unknown Source)
         at org.apache.xerces.dom.NodeImpl.dispatchEvent(Unknown Source)
         ... 18 more

  • Error in parsing the taglib tag in the JSP page

    Hi
    We are trying to deploy and run a Web Application in CE 7.1 SP01. We are successful in deploying and running servlet based web pages, but when it comes to JSP's the taglibs are not parsed and we get the following error message
    Runtime error in processing of the JSP file E:\usr\sap\CE1\J01\j2ee\cluster\apps\sap.com\TestNWEAR\servlet_jsp\TestNW\root\admin\main.jsp.
    The error is: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Error in parsing the taglib tag in the JSP page. Cannot resolve URI: [webwork]. Possible reason - validation failed. Check if your TLD is valid against its scheme.02004C4F4F5000190000004E000013400191D308B45
    Processing HTTP request to servlet [jsp] finished with error.
    The error is: java.io.FileNotFoundException: E:\usr\sap\CE1\J01\j2ee\cluster\apps\sap.com\TestNWEAR\servlet_jsp\TestNW\root\admin\webwork (The system cannot find the file specified)02004C4F4F50001900000051000013400191D308B45AF1AB
    We followed the below weblog to correct the TLD's in JAVA EE 5 @ SAP but it did not work for us.
    /people/community.user/blog/2006/10/13/porting-the-java-blueprint-solutions-catalogue-applications-to-sap-netweaver-application-server-java-ee-5-edition
    Any immediate help will be rewarded with full points
    Thanks in advance
    Lakshmi
    Edited by: lakshmi N Munnungi on May 5, 2008 11:36 PM
    Edited by: lakshmi N Munnungi on May 5, 2008 11:39 PM

    Hi Lakshmi,
    I have also the same problem. If you have found the solution please post it thanks,
    Thanks,
    Tariq

  • Creating chart leads in XML Parsing Error: mismatched tag. Expected: /svg

    Hello ALL,
    I searched this forum but unfortunately I find not a solution for the following use case:
    described in steps
    1.) create a region with chart (typ = line) -> o.k.
    2.) create a sql statement to have data in the chart -> o.k.
    3.) running report with this created region and chart -> vizualisation o.k.
    3.) create a data picker item ":P21_END_DATE"
    4.) replaced the where clause "WHERE a_timestamp >= To_date ('01.02.2007', 'dd/mm/yyyy HH24:MI') -1/24" with WHERE a_timestamp >= To_date (:P21_END_DATE, 'dd/mm/yyyy HH24:MI') -1/24
    5.) running report with this created region and chart and data picker item -> vizualisation not o.k. I get the attached error message.
    I read already in the forum and knows that the end tag of the svg section is lost put I only changed in my query the described value. Does any body can help me please ??
    king regards
    XML Parsing Error: mismatched tag. Expected: </svg>.
    Location: http://localhost:7777/pls/htmldb/f?p=103:9:8795066316806762442:FLOW_SVG_CHART_R2476324075306576_de
    Line Number 22, Column 1455:</style><script xlink:href="/i/javascript/svg_js_includes/svg_common/oracle.svgInit.js"/><script xlink:href="/i/javascript/svg_js_includes/svg_common/oracle.svgNodes.js"/><script type="text/ecmascript"><![CDATA[function svgSync(){window.reload();}function htmldb_Load(){try{oracleSvgInit(evt);throw "old version" }catch(er){}}]]></script><rect id="background" x="1" y="1" width="1022" height="398"/><text x="20" y="20" class="title">Chart 1</text><text id="XAxisTitle" x="50%" y="390">Minute</text><text id="YAxisTitle" x="15" style="writing-mode:lr;" y="200" transform="rotate(-90,15,200)" text-anchor="middle">Messages</text><g id="legend" transform="translate(0,25)"><rect class="legend" x="1" y="0" width="1022" height="60"/><g class="legenditem" transform="translate(20,18)"><line x1="0" y1="-5" x2="-15" y2="-5" class="data1"/><text class="legend" y="0" x="2">ALL</text></g><g class="legenditem" transform="translate(20,36)"><line x1="0" y1="-5" x2="-15" y2="-5" class="data2"/><text class="legend" y="0" x="2">SMS</text></g><g class="legenditem" transform="translate(20,54)"><line x1="0" y1="-5" x2="-15" y2="-5" class="data3"/><text class="legend" y="0" x="2">LL</text></g></g><svg width="1024" height="400" viewBox="-5 -5 1024 400" preserveAspectRatio="none"> <text class="nodatafound" x="40" y="20">No data found.</text><text class="nodatafound" x="40" y="20">no data found</text><text class="nodatafound" x="40" y="20">no data found</text></g></svg><g id="infobubble" transform="translate(0,0)" style="visibility:hidden"><rect id="infobackground" rx="2" ry="2" x="0" y="0" width="100" height="20" fill-opacity=".9" fill="#FFFFFF" stroke="#000000" stroke-width="1"/><text id="infotext" x="5" y="12">-</text></g><!-- USER FOOTER--></svg>
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^

    I found the solution:
    No data resulting to the query !!

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

  • FF5 error parsing CSS font-face with url inline base64 data

    Firefox 5 refuses to parse CSS @font-face with url inline base64 data.
    I use the declaration:
    &lt;style type="text/css"&gt;
    @font-face {
    font-family: 'MyFont';
    src: url(data:font/truetype;charset=utf-8;base64,[base64data]);
    &lt;/style&gt;
    then used this way:
    &lt;div style="font-family:'MyFont'; font-size:12.0pt"&gt;Test text&lt;/div&gt;
    But Firefox is not using the font and in the error console, there is always the message:
    ''Error parsing the "src" value. Skipped to next declaration.''
    (more or less, I actually have this message in Czech)
    Tried with different mime types (font/ttf,font/otf,font/opentype,application/x-font-ttf etc.), with or without charset specification, with or without quoting the font family name, with different specifications:
    &lt;style type="text/css"&gt;
    @font-face {
    font-family: 'MyFont';
    src: url(data:font/truetype;charset=utf-8;base64,[base64data]) format(truetype);
    &lt;/style&gt;
    (tried also with opentype format, etc.)
    &lt;style type="text/css"&gt;
    @font-face {
    font-family: 'MyFont';
    src: url('myfont-webfont.eot?');
    src: local('☺'), url(data:font/truetype;charset=utf-8;base64,[base64data]);
    &lt;/style&gt;
    If I provide the font path:
    &lt;style type="text/css"&gt;
    @font-face {
    font-family: 'MyFont';
    src: url('Arial.ttf');
    &lt;/style&gt;
    (the font actually is Arial, for testing), it works (but I need to embed the font in the HTML for specific reason, so having the font externally is not the option).

    Finally I got it work! Thanks, cor-el, you pointed me the right way to solve this problem.
    There was problem with the encoding too (there was part of the font missing at the end, because of the bug in the program - I forgot to flush the buffered output stream), after then I was able to download the same copy of the TTF. - I didn't know about the possibility to put the entire url data to the location bar and try to download it, thanks cor-el.
    But it still didn't solve the problem ... the problem was, that the base64 stream was divided to multiple lines, like
    data:font/truetype;charset=utf-8;base64,
    AAEAAAAYAQAABACARFNJRwMaCRYAC8m8AAAXfEdERUaJ+Y1JAAr/JAAAAsJHUE9T
    e1arnwALAegAAKwaR1NVQt5CYFEAC64EAAAbmEpTVEZtKmkGAAvJnAAAAB5MVFNI
    RExjrAAAN8wAAA1dT1MvMhAyXXMAAAIIAAAAYFBDTFT9ez5DAAr+7AAAADZWRE1Y
    After I removed the line breaks, it works now! (the line is quite long then, because the base64 string is about 1MB, but it works)
    Strange that I do the same for images (jpeg, png) and there is no problem with base64 string divided to multiple lines.
    But anyway, I'm fine with that.

  • Can't generate setters for array or collection classes with JAXB

    I am trying to use JAXB to generate the required setters for Spring beans. Although according to the book Java & XML Data Binding
    Chapter 3 page 42 by Brett McLaughlin it was possible with DTD's using
    <?xml version="1.0"?>
    <xml-java-binding-schema version="1.0-ea">
    <options package="javajaxb.generated.movies" default-reference-collection-type="array" />
    <element name="movies" type="class" root="true"/>
    </xml-java-binding-schema>
    to generate an array as in
    public Movie[] getMovie( ) {
    // implementation
    public void setMovie(Movie[] _Movie) {
    it doesn't look like that capability exists with JAXB 2.0 and XML Schemas. In their wisdom they just generate getters on Lists and tell you:
    <p>
    * This accessor method returns a reference to the live list,
    * not a snapshot. Therefore any modification you make to the
    * returned list will be present inside the JAXB object.
    * This is why there is not a <CODE>set</CODE> method for the filingForm property.
    * <p>
    * For example, to add a new item, do as follows:
    * <pre>
    * getFilingForm().add(newItem);
    * </pre>
    Of course this doesn't work for Spring injection where setters are needed.
    Does anyone know different or is there a way of getting around this ?
    I've tried constructor injection in Spring but it's not as convenient and involves extensive coding of generated code (not nice).
    Edited by: user3806112 on Mar 15, 2011 11:13 AM

    Oh I found it on this post
    http://cxf.547215.n5.nabble.com/NPE-in-generated-setter-method-when-collectionType-quot-indexed-quot-and-a-null-array-is-used-td3323012.html
    collectionType="indexed" in the globalBindings-tag
    it works in schema internal global bindings as well
    <jaxb:globalBindings collectionType="indexed" >

  • Cfdiv unknown tag

    I am attempting to use cfdiv to autorefresh some content on a page an am getting the following error:
    Unknown tag: cfdiv. ColdFusion cannot determine how to process the tag cfdiv because the tag is unknown and not in any imported tag libraries. The tag name might be misspelled. <br>The error occurred on line -1.
    I am using DW CS3.
    Any ideas?  Am I missing something?

    >>  I have used user created tags by just downloading
    >> some files. 
    Not a dumb question. But as others mentioned, it is important to understand how things work and why. I suspect you are confusing custom tags / cfx tags with core cfml tags. Custom tags can be downloaded and installed separately. Core cfml tags, on the other hand, are built into the Adobe CF engine. They cannot be installed separately by you. Only through upgrades, patches, hotfixes, etcetera ..
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0b2e1 -7fff.html

  • How to mute: warning - @ABC-XYZ is an unknown tag ?

    Hello,
    I am using Java 1.4.2, XDoclet 1.2.2 and Ant 1.6.2.
    When I put the ejbdoclet tags in my java source file for my bean
    and then run javadoc through Ant I get the following warnings:
    warning - @ejb.interface-method is an unknown tag.
    warning - @ejb.ejb-ref is an unknown tag.
    warning - @jonas.ejb-ref is an unknown tag.
    warning - @jboss.ejb-ref-jndi is an unknown tag.
    warning - @weblogic.ejb-reference-description is an unknown tag.
    I have defined following tags (bellow) for mute all xdoclet tag
    warnings, but it seems all tags containing minus (-) char within
    the name are problematic and warnings occured in spite of that.
    <tag name="ejb.bean" scope="all" description="XDoclet tag:" />
    <tag name="ejb.home" scope="all" description="XDoclet tag:" />
    <tag name="ejb.interface" scope="all" description="XDoclet tag:" />
    <tag name="ejb.interface-method" scope="all" description="XDoclet tag:" />
    <tag name="ejb.ejb-ref" scope="all" description="XDoclet tag:" />
    <tag name="ejb.transaction" scope="all" description="XDoclet tag:" />
    <tag name="jonas.bean" scope="all" description="XDoclet tag:" />
    <tag name="jonas.ejb-ref" scope="all" description="XDoclet tag:" />
    <tag name="jboss.ejb-ref-jndi" scope="all" description="XDoclet tag:" />
    <tag name="weblogic.ejb-reference-description" scope="all" description="XDoclet tag:" />
    Warnings don't show for tags without minus (-) char in the tag name (for
    example for ejb.bean, ejb.home, etc.)
    Is there possibility to mute warnings for tags that contain (-)
    char in the name?
    Thank you in advance for your advice,
    with best regards,
    Julian Legeny

    I have try to use backslash, for example
    <tag name="ejb.interface\-method" scope="all" description="XDoclet tag:" />
    but it doesn't solve the problem.
    With best regards,
    Julian Legeny

  • 500 Unknown tag: cfdump.

    For some reason, cfdump is not working on our Intranet
    server.
    We are running CFMX7.02 on Windows XP. The error page that
    appears when a CFDUMP tag is run is as follows:
    500 Unknown tag: cfdump.
    Unknown tag: cfdump.
    Any suggestions? I've searched high and low and have found no
    answers. Your help would be much appreciated.
    Thanks,
    Marc

    Where we're at right now is that it turns out that the
    standard version of CFMX7 was installed on top of the trial
    version. There was indeed one error in the installation log, and
    from when we were working with the trial version I remember that it
    took only one error to seriously foul things up. So we're wiping
    all old ColdFusion files off the server to do a clean install.
    Hopefully that will clear things up.
    Basically, all valid instances of cfdump were failing. For
    example:
    <cfdump var="#FORM#" label="Dump of FORM Variables">
    Thanks much for the help and tips... hopefully this will lead
    to the right fix. I'll follow up when I find out more after the
    install.

  • Netui:repeater tags with ranges (aka prev/next)

    Is there some way to implement ranges using the <netui:data-repeater> tags? By
    ranges, I mean where you have 123 items in a list and you only display numbers
    1-50. Clicking NEXT would give you items 51-100. When you're there, clicking PREV
    would take you back to 1-50.
    Sample code would be nice. I think it could be done with the <netui:data-choiceMethod>
    tags, but what I am envisioning would be pretty ugly

    I am still stuck. I have the pager working fine. But, I have a checkbox that needs
    to be bound with the recordid. When the form is submitted after selecting records
    on multilple pages, I want to retrieve the recordids of records that were checked.
    How do I do that? A chckbox datasource can only be a one-value String property
    of a form. But, I need to save an array of ids that were checked. I am so lost.
    Please help.
    "bindu" <[email protected]> wrote:
    >
    So sorry Eddie,
    My bad I dint scroll down all the way. Thanks so much.
    Bindu
    Eddie O'Neil <[email protected]> wrote:
    John--
    Here's an example of implementing a paged repeater.
    Briefly, here's how it works:
    The entire data set (a Product[]) is stored in the JPF. When paging
    through this data set, a
    sliding window (also stored as a Product[]) is used to contain the "current"
    set of products to
    render in the page. The sliding window Product[] is of size PAGE_SIZE.
    When transitioning between
    pages, this window is recalculated for each page.
    Also calculated are the "currentPage", "lastPage", "prevPage", and
    "nextPage", which are used to
    render a pager like this:
    Page <currentPage> of <lastPage> <anchor to prevPage> <anchor to
    nextPage>
    The JPF and JSP are pretty well documented. To run the Page Flow,
    drop the JPF and JSP into a
    directory called "repeaterPaging" in an 8.1 SP2 webapp.
    There are lots of other ways this could be done (and certainly some
    that are more efficient :),
    but hopefully this helps get you started.
    Eddie
    Eddie O'Neil wrote:
    John--
    Yep, I did promise that, and nope, it hasn't been done yet. :)
    But, thanks for calling me on it.
    Will try to do that and distribute it to the list in the next fewdays.
    Eddie
    John H wrote:
    Eddie,
    You mentioned putting together an example of paging a repeater in
    this
    thread.
    Did you ever get a chance to put one together? Would really loveto
    see it if
    you did.
    Thanks,
    John
    Eddie O'Neil <[email protected]> wrote:
    Jan--
    We're talking about adding a pager to the repeater in a future
    release of Workshop, but I don't believe that it will appear inan
    8.1
    service pack.
    Additionally in 8.1, we are not exposing a NetUI tag SDK.
    That being said, it isn't that difficult ot build a pager from
    scratch with the <netu:anchor> / <netui:parameter> tags and a little
    code in a JPF.
    You'd want to have "prev" and "next" actions in the JPF to which
    anchors in the JSP are bound. Then, you can keep track of the "current"
    page in the URL and build the previous and next page indices fromthe
    value that is availble in the request. Finally, create an intermediate
    data structure that contains the data to display in the "current"page
    and bind the repeater to this data structure. You'd build the contents
    depending on whether the prev or next links were clicked. For example,
    if your data set has 100 items in it and you only want to displayitems
    20-29, you'd be on page 2 (depending on whether you start countingat
    0 :) and the intermediate list would contain exactly these items.
    Might sound complicated, but I think this would work out prettywell.
    Hope that helps...
    Eddie
    Jan Noppen wrote:
    Are there any plans to include the pager tag with the repeater
    in
    the
    next service packs or releases of WebLogic?
    If not, is there a way to build on the netui:taglibs to extend
    their
    functionality?
    I know the grid has paging functionality but it ties you to rowsetsfor input, whereas the repeater is much more flexible.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui-data:declarePageInput name="displayProducts" type="repeaterPaging.Controller.Product[]"/>
    <netui:html>
    <head>
    <title>Paging with the Repeater</title>
    </head>
    <body>
    <p>
    <b>Paging with the Repeater</b>
    >>
    >> <!-- Pager Text -->
    <netui:label value="Page {request.currentPage} of {request.lastPage}"/>
    <!-- Previous page anchor -->
    <%if(request.getAttribute("prevPage") != null) { %>
    <netui:anchor action="page">
    Previous
    <netui:parameter name="_page" value="{request.prevPage}"/>
    </netui:anchor>
    <% } else {%>
    <!-- don't render the anchor when there is no previous
    page -->
    <netui:label value="Previous"/>
    <% } %>
    <!-- Next page anchor -->
    <% if(request.getAttribute("nextPage") != null) { %>
    <netui:anchor action="page">
    Next
    <netui:parameter name="_page" value="{request.nextPage}"/>
    </netui:anchor>
    <% } else {%>
    <!-- don't render the anchor when there is no next page
    -->
    <netui:label value="Next"/>
    <% } %>
    >> <!-- display the current window into the data set -->
    <netui-data:repeater dataSource="{pageInput.displayProducts}"
    ignoreNulls="true">
    <netui-data:repeaterHeader>
    <table class="tablebody" border="1" width="60%">
    <tr class="tablehead" valign="top">
    <th width="30%">Product ID</th>
    <th>Name</th>
    </tr>
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr valign="top">
    <td align="center"><netui:label value="{container.item.id}"
    defaultValue=" "></netui:label></td>
    <td><netui:label value="{container.item.name}"
    defaultValue=" "></netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></table></netui-data:repeaterFooter>
    </netui-data:repeater>
    </p>
    </body>
    </netui:html>
    package repeaterPaging;
    import com.bea.wlw.netui.pageflow.Forward;
    import com.bea.wlw.netui.pageflow.PageFlowController;
    * @jpf:controller
    * @jpf:forward name="success" path="index.jsp"
    * @jpf:forward name="page" path="page.do"
    * @jpf:view-properties view-properties::
    * <!-- This data is auto-generated. Hand-editing this section is not
    recommended. -->
    * <view-properties>
    * <pageflow-object id="pageflow:/repeaterPaging/Controller.jpf"/>
    * <pageflow-object id="action:begin.do">
    * <property value="80" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action:page.do">
    * <property value="120" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="action-call:@page:index.jsp@#@action:page.do@">
    * <property value="204,180,180,156" name="elbowsX"/>
    * <property value="81,81,92,92" name="elbowsY"/>
    * <property value="West_0" name="fromPort"/>
    * <property value="East_1" name="toPort"/>
    * </pageflow-object>
    * <pageflow-object id="page:index.jsp">
    * <property value="240" name="x"/>
    * <property value="100" name="y"/>
    * </pageflow-object>
    * <pageflow-object id="forward:path#success#index.jsp"/>
    * <pageflow-object id="forward:path#page#page.do"/>
    * </view-properties>
    public class Controller extends PageFlowController
    // number of items to show on a single page
    private static final int PAGE_SIZE = 5;
    // URL parameter key for the value that will store the current page
    private static final String PAGE_PARAM_KEY = "_page";
    // Array to hold the entire data set
    private Product[] products = null;
    * Forward to the "page" action to set-up the first page of
    * data to display in index.jsp.
    * @jpf:action
    protected Forward begin()
    return new Forward("page");
    * Change the page of data that is displayed in index.jsp. This
    action
    * is used if paging to either the previous or to the next page.
    * @jpf:action
    protected Forward page()
    Forward f = new Forward("success");
    page(f);
    return f;
    * Implement data set paging. This method uses a simple _page paramater
    on the URL
    * to indicate the correct "page" to display when "Prev" or "Next"
    are clicked
    * in the JSP. The key principle at work here is a sliding window
    of size PAGE_SIZE
    * that is moved forward and backward through the complete dataset.
    This window
    * contains the set of items to render for a single "page" in the
    repeater. As
    * the current page changes, this window (an array of size PAGE_SIZE)
    is
    * reconstructed.
    * The pager consists of three parts:
    * - a simple "Page # of #" label
    * - a previous anchor that is enabled when there is a previouspage
    * - a next anchor that is enabled when there is a next page
    * To render a "page" of data, the _page parameter is convertedfrom
    a String
    * to an int. Using the page integer, the start and end of a window
    into the
    * complete data set is calculated. This windows slides back and
    forth along the
    * data set in PAGE_SIZE increments depending on the value of the
    current page.
    * In this case, with a PAGE_SIZE of 5 and data set size of 17,the
    possible windows
    * are:
    * products[0] -> products[4]
    * products[5] -> products[9]
    * products[10] -> products[14]
    * products[15] -> products[16]
    * Thus, the lastPage value is 4, which is calculated with the Math.ceil(...)
    * call below.
    * Given the start and end of this window, a temporary array ofsize
    PAGE_SIZE
    * is created to hold references to the items that should render
    from the complete
    * data set. This array is passed to the page as a JPF page input
    and is rendered
    * with the <netui-data:repeater/>.
    * Finally, four additional values are made available to the page
    in the request
    * and are used to render "Page # of #" and to provide parameters
    to anchors that
    * will display the previous and next pages:
    * - Page # of # -- the first # is "currentPage" and the second#
    is "lastPage"
    * - prevPage -- the int value of the previous page. If there is
    no previous page,
    * this value is null in the request
    * - nextPage -- the int value of the next page. If there is no
    next page, this value
    * is null in the request.
    * Notes:
    * - In order to have multiple repeaters on a page operating independently,
    * the "_page" parameter would need to change to include a namespace
    that
    * would be used when finding the current page for a data set.
    * - This JPF is implemented with a single "page" action that performs
    both
    * next and previous paging. This could also be implemented with
    "prevPage" and
    * "nextPage" actions that implement additional logic that runs
    on the previous
    * and next transitions.
    * - No real error checking is done to ensure that the PAGE_SIZE
    is greater than 0.
    * Handling errors:
    * - If parsing _page from the request fails to convert to an int,
    a NumberFormatException
    * is shown in the console and the first page will is used.
    * - If the current page value is greater than the number of pages,
    the last page will
    * be displayed.
    private void page(Forward f)
    assert PAGE_SIZE > 0;
    // calculate the last page
    int lastPage = (int)Math.ceil((float)products.length / (float)PAGE_SIZE);
    int currentPage = 1; // default page is page 1
    Product[] displayProducts = new Product[PAGE_SIZE];
    String currentPageStr = getRequest().getParameter(PAGE_PARAM_KEY);
    if(currentPageStr != null)
    try
    currentPage = Integer.parseInt(currentPageStr);
    catch(NumberFormatException nfe)
    nfe.printStackTrace();
    // continue with a current page of 1
    // ensure the current page is not greater than the number
    of pages
    if(currentPage > lastPage)
    currentPage = lastPage;
    // index into the entire data set at which the window starts
    // page indices are 1 based, adjust to be 0 based for accessing
    // the Product[]
    int start = (currentPage-1) * PAGE_SIZE;
    // index into the entire data set at which the window ends or
    the index
    // of the last item when rendering the last page
    int end = (currentPage != lastPage ? start + PAGE_SIZE : products.length);
    // fill-up the set of Product objects to render up to PAGE_SIZE
    // but don't run off the end of the products array
    for(int i = 0; i < PAGE_SIZE && (start+i < products.length);
    i++)
    displayProducts[i] = products[start + i];
    // set the previous page
    int prevPage = currentPage-1;
    if(prevPage > 0)
    getRequest().setAttribute("prevPage", new Integer(prevPage));
    // set the next page
    int nextPage = currentPage+1;
    if(nextPage <= lastPage)
    getRequest().setAttribute("nextPage", new Integer(nextPage));
    // set the current and last pages in the request in order to
    show "Page # of #"
    getRequest().setAttribute("currentPage", new Integer(currentPage));
    getRequest().setAttribute("lastPage", new Integer(lastPage));
    // set the current window in to the data set as a page input
    f.addPageInput("displayProducts", displayProducts);
    return;
    * Initialize a simple, sample data set that contains
    * 17 products with IDs running from 1-17 and text "Widget 1" to
    * "Widget 17".
    public void onCreate()
    int size = 17;
    products = new Product[size];
    for(int i = 1; i <= size; i++)
    products[i-1] = new Product("Widget " + i, i);
    * Simple JavaBean that contains production information.
    public static class Product
    implements java.io.Serializable
    private String name;
    private int id;
    public Product(String name, int id)
    this.name = name;
    this.id = id;
    public String getName() {return name;}
    public int getId() {return id;}

Maybe you are looking for

  • BI Report - Currency Text

    Hi All, We have BI Reports which has amount values and its corresponding currency displayed. say,, PO Number 8500000543 with Amount values as $65 When you run the BI Report, the PO Number is correctly displaying with amount values as $65, but when a

  • Can't use my epson scanner

    Hi all, Sorry if this isn't the right forum... I've installed the Mac driver for my Epson 2400 photo... when I start Image Capture the scanner starts straight away, but no other apps can find it (e.g. Acrobat, Photoshop)... they should be able to as

  • How to remove the incomplete procedure

    hi all, how can i remove the incomplete procedure my net value is comming incomplete so can any body suggest how can i remove this net value from my incomplete procedure... please help with regards subrat

  • IMac 21.5 Late 2013 second hard drive

    Hi guys! I have a late 2013 iMac 21.5 with 1Tb HDD and would like to know if it's possible to install a second hard drive, probably an SSD to run OS and programs, leaving the 1Tb HDD there as well using it mainly for storage. If it's not recommended,

  • An example of multicam project

    Hi(Bonjour) everyone. Here's an example of a multitake project done in FCE. The workflow: -We've recorded a straigth 110 bpm audio track on an iPod shuffle for the dancer in Logic. -On set, listening this track, she repeated the choregraphy around 20