facebook

Document root element is missing

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #205020 Reply

    gilesp
    Member

    Hi guys

    I have imported an existing project i have into EclipseM7, MyEclipse3.7. It looks like my web.xml and orion-web.xml haven’t been parsed / found correctly. They both have an error right at the top of the file. Clicking on the little red error mark reveals nothing.

    Because of this all my jsps are complaining about not being able to find the document root. (exact error message: Error parsing tag-library/WEB-INF/struts-html.tld)

    My MYMETADATA file looks like this:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project-module context-root=”/gEm” name=”gEm”
    archive=”HEAD_7927-dtt-careerdevelopmentapplication.war” type=”WEB”>
    <attributes>
    <attribute name=”webrootdir” value=”/src/webapps/eGemweb”/>
    </attributes>
    </project-module>

    MY .PROJECT file looks like this:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <projectDescription>
    <name>Stops</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>de.bb.bje.eclipse.IncrementalJspBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    <buildCommand>
    <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    </buildSpec>
    <natures>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
    </projectDescription>

    I’ve tryed removing my web project so i can add the web context again… but the option is greyed out under MyEclipse/Add Web project capabilities

    Any clues / things i’m blatantly missing?
    Regards
    Giles

    #205021

    gilesp
    Member

    … further to this…

    In an attempt to try again : I’ve deleted everything, and tried to do it all again. I cannot use the wizard to initially create the web project. The error i get says i can’t nest the output folder in the source folder of my project. I understand this, but i never get the chance to specify where i will point my ouput folder. (the next button in the create web project is greyed out, and i can only click OK)

    As you know, this is normally done in project properties, which i can change once i click past the error message. However (next freak) – the okay button is greyed out !

    The way i got past this before, was i just copied the .project and .myeclipse files from an existing project and changed them as required.

    Hope this doesn’t confuse more…

    #205106

    Scott Anderson
    Participant

    Giles,

    I believe the issue you’re seeing is that your webroot directory can’t be under your source tree. The reason this is prohibited is that your java classes automatically get compiled and placed in <webroot>/WEB-INF/classes, as required by the WAR packaging spec. So, placing the webroot as you did in the source tree causes the source and output to overlap. This is why the wizard will not finish, since it would result in an illegal configuration. By the way, the source/output non-overlap requirement is an Eclipse issue. However MyEclipse specifies that the output directory for a web project is WEB-INF/classes so that deployment will function properly.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Document root element is missing

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