Alexander Wels has uploaded a new change for review.

Change subject: engine,userportal,webadmin: rearrange uris
......................................................................

engine,userportal,webadmin: rearrange uris

- Added new welcome war file that maps to /ovirt-engine
- Fixed user portal GWT generation to now generate as userportal
  instead of full package name.
- Updated context path of user portal to map to
  /ovirt-engine/userportal.
- Modified userportal pom.xml so generated GWT code is placed in
  root of the war instead of userportal, to solve double name issue
- Updated context path of webadmin to map to
  /ovirt-engine/webadmin
- Modified webadmin pom.xml so generated GWT code is placed in
  root of the war instead of webadmin, to solve double name issue

Change-Id: I9cb4822f6bf4d372715e12858635db5ed3edd115
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=961677
Signed-off-by: Alexander Wels <aw...@redhat.com>
---
M backend/manager/modules/pom.xml
M backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
A backend/manager/modules/welcome/pom.xml
R 
backend/manager/modules/welcome/src/main/java/org/ovirt/engine/core/WelcomeServlet.java
A backend/manager/modules/welcome/src/main/resources/META-INF/MANIFEST.MF
A backend/manager/modules/welcome/src/main/resources/messages.properties
A backend/manager/modules/welcome/src/main/webapp/WEB-INF/404.jsp
A backend/manager/modules/welcome/src/main/webapp/WEB-INF/ovirt-engine.jsp
A backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml
A backend/manager/modules/welcome/src/main/webapp/splash.js
R 
backend/manager/modules/welcome/src/test/java/org/ovirt/engine/core/WelcomeServletTest.java
M ear/pom.xml
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
M 
frontend/webadmin/modules/frontend/src/main/resources/META-INF/web-fragment.xml
M frontend/webadmin/modules/userportal-gwtp/pom.xml
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
M frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
D frontend/webadmin/modules/userportal-gwtp/src/main/webapp/index.html
M frontend/webadmin/modules/webadmin/pom.xml
M frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
D frontend/webadmin/modules/webadmin/src/main/webapp/index.html
M packaging/branding/ovirt.brand/welcome_page.template
22 files changed, 352 insertions(+), 122 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/20473/1

diff --git a/backend/manager/modules/pom.xml b/backend/manager/modules/pom.xml
index 8f7b073..76904db 100644
--- a/backend/manager/modules/pom.xml
+++ b/backend/manager/modules/pom.xml
@@ -25,6 +25,7 @@
     <module>restapi</module>
     <module>root</module>
     <module>branding</module>
+    <module>welcome</module>
   </modules>
 
   <dependencies>
diff --git a/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml 
b/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
index 676e8f5..3465ef8 100644
--- a/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
+++ b/backend/manager/modules/root/src/main/webapp/WEB-INF/web.xml
@@ -6,19 +6,6 @@
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
   version="3.0">
 
-  <context-param>
-    <param-name>obrandThemePath</param-name>
-    <param-value>/ovirt-engine-theme</param-value>
-  </context-param>
-  <context-param>
-    <param-name>obrandResourcePath</param-name>
-    <param-value>/ovirt-engine-theme-resource</param-value>
-  </context-param>
-  <context-param>
-    <param-name>obrandApplicationName</param-name>
-    <param-value>welcome</param-value>
-  </context-param>
-
   <!-- File servlet instance to serve the CA certificate: -->
   <servlet>
     <servlet-name>PKIResourceServlet.ca</servlet-name>
@@ -157,84 +144,24 @@
     <url-pattern>/OvirtEngineWeb/ValidateSession</url-pattern>
   </servlet-mapping>
 
-  <!-- Branding Servlet -->
-  <servlet>
-    <servlet-name>BrandingServlet</servlet-name>
-    
<servlet-class>org.ovirt.engine.core.branding.BrandingServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>BrandingServlet</servlet-name>
-    <url-pattern>/ovirt-engine-theme/*</url-pattern>
-  </servlet-mapping>
-
-  <!-- Branding Cascading Resource Servlet -->
-  <servlet>
-    <servlet-name>BrandingCascadingResourceServlet</servlet-name>
-    
<servlet-class>org.ovirt.engine.core.branding.BrandingCascadingResourceServlet</servlet-class>
-  </servlet>
-  <servlet-mapping>
-    <servlet-name>BrandingCascadingResourceServlet</servlet-name>
-    <url-pattern>/ovirt-engine-theme-resource/*</url-pattern>
-  </servlet-mapping>
-
   <!-- PageNotFound Servlet -->
   <servlet>
-    <servlet-name>PageNotFoundServlet</servlet-name>
-    <jsp-file>/WEB-INF/404.jsp</jsp-file>
+      <servlet-name>PageNotFoundForwardServlet</servlet-name>
+      
<servlet-class>org.ovirt.engine.core.utils.servlet.PageNotFoundForwardServlet</servlet-class>
+      <init-param>
+          <param-name>targetContext</param-name>
+          <param-value>/ovirt-engine/</param-value>
+      </init-param>
+      <init-param>
+          <param-name>pageNotFoundURI</param-name>
+          <param-value>/404.html</param-value>
+      </init-param>
   </servlet>
 
   <servlet-mapping>
-    <servlet-name>PageNotFoundServlet</servlet-name>
+    <servlet-name>PageNotFoundForwardServlet</servlet-name>
     <url-pattern>/404.html</url-pattern>
   </servlet-mapping>
-
-  <!-- Welcome page -->
-  <servlet>
-    <servlet-name>WelcomeServlet</servlet-name>
-    <servlet-class>org.ovirt.engine.core.WelcomeServlet</servlet-class>
-  </servlet>
-
-  <servlet-mapping>
-    <servlet-name>WelcomeServlet</servlet-name>
-    <url-pattern>/ovirt-engine</url-pattern>
-  </servlet-mapping>
-
-  <!-- Filters -->
-  <!-- Locale Filter, determines the user locale -->
-  <filter>
-    <filter-name>LocaleFilter</filter-name>
-    
<filter-class>org.ovirt.engine.core.utils.servlet.LocaleFilter</filter-class>
-  </filter>
-  <!-- Branding Filter, passes branding information to jsps -->
-  <filter>
-    <filter-name>BrandingFilter</filter-name>
-    <filter-class>org.ovirt.engine.core.branding.BrandingFilter</filter-class>
-  </filter>
-
-  <filter-mapping>
-    <filter-name>LocaleFilter</filter-name>
-    <url-pattern>/ovirt-engine/*</url-pattern>
-    <dispatcher>REQUEST</dispatcher>
-  </filter-mapping>
-
-  <filter-mapping>
-    <filter-name>LocaleFilter</filter-name>
-    <url-pattern>/*</url-pattern>
-    <dispatcher>ERROR</dispatcher>
-  </filter-mapping>
-
-  <filter-mapping>
-    <filter-name>BrandingFilter</filter-name>
-    <url-pattern>/ovirt-engine/*</url-pattern>
-    <dispatcher>FORWARD</dispatcher>
-    <dispatcher>REQUEST</dispatcher>
-  </filter-mapping>
-
-  <filter-mapping>
-    <filter-name>BrandingFilter</filter-name>
-    <url-pattern>/*</url-pattern>
-    <dispatcher>ERROR</dispatcher>
-  </filter-mapping>
 
   <!-- Go to the index when a page is not found (preserving the
        404 status code): -->
@@ -242,9 +169,4 @@
     <error-code>404</error-code>
     <location>/404.html</location>
   </error-page>
-
-  <!-- This is handled by the welcome servlet -->
-  <welcome-file-list>
-    <welcome-file>ovirt-engine</welcome-file>
-  </welcome-file-list>
 </web-app>
diff --git a/backend/manager/modules/welcome/pom.xml 
b/backend/manager/modules/welcome/pom.xml
new file mode 100644
index 0000000..3144709
--- /dev/null
+++ b/backend/manager/modules/welcome/pom.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.ovirt.engine.core</groupId>
+    <artifactId>manager-modules</artifactId>
+    <version>3.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>welcome</artifactId>
+  <packaging>war</packaging>
+  <name>ovirt-engine welcome</name>
+  <description>oVirt engine welcome pages</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.spec.javax.servlet</groupId>
+      <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.spec.javax.ejb</groupId>
+      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.spec.javax.servlet.jstl</groupId>
+      <artifactId>jboss-jstl-api_1.2_spec</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>${engine.groupId}</groupId>
+      <artifactId>common</artifactId>
+      <version>${engine.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>${engine.groupId}</groupId>
+      <artifactId>utils</artifactId>
+      <version>${engine.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>${engine.groupId}</groupId>
+      <artifactId>branding</artifactId>
+      <version>${engine.version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git 
a/backend/manager/modules/root/src/main/java/org/ovirt/engine/core/WelcomeServlet.java
 
b/backend/manager/modules/welcome/src/main/java/org/ovirt/engine/core/WelcomeServlet.java
similarity index 100%
rename from 
backend/manager/modules/root/src/main/java/org/ovirt/engine/core/WelcomeServlet.java
rename to 
backend/manager/modules/welcome/src/main/java/org/ovirt/engine/core/WelcomeServlet.java
diff --git 
a/backend/manager/modules/welcome/src/main/resources/META-INF/MANIFEST.MF 
b/backend/manager/modules/welcome/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6ac93cb
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Dependencies: org.apache.log4j
\ No newline at end of file
diff --git 
a/backend/manager/modules/welcome/src/main/resources/messages.properties 
b/backend/manager/modules/welcome/src/main/resources/messages.properties
new file mode 100644
index 0000000..bc374f1
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/resources/messages.properties
@@ -0,0 +1,3 @@
+#404 error page
+pagenotfound.page_not_found=Page not found.
+pagenotfound.link=Click here to continue.
diff --git a/backend/manager/modules/welcome/src/main/webapp/WEB-INF/404.jsp 
b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/404.jsp
new file mode 100644
index 0000000..6e4c788
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/404.jsp
@@ -0,0 +1,31 @@
+<%@ page pageEncoding="UTF-8" session="false" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
+<%@ taglib prefix="obrand" uri="obrand" %>
+<fmt:setBundle basename="messages" var="pagenotfound"/>
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+<obrand:favicon />
+<title><fmt:message key="pagenotfound.page_not_found" bundle="${pagenotfound}" 
/></title>
+<obrand:stylesheets />
+</head>
+<body>
+    <div>
+        <div class="obrand_left">
+            <div class="obrand_header_nav">
+                <fmt:message key="obrand.welcome.header.main" />
+            </div>
+        </div>
+        <div class="obrand_right">
+        </div>
+        <div class="obrand_center">
+        </div>
+    </div>
+    <div class="obrand_main">
+        <h2><span class="obrand_section_header"><fmt:message 
key="pagenotfound.page_not_found" bundle="${pagenotfound}" /></span></h2>
+        <a href="/ovirt-engine"><fmt:message key="pagenotfound.link" 
bundle="${pagenotfound}" /></a>
+    </div>
+</body>
+</html>
diff --git 
a/backend/manager/modules/welcome/src/main/webapp/WEB-INF/ovirt-engine.jsp 
b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/ovirt-engine.jsp
new file mode 100644
index 0000000..67750ed
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/ovirt-engine.jsp
@@ -0,0 +1,62 @@
+<%@ page pageEncoding="UTF-8" session="false" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
+<%@ taglib prefix="obrand" uri="obrand" %>
+<fmt:setBundle basename="languages" var="lang" />
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+    <obrand:favicon />
+    <title><fmt:message key="obrand.welcome.title" /></title>
+    <obrand:stylesheets />
+    <script src="splash.js" type="text/javascript"></script>
+</head>
+<body onload="pageLoaded()">
+    <div>
+        <div class="obrand_left">
+            <div class="obrand_header_nav">
+                <fmt:message key="obrand.welcome.header.main" />
+            </div>
+        </div>
+        <div class="obrand_right">
+        </div>
+        <div class="obrand_center">
+        </div>
+    </div>
+    <div class="obrand_main">
+        <div class="obrand_welcome"><fmt:message 
key="obrand.welcome.welcome.text" /></div>
+        <div class="obrand_welcome">
+             <script type="text/JavaScript">
+            <!--
+            document.write('<fmt:message 
key="obrand.welcome.version"><fmt:param value="${requestScope[\'version\']}" /> 
</fmt:message>')
+            //-->
+            </script>
+        </div>
+
+        <noscript id="warningMessage" class="obrand_warningMessage">
+            <b><fmt:message key="obrand.welcome.browser.javascript1" /></b>
+            <fmt:message key="obrand.welcome.browser.javascript2" />
+        </noscript>
+        <div id='dynamicLinksSection' style="display: none;">
+            ${requestScope['sections'].toString()}
+        </div>
+        <div class="obrand_locale_select_panel">
+            <select class="gwt-ListBox obrand_locale_list_box" 
onchange="localeSelected(this)">
+            <c:forEach items="${requestScope['localeKeys']}" var="localeKey">
+                <c:choose>
+                <c:when test="${requestScope['locale'].toString() == 
localeKey}">
+                    <c:set var="selectedLocale" value="${localeKey}"/>
+                    <option value="${localeKey}" 
selected="selected"><fmt:message key="${localeKey}" bundle="${lang}"/></option>
+                </c:when>
+                <c:otherwise>
+                    <option value="${localeKey}"><fmt:message 
key="${localeKey}" bundle="${lang}"/></option>
+                </c:otherwise>
+                </c:choose>
+            </c:forEach>
+            </select>
+            <div class="gwt-Label obrand_locale_selected"><fmt:message 
key="${selectedLocale}" bundle="${lang}"/></div>
+        </div>
+    </div>
+</body>
+</html>
diff --git a/backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml 
b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..346fabd
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+  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";
+  version="3.0">
+
+  <context-param>
+    <param-name>obrandThemePath</param-name>
+    <param-value>/ovirt-engine-theme</param-value>
+  </context-param>
+  <context-param>
+    <param-name>obrandResourcePath</param-name>
+    <param-value>/ovirt-engine-theme-resource</param-value>
+  </context-param>
+  <context-param>
+    <param-name>obrandApplicationName</param-name>
+    <param-value>welcome</param-value>
+  </context-param>
+
+  <!-- Branding Servlet -->
+  <servlet>
+    <servlet-name>BrandingServlet</servlet-name>
+    
<servlet-class>org.ovirt.engine.core.branding.BrandingServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>BrandingServlet</servlet-name>
+    <url-pattern>/ovirt-engine-theme/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- Branding Cascading Resource Servlet -->
+  <servlet>
+    <servlet-name>BrandingCascadingResourceServlet</servlet-name>
+    
<servlet-class>org.ovirt.engine.core.branding.BrandingCascadingResourceServlet</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>BrandingCascadingResourceServlet</servlet-name>
+    <url-pattern>/ovirt-engine-theme-resource/*</url-pattern>
+  </servlet-mapping>
+
+  <!-- PageNotFound Servlet -->
+  <servlet>
+    <servlet-name>PageNotFoundServlet</servlet-name>
+    <jsp-file>/WEB-INF/404.jsp</jsp-file>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>PageNotFoundServlet</servlet-name>
+    <url-pattern>/404.html</url-pattern>
+  </servlet-mapping>
+
+  <!-- Welcome page -->
+  <servlet>
+    <servlet-name>WelcomeServlet</servlet-name>
+    <servlet-class>org.ovirt.engine.core.WelcomeServlet</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>WelcomeServlet</servlet-name>
+    <url-pattern>/index.html</url-pattern>
+  </servlet-mapping>
+
+  <!-- Filters -->
+  <!-- Locale Filter, determines the user locale -->
+  <filter>
+    <filter-name>LocaleFilter</filter-name>
+    
<filter-class>org.ovirt.engine.core.utils.servlet.LocaleFilter</filter-class>
+  </filter>
+  <!-- Branding Filter, passes branding information to jsps -->
+  <filter>
+    <filter-name>BrandingFilter</filter-name>
+    <filter-class>org.ovirt.engine.core.branding.BrandingFilter</filter-class>
+  </filter>
+
+  <filter-mapping>
+    <filter-name>LocaleFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>ERROR</dispatcher>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>BrandingFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+    <dispatcher>FORWARD</dispatcher>
+    <dispatcher>REQUEST</dispatcher>
+    <dispatcher>ERROR</dispatcher>
+  </filter-mapping>
+
+  <!-- Go to the index when a page is not found (preserving the 404 status 
code): -->
+  <error-page>
+    <error-code>404</error-code>
+    <location>/404.html</location>
+  </error-page>
+
+  <!-- This is handled by the welcome servlet -->
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+</web-app>
diff --git a/backend/manager/modules/welcome/src/main/webapp/splash.js 
b/backend/manager/modules/welcome/src/main/webapp/splash.js
new file mode 100644
index 0000000..ee0b887
--- /dev/null
+++ b/backend/manager/modules/welcome/src/main/webapp/splash.js
@@ -0,0 +1,23 @@
+function pageLoaded()
+{
+    document.getElementById("warningMessage").style.display = "none";
+    document.getElementById("dynamicLinksSection").style.display = "block";
+}
+
+function localeSelected(selectBox) {
+    var selectedLocale = selectBox.options[selectBox.selectedIndex].value;
+    var newParam = 'locale=' + encodeURIComponent(selectedLocale);
+    var params = '?' + newParam;
+    var search = document.location.search;
+    // If the "search" string exists, then build params from it
+    if (search) {
+      // Try to replace an existance instance
+      params = search.replace(new RegExp('([\?&])' + 'locale' + '[^&]*'), "$1" 
+ newParam);
+
+      // If nothing was replaced, then add the new param to the end
+      if (params === search) {
+        params += '&' + newParam;
+      }
+    }
+    document.location.href = document.location.pathname + params;
+}
diff --git 
a/backend/manager/modules/root/src/test/java/org/ovirt/engine/core/WelcomeServletTest.java
 
b/backend/manager/modules/welcome/src/test/java/org/ovirt/engine/core/WelcomeServletTest.java
similarity index 100%
rename from 
backend/manager/modules/root/src/test/java/org/ovirt/engine/core/WelcomeServletTest.java
rename to 
backend/manager/modules/welcome/src/test/java/org/ovirt/engine/core/WelcomeServletTest.java
diff --git a/ear/pom.xml b/ear/pom.xml
index 199993c..b183a97 100644
--- a/ear/pom.xml
+++ b/ear/pom.xml
@@ -55,6 +55,13 @@
       <version>${engine.version}</version>
       <type>war</type>
     </dependency>
+    
+    <dependency>
+      <groupId>org.ovirt.engine.core</groupId>
+      <artifactId>welcome</artifactId>
+      <version>${engine.version}</version>
+      <type>war</type>
+    </dependency>
 
     <!-- ** EJB-JARs -->
     <dependency>
@@ -186,14 +193,21 @@
               <groupId>org.ovirt.engine.ui</groupId>
               <artifactId>userportal</artifactId>
               <bundleFileName>userportal.war</bundleFileName>
-              <contextRoot>/UserPortal</contextRoot>
+              <contextRoot>/ovirt-engine/userportal</contextRoot>
             </webModule>
 
             <webModule>
               <groupId>org.ovirt.engine.ui</groupId>
               <artifactId>webadmin</artifactId>
               <bundleFileName>webadmin.war</bundleFileName>
-              <contextRoot>/webadmin</contextRoot>
+              <contextRoot>/ovirt-engine/webadmin</contextRoot>
+            </webModule>
+
+            <webModule>
+              <groupId>org.ovirt.engine.core</groupId>
+              <artifactId>welcome</artifactId>
+              <bundleFileName>welcome.war</bundleFileName>
+              <contextRoot>/ovirt-engine</contextRoot>
             </webModule>
 
             <!-- ** EJB-JARs -->
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
index 248eb80..db7eaaf 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/UserPortalHostPageServlet.java
@@ -10,7 +10,7 @@
 
     @Override
     protected String getSelectorScriptName() {
-        return "org.ovirt.engine.ui.userportal.UserPortal.nocache.js"; 
//$NON-NLS-1$
+        return "userportal.nocache.js"; //$NON-NLS-1$
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/frontend/src/main/resources/META-INF/web-fragment.xml
 
b/frontend/webadmin/modules/frontend/src/main/resources/META-INF/web-fragment.xml
index 184b7f6..7a898de 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/resources/META-INF/web-fragment.xml
+++ 
b/frontend/webadmin/modules/frontend/src/main/resources/META-INF/web-fragment.xml
@@ -87,7 +87,7 @@
         
<servlet-class>org.ovirt.engine.core.utils.servlet.PageNotFoundForwardServlet</servlet-class>
         <init-param>
             <param-name>targetContext</param-name>
-            <param-value>/</param-value>
+            <param-value>/ovirt-engine/</param-value>
         </init-param>
         <init-param>
             <param-name>pageNotFoundURI</param-name>
diff --git a/frontend/webadmin/modules/userportal-gwtp/pom.xml 
b/frontend/webadmin/modules/userportal-gwtp/pom.xml
index 25ae8a4..bced4d1 100644
--- a/frontend/webadmin/modules/userportal-gwtp/pom.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/pom.xml
@@ -152,6 +152,12 @@
         <artifactId>maven-war-plugin</artifactId>
         <configuration>
           
<packagingExcludes>WEB-INF/deploy/**,WEB-INF/classes/**</packagingExcludes>
+          <webResources>
+            <resource>
+              
<directory>${project.build.directory}/generated-gwt/userportal</directory>
+              <targetPath>.</targetPath>
+            </resource>
+          </webResources>
         </configuration>
       </plugin>
       <plugin>
@@ -216,6 +222,7 @@
             <configuration>
               
<runTarget>/UserPortal/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html</runTarget>
               <module>org.ovirt.engine.ui.userportal.UserPortal</module>
+              
<webappDirectory>${project.build.directory}/generated-gwt</webappDirectory>
             </configuration>
             <executions>
               <execution>
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
index 255ef1e..72df76a 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/UserPortal.gwt.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
        
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd";>
-<module rename-to="org.ovirt.engine.ui.userportal.UserPortal">
+<module rename-to="userportal">
 
        <!-- Inherit oVirt common GWT module -->
        <inherits name="org.ovirt.engine.ui.common.GwtCommon" />
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
index 019ffee..5258cf4 100644
--- a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml
@@ -32,19 +32,17 @@
 
     <filter-mapping>
         <filter-name>GwtCachingFilter</filter-name>
-        <url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/*</url-pattern>
-        <url-pattern>/theme/*</url-pattern>
-        <url-pattern>/theme-resource/*</url-pattern>
+        <url-pattern>/*</url-pattern>
     </filter-mapping>
 
     <servlet-mapping>
         <servlet-name>UserPortalHostPageServlet</servlet-name>
-        
<url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html</url-pattern>
+        <url-pattern>/UserPortal.html</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
         <servlet-name>GenericApiServlet</servlet-name>
-        
<url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/GenericApiGWTService</url-pattern>
+        <url-pattern>/GenericApiGWTService</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
@@ -64,7 +62,7 @@
 
     <!-- Default page to serve -->
     <welcome-file-list>
-        <welcome-file>index.html</welcome-file>
+        <welcome-file>UserPortal.html</welcome-file>
     </welcome-file-list>
 
     <!-- Error page to present -->
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/index.html 
b/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/index.html
deleted file mode 100644
index 256c609..0000000
--- a/frontend/webadmin/modules/userportal-gwtp/src/main/webapp/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="refresh" 
content="0;url=org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html">
-</head>
-</html>
diff --git a/frontend/webadmin/modules/webadmin/pom.xml 
b/frontend/webadmin/modules/webadmin/pom.xml
index 6f9d8c3..22b5763 100644
--- a/frontend/webadmin/modules/webadmin/pom.xml
+++ b/frontend/webadmin/modules/webadmin/pom.xml
@@ -152,6 +152,12 @@
         <artifactId>maven-war-plugin</artifactId>
         <configuration>
           
<packagingExcludes>WEB-INF/deploy/**,WEB-INF/classes/**</packagingExcludes>
+          <webResources>
+            <resource>
+              
<directory>${project.build.directory}/generated-gwt/webadmin</directory>
+              <targetPath>.</targetPath>
+            </resource>
+          </webResources>
         </configuration>
       </plugin>
       <plugin>
@@ -214,8 +220,9 @@
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>gwt-maven-plugin</artifactId>
             <configuration>
-              <runTarget>/webadmin/webadmin/WebAdmin.html</runTarget>
+              <runTarget>webadmin/WebAdmin.html</runTarget>
               <module>org.ovirt.engine.ui.webadmin.WebAdmin</module>
+              
<webappDirectory>${project.build.directory}/generated-gwt</webappDirectory>
             </configuration>
             <executions>
               <execution>
diff --git a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml 
b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
index 2e1ab84..ee76f7d 100644
--- a/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
+++ b/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml
@@ -33,24 +33,22 @@
 
        <filter-mapping>
                <filter-name>GwtCachingFilter</filter-name>
-               <url-pattern>/webadmin/*</url-pattern>
-               <url-pattern>/theme/*</url-pattern>
-               <url-pattern>/theme-resource/*</url-pattern>
+               <url-pattern>/*</url-pattern>
        </filter-mapping>
 
        <servlet-mapping>
                <servlet-name>WebAdminHostPageServlet</servlet-name>
-               <url-pattern>/webadmin/WebAdmin.html</url-pattern>
+               <url-pattern>/WebAdmin.html</url-pattern>
        </servlet-mapping>
 
        <servlet-mapping>
                <servlet-name>GenericApiServlet</servlet-name>
-               <url-pattern>/webadmin/GenericApiGWTService</url-pattern>
+               <url-pattern>/GenericApiGWTService</url-pattern>
        </servlet-mapping>
 
        <servlet-mapping>
                <servlet-name>PluginResourceServlet</servlet-name>
-               <url-pattern>/webadmin/plugin/*</url-pattern>
+               <url-pattern>/plugin/*</url-pattern>
        </servlet-mapping>
 
     <servlet-mapping>
@@ -70,7 +68,7 @@
 
        <!-- Default page to serve -->
        <welcome-file-list>
-               <welcome-file>index.html</welcome-file>
+               <welcome-file>WebAdmin.html</welcome-file>
        </welcome-file-list>
 
        <!-- Error page to present -->
diff --git a/frontend/webadmin/modules/webadmin/src/main/webapp/index.html 
b/frontend/webadmin/modules/webadmin/src/main/webapp/index.html
deleted file mode 100644
index 1b3da0c..0000000
--- a/frontend/webadmin/modules/webadmin/src/main/webapp/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="refresh" content="0;url=webadmin/WebAdmin.html">
-</head>
-</html>
\ No newline at end of file
diff --git a/packaging/branding/ovirt.brand/welcome_page.template 
b/packaging/branding/ovirt.brand/welcome_page.template
index f26ce53..efd3e01 100644
--- a/packaging/branding/ovirt.brand/welcome_page.template
+++ b/packaging/branding/ovirt.brand/welcome_page.template
@@ -3,10 +3,10 @@
     <span class="obrand_section_header">{portal_title}</span>
   </h2>
   <div>
-    <a 
href="/UserPortal/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html?locale={userLocale}">{portal_user_portal}</a>
+    <a 
href="/ovirt-engine/userportal/?locale={userLocale}">{portal_user_portal}</a>
   </div>
   <div>
-    <a 
href="/webadmin/webadmin/WebAdmin.html?locale={userLocale}">{portal_admin}</a>
+    <a href="/ovirt-engine/webadmin/?locale={userLocale}">{portal_admin}</a>
   </div>
   <div>
     <a href="/OvirtEngineWeb/ReportsRedirectServlet">{portal_reports}</a>


-- 
To view, visit http://gerrit.ovirt.org/20473
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cb4822f6bf4d372715e12858635db5ed3edd115
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <aw...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to