facebook

I get this error when trying StrutsLoginDemo

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #231772 Reply

    I get this error with tomcat 4.1 + eclipse 3.0.2

    SEVERE: Parse Error at line 6 column 52: Document root element “web-app”, must match DOCTYPE root “null”.
    org.xml.sax.SAXParseException: Document root element “web-app”, must match DOCTYPE root “null”.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)[quote]– System Setup ——————————-
    Operating System and version: windows xp
    Eclipse version: 3.0.2
    Eclipse build id:
    Fresh Eclipse install (y/n): n
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:

    #231777 Reply

    Riyad Kalla
    Member

    You need to use Tomcat 5, not Tomcat 4.

    #231790 Reply

    Thanks Riyad,
    What if my company wants to go with tomcat 4.1.X and struts 1.1 with eclipse, ?
    Do i need to go for some lower version of eclipse ?
    Please Advice
    Thanks for ur reply

    #231791 Reply

    Riyad Kalla
    Member

    Martin,
    It shouldn’t be a problem, what you need to do is when creating a new web project, create J2EE 1.3 spec, the problem is that our default (and what you likely chose) was J2EE 1.4, which created a web.xml file that Tomcat 4 doesn’t understand.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: I get this error when trying StrutsLoginDemo

You must be logged in to post in the forum log in