tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Francisco Sabugal <daniel.franci...@universia.net>
Subject Re: problems with EL in tiles-defs.xml
Date Wed, 17 Jun 2009 09:55:40 GMT
Sorry, I have realized that I was using the DTD for the version 2.0.
Thanks anyway.

Best regards.


Daniel Francisco Sabugal escribió:
> Hi,
>
> I'm trying to use the EL within the tiles-defs.xml but i'm having some
> troubles. I get the following exception when the file is parsed:
>
> 2009-06-17 10:40:08,960 ERROR [org.apache.commons.digester.Digester]
> Parse Error at line 50 column 120: Attribute "expression" must be
> declared for element type "put-attribute".
> org.xml.sax.SAXParseException: Attribute "expression" must be declared
> for element type "put-attribute".
>
> I'm using Tiles 2.1.2 integrated with Struts 2.1.6.
>
> The portion of tiles-defs.xml where the error ocurrs is the following:
>
>     <definition name="contents.home.tabContent.column1"
> template="/jsp/templates/homeLayout_mainColumn.jsp">
>         <put-attribute name="top"
> expression="${container}/${country}/${language}/${portal}/${section}/especialTop.html"/>
>         <put-list-attribute name="left">
>             <add-attribute
> expression="${container}/${country}/${language}/${portal}/${section}/especialLeft.html"
> />
>         </put-list-attribute>
>         <put-list-attribute name="right">
>             <add-attribute
> expression="${container}/${country}/${language}/${portal}/${section}/especialRight.html"
> />
>         </put-list-attribute>
>     </definition>
>
> I don't understand why the exception says that attribute "expression" is
> missing, because it's there.
>
> The full stack trace is:
>
> 2009-06-17 10:40:08,960 ERROR [org.apache.commons.digester.Digester]
> Parse Error at line 50 column 120: Attribute "expression" must be
> declared for element type "put-attribute".
> org.xml.sax.SAXParseException: Attribute "expression" must be declared
> for element type "put-attribute".
>     at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>     at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>     at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1306)
>     at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1971)
>     at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:816)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:322)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>     at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>     at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>     at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>     at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>     at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>     at org.apache.commons.digester.Digester.parse(Digester.java:1788)
>     at
> org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:325)
>     at
> org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:274)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:235)
>     at
> org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:57)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:223)
>     at
> org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:57)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:223)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:205)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:188)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:151)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:119)
>     at
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:53)
>     at
> org.apache.tiles.definition.UrlDefinitionsFactory.getDefinition(UrlDefinitionsFactory.java:104)
>     at
> org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:363)
>     at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:616)
>     at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
>     at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
>     at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
>     at
> com.opensymphony.xwork2.interceptor.TimerInterceptor.invokeUnderTiming(TimerInterceptor.java:124)
>     at
> com.opensymphony.xwork2.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:111)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.LoggingInterceptor.intercept(LoggingInterceptor.java:56)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.BreadcrumbInterceptor.intercept(BreadcrumbInterceptor.java:82)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.ServiceInViewInterceptor.intercept(ServiceInViewInterceptor.java:104)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.SectionSelectionInterceptor.intercept(SectionSelectionInterceptor.java:122)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.SectionMappingInterceptor.intercept(SectionMappingInterceptor.java:123)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.StaticContentPathInterceptor.intercept(StaticContentPathInterceptor.java:153)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.DateInterceptor.intercept(DateInterceptor.java:64)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
>     at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
>     at
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
>     at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
>     at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
>     at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
>     at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.LocaleInterceptor.intercept(LocaleInterceptor.java:95)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.PortalInfoInterceptor.intercept(PortalInfoInterceptor.java:74)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.ContentsPortalSubdomainInterceptor.intercept(ContentsPortalSubdomainInterceptor.java:127)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> net.universia.contents.interceptor.UniversiaCountryDomainInterceptor.intercept(UniversiaCountryDomainInterceptor.java:136)
>     at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>     at
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>     at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
>     at
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>     at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:334)
>     at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>     at
> org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
>     at
> org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
>     at
> org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
>     at
> org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
>     at
> org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>     at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>     at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>     at org.mortbay.jetty.Server.handle(Server.java:324)
>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
>     at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>     at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>     at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
>
> Thanks to all.
>
> Best regards.
>   

-- 
	*Daniel Francisco Sabugal*


*Java/J2EE Developer*

PORTAL UNIVERSIA, S.A.
Ciudad Grupo Santander. Avda. de Cantabria s/n
Edif. Arrecife, planta 00.
28660 Boadilla del Monte - Madrid

Telf: (34) 91 289 59 12 - Fax: (34) 91 257 15 06

daniel.francisco@universia.net <mailto:daniel.francisco@universia.net>
www.universia.es <http://www.universia.es>





******************AVISO LEGAL**********************
Este mensaje es privado y confidencial y solamente para la persona a la que va dirigido. Si
usted ha recibido este mensaje por error, no 
debe revelar, copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al remitente
y borre dicho mensaje y cualquier 
documento adjunto que pudiera contener. No hay renuncia a la confidencialidad ni a ningún
privilegio por causa de transmisión errónea o mal funcionamiento. Cualquier opinión expresada
en este mensaje pertenece únicamente al autor remitente, y no representa necesariamente la
opinión de Universia, a no ser que expresamente se diga y el remitente esté autorizado para
hacerlo.
Los correos electrónicos no son seguros, no garantizan la confidencialidad ni la correcta
recepción de los mismos, dado que pueden ser 
interceptados, manipulados, destruidos, llegar con demora, incompletos, o con virus. Universia
no se hace responsable de 
las alteraciones que pudieran hacerse al mensaje una vez enviado.
Este mensaje sólo tiene una finalidad de información, y no debe interpretarse como una oferta
de venta o de compra de bienes o servicios. En el caso de que el destinatario de este mensaje
no consintiera la utilización del correo electrónico via Internet, rogamos lo ponga en nuestro
conocimiento.
**********************DISCLAIMER*****************
This message is private and confidential and it is intended exclusively for the addressee.
If you receive this message by mistake, you should not disseminate, distribute or copy this
e-mail. Please inform the sender and delete the message and attachments from your system.
No confidentiality nor any privilege regarding the information is waived or lost by any mistransmission
or malfunction.
Any views or opinions contained in this message are solely those of the author, and do not
necessarily represent those of Universia, 
unless otherwise specifically stated and the sender is authorised to do so.
E-mail transmission cannot be guaranteed to be secure, confidential, or error-free, as information
could be intercepted, corrupted, lost, 
destroyed, arrive late, incomplete, or contain viruses. Universia does not accept responsibility
for any changes in the 
contents of this message after it has been sent. This message is provided for informational
purposes and should not be construed as a solicitation or offer to buy or sell any services
or goods. If the addressee of this message does not consent to the use of internet e-mail,
please communicate it to us.




Mime
View raw message