Fixed mistake where document doesn't actually have the created body or head in WebPage.java
This commit is contained in:
@@ -3,9 +3,7 @@ package org.openautonomousconnection.webserver.api;
|
|||||||
import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.resource.WebResourceResponsePacket;
|
import org.openautonomousconnection.protocol.packets.v1_0_1.beta.web.impl.resource.WebResourceResponsePacket;
|
||||||
import org.openautonomousconnection.webserver.Main;
|
import org.openautonomousconnection.webserver.Main;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
|
||||||
import org.w3c.dom.html.HTMLBodyElement;
|
import org.w3c.dom.html.HTMLBodyElement;
|
||||||
import org.w3c.dom.html.HTMLDocument;
|
|
||||||
import org.w3c.dom.html.HTMLHeadElement;
|
import org.w3c.dom.html.HTMLHeadElement;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
@@ -44,11 +42,11 @@ public abstract class WebPage {
|
|||||||
*/
|
*/
|
||||||
public WebPage() {
|
public WebPage() {
|
||||||
this.document = documentBuilder.newDocument();
|
this.document = documentBuilder.newDocument();
|
||||||
|
|
||||||
this.head = (HTMLHeadElement) this.document.createElement("head");
|
this.head = (HTMLHeadElement) this.document.createElement("head");
|
||||||
this.body = (HTMLBodyElement) this.document.createElement("body");
|
this.body = (HTMLBodyElement) this.document.createElement("body");
|
||||||
|
|
||||||
this.document.appendChild(this.head);
|
this.document.appendChild(this.head);
|
||||||
|
|
||||||
this.document.appendChild(this.body);
|
this.document.appendChild(this.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user