-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit of simple myrrix example (not really tested)
- Loading branch information
Showing
11 changed files
with
1,135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<parent> | ||
<artifactId>myrrix-example-parent</artifactId> | ||
<groupId>org.barcelonamedia.myrrixexample</groupId> | ||
<version>0.1</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>myrrix-web</artifactId> | ||
<packaging>war</packaging> | ||
<name>Myrrix Web (WAR)</name> | ||
<version>0.1</version> | ||
<description>Customized Myrrix WAR with rescorer</description> | ||
<url>http://myrrix.com/documentation-serving-layer/</url> | ||
<inceptionYear>2012</inceptionYear> | ||
<build> | ||
<finalName>myrrix-web</finalName> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>net.myrrix</groupId> | ||
<artifactId>myrrix-web-common</artifactId> | ||
<version>0.11</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.barcelonamedia.myrrixexample</groupId> | ||
<artifactId>rescorer</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<repositories> | ||
<repository> | ||
<id>sonatype-nexus-releases</id> | ||
<name>Sonatype Nexus Releases</name> | ||
<url>https://oss.sonatype.org/content/repositories/releases</url> | ||
</repository> | ||
<repository> | ||
<id>sonatype-nexus-snapshot</id> | ||
<name>Sonatype Nexus Snapshots</name> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
</repository> | ||
</repositories> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright Myrrix Ltd | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<web-app version="3.0" | ||
xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> | ||
|
||
<context-param> | ||
<param-name>net.myrrix.web.InitListener.RESCORER_PROVIDER_CLASS</param-name> | ||
<param-value>org.barcelonamedia.myrrixexample.rescorer.MultiplyRescorerProvider</param-value> | ||
</context-param> | ||
<!-- | ||
<context-param> | ||
<param-name>net.myrrix.web.InitListener.LOCAL_INPUT_DIR</param-name> | ||
<param-value>CHANGEME</param-value> | ||
</context-param> | ||
--> | ||
<!-- | ||
<context-param> | ||
<param-name>net.myrrix.web.InitListener.LICENSE_FILE</param-name> | ||
<param-value>CHANGEME</param-value> | ||
</context-param> | ||
--> | ||
|
||
<description>Myrrix Serving Layer web application</description> | ||
<display-name>Myrrix</display-name> | ||
|
||
<distributable/> | ||
|
||
<listener> | ||
<listener-class>net.myrrix.web.InitListener</listener-class> | ||
</listener> | ||
|
||
<servlet> | ||
<servlet-name>PreferenceServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.PreferenceServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>IngestServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.IngestServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
<multipart-config> | ||
<location>/tmp</location> | ||
</multipart-config> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>RecommendServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.RecommendServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>RecommendToManyServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.RecommendToManyServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>RecommendToAnonymousServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.RecommendToAnonymousServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>SimilarityServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.SimilarityServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>EstimateServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.EstimateServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>BecauseServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.BecauseServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>RefreshServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.RefreshServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>ReadyServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.ReadyServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>AllUserIDsServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.AllUserIDsServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>AllItemIDsServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.AllItemIDsServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>LogServlet</servlet-name> | ||
<servlet-class>net.myrrix.web.servlets.LogServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>PreferenceServlet</servlet-name> | ||
<url-pattern>/pref/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>IngestServlet</servlet-name> | ||
<url-pattern>/ingest/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>RecommendServlet</servlet-name> | ||
<url-pattern>/recommend/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>RecommendToManyServlet</servlet-name> | ||
<url-pattern>/recommendToMany/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>RecommendToAnonymousServlet</servlet-name> | ||
<url-pattern>/recommendToAnonymous/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>SimilarityServlet</servlet-name> | ||
<url-pattern>/similarity/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>EstimateServlet</servlet-name> | ||
<url-pattern>/estimate/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>BecauseServlet</servlet-name> | ||
<url-pattern>/because/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>RefreshServlet</servlet-name> | ||
<url-pattern>/refresh/*</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>ReadyServlet</servlet-name> | ||
<url-pattern>/ready</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>AllUserIDsServlet</servlet-name> | ||
<url-pattern>/user/allIDs</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>AllItemIDsServlet</servlet-name> | ||
<url-pattern>/item/allIDs</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>LogServlet</servlet-name> | ||
<url-pattern>/log.txt</url-pattern> | ||
</servlet-mapping> | ||
|
||
<welcome-file-list> | ||
<welcome-file>index.jspx</welcome-file> | ||
</welcome-file-list> | ||
|
||
<error-page> | ||
<exception-type>java.lang.Throwable</exception-type> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>400</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>401</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>404</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>405</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>500</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
<error-page> | ||
<error-code>503</error-code> | ||
<location>/error.jspx</location> | ||
</error-page> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"> | ||
<!-- | ||
Copyright Myrrix Ltd | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<jsp:directive.page contentType="text/html"/> | ||
<jsp:directive.page isErrorPage="true"/> | ||
<jsp:directive.page session="false"/> | ||
<jsp:directive.page import="java.io.PrintWriter"/> | ||
<jsp:text><![CDATA[<!DOCTYPE html>]]></jsp:text> | ||
<html> | ||
<head> | ||
<title>Error</title> | ||
<style type="text/css"><![CDATA[body{background-color:#202020} body,p{font-family:monospace;color:white}]]></style> | ||
</head> | ||
<body> | ||
<p><strong>Error ${pageContext.errorData.statusCode}</strong> : ${pageContext.errorData.requestURI}</p> | ||
<p><pre> | ||
<jsp:scriptlet> | ||
Throwable t = pageContext.getErrorData().getThrowable(); | ||
if (t != null) { | ||
t.printStackTrace(new PrintWriter(out)); | ||
} | ||
</jsp:scriptlet> | ||
</pre></p> | ||
</body> | ||
</html> | ||
</jsp:root> |
Oops, something went wrong.