I discovered an odd occurrence using the sis-webapp demo. I'm running
Tomcat 7.0.53 on Mac OSX Mavericks. I took the approach of modifying
the web.xml file in the source tree (attaching the contents here) and
running mvm clean package to create the war file.
Then I copied the .war file to Tomcat's web apps directory.
When I tried to do a request to the web page I get an error like the
following in the log:
[INFO] Existing qtree index at: [/path/to/qtree/index/dir/] not found.
Creating new index.
ava.io.FileNotFoundException: /path/to/sis-location-config.xml (No
such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at
org.apache.sis.services.LocationServlet.init(LocationServlet.java:139)
As you can see below I've changed the parameters in web.xml. I don't
know where it's getting these values from. The default qtree location
wasn't even in the original xml. I added my own. I've never had an
issue like this where Tomcat didn't seem to read context-params. Has
anyone else experienced this?
Thanks,
Greg
web.xml below:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
<display-name>Apache SIS</display-name>
<context-param>
<param-name>org.apache.sis.services.config.qIndexPath</param-name>
<param-value>/Users/greddin/sis-data/qtree</param-value>
</context-param>
<context-param>
<param-name>org.apache.sis.services.config.geodataPath</param-name>
<param-value>/Users/greddin/sis-data/geodata</param-value>
</context-param>
<context-param>
<param-name>org.apache.sis.services.config.filePath</param-name>
<param-value>/Users/greddin/sis-data/sis-location-config.xml</param-value>
</context-param>
<servlet>
<servlet-name>LocationServlet</servlet-name>
<servlet-class>org.apache.sis.services.LocationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LocationServlet</servlet-name>
<url-pattern>/location</url-pattern>
</servlet-mapping>
</web-app>