1 Reply Latest reply on Oct 27, 2008 10:26 AM by janvandeklok

    Problem with using cookie for locale

    janvandeklok

      Hello,
        I'm new to Seam an we have just installed seam 2.1.0 GA.


      Now I want to store the locale in a cookie and added the line
       



      <international:locale-selector cookie-enabled="true"/>




      to the components.xml (just like the documantation says).
      Unfortunatly when starting the server, the components.xml failt to load, giving me this exception:
      Caused by: org.dom4j.DocumentException: Error on line 47 of document  : The prefix international for element international:locale-selector is not bound. Nested exception: The prefix international for element international:locale-selector is not bound.
              at org.dom4j.io.SAXReader.read(SAXReader.java:482)
              at org.dom4j.io.SAXReader.read(SAXReader.java:343)
              at org.jboss.seam.util.XML.getRootElement(XML.java:24)
              at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:217)



      How do I bind this element??? I can't find it in the documentation how to do this.


      By the way, how can I search this forum for key words??


      Your input will be greatly appreciated,


      Jan van de Klok

        • 1. Re: Problem with using cookie for locale
          janvandeklok

          Just solved my own problem.


          The reverse enginering process in 2.1.0.GA did not generate the



          xmlns:international="http://jboss.com/products/seam/international" 





          namespace in the components.xml. I have changed the components element in components.xml to




          <components xmlns="http://jboss.com/products/seam/components" 
                      xmlns:core="http://jboss.com/products/seam/core"
                      xmlns:persistence="http://jboss.com/products/seam/persistence" 
                      xmlns:drools="http://jboss.com/products/seam/drools"
                      xmlns:bpm="http://jboss.com/products/seam/bpm" 
                      xmlns:security="http://jboss.com/products/seam/security" 
                      xmlns:mail="http://jboss.com/products/seam/mail"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xmlns:international="http://jboss.com/products/seam/international" 
            xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd 
                           http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd 
                           http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd 
                           http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd 
                           http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd 
                           http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd 
                           http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd 
                           http://jboss.com/products/seam/international http://jboss.com/products/seam/international-2.1.xsd" >




          and now it works fine!


          Gr Jan