• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

DocumentParseException

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My exception is

An exception has occurred.
You may continue by restarting the session.

org.apache.tapestry.ApplicationRuntimeException
Could not parse specification context:/WEB-INF/Home.page.

org.apache.tapestry.util.xml.DocumentParseException
Attribute "value" must be declared for element type "binding".

org.xml.sax.SAXParseException
Attribute "value" must be declared for element type "binding".
columnNumber: 55
lineNumber: 10
systemId: jndi:/localhost/HelloWorld/WEB-INF/Home.page
Stack Trace:
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(XMLDTDValidator.java:1306)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1971)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:816)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
org.apache.commons.digester.Digester.parse(Digester.java:1548)
org.apache.tapestry.parse.SpecificationParser.parse(SpecificationParser.java:642)
org.apache.tapestry.parse.SpecificationParser.parsePageSpecification(SpecificationParser.java:692)
org.apache.tapestry.engine.DefaultSpecificationSource.parseSpecification(DefaultSpecificationSource.java:161)
org.apache.tapestry.engine.DefaultSpecificationSource.getPageSpecification(DefaultSpecificationSource.java:289)
org.apache.tapestry.resolver.PageSpecificationResolver.found(PageSpecificationResolver.java:229)
org.apache.tapestry.resolver.PageSpecificationResolver.searchForPage(PageSpecificationResolver.java:148)
org.apache.tapestry.resolver.PageSpecificationResolver.resolve(PageSpecificationResolver.java:117)
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:144)
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:195)
org.apache.tapestry.engine.HomeService.service(HomeService.java:59)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:889)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)



My home.java is



package com.ttdev.helloworld;

import org.apache.tapestry.html.BasePage;

public class Home extends BasePage{

public String getGreetingSubject() {
return "John";
}

}



My Home.html is
<html>
hello!<span jwcid="subject">world</span>
</html>



My Home.page is

<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">


<page-specification class="com.ttdev.helloworld.Home">

<component id="subject" type="Insert">
<binding name="value" value="ognl:greetingSubject"/>
</component>

</page-specification>



Please help me to get it solve
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using version 3.0 of Tapestry here. There is no "value" attribute in the binding tag, only "name" and "expression". The "expression" has been replaced by "value" in version 4.0

If you're using 3.0, replace the binding with <binding name="value" expression="ognl:greetingSubject"/>.
If you're using 4.0, change your xml DOCTYPE.
[ November 07, 2006: Message edited by: Satou kurinosuke ]
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!