Ignore:
Timestamp:
2015-02-10T18:07:10+13:00 (9 years ago)
Author:
ak19
Message:

Adjusting gs3-server code to work with changes made to 29686 where web.xml was split into web.xml and servlets.xml, with the first including the second.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server3Settings.java

    r25951 r29728  
    44import java.awt.event.*;
    55import java.io.File;
     6import java.io.FileInputStream;
    67import java.util.ArrayList;
    78import java.util.HashMap;
     
    910
    1011import org.w3c.dom.*;
     12import org.xml.sax.InputSource;
    1113
    1214import org.greenstone.util.ScriptReadWrite;
    1315
    1416import org.greenstone.util.GlobalProperties;
     17import org.greenstone.gsdl3.util.GSEntityResolver;
    1518import org.greenstone.gsdl3.util.GSXML;
    1619import org.greenstone.gsdl3.util.XMLConverter;
     
    4144    File web_xml = new File(GlobalProperties.getGSDL3Home() + File.separator + "WEB-INF" + File.separator + "web.xml");
    4245    XMLConverter converter = new XMLConverter();
    43     Document web_config = converter.getDOM(web_xml);
     46    // web.xml now includes the new file servlets.xml which defines entities used therein
     47    // So when loading web.xml's DOM, need to resolve entities in web.xml. And for this,
     48    // need to instruct the entity resolver to load included files relative to web.xml's location
     49    Document web_config = converter.getDOM(web_xml, new GSEntityResolver(web_xml.getParentFile()));
    4450    if (web_config == null) {
    4551        logger.error("web.xml is null! "+web_xml.getAbsolutePath());
Note: See TracChangeset for help on using the changeset viewer.