1. Juan Carlos Picado Herrera
  2. encuestame

Commits

Juan Carlos Picado Herrera  committed a78d658

Fixed ENCUESTAME-110 jetty7

  • Participants
  • Parent commits 6e1314f
  • Branches master

Comments (0)

Files changed (3)

File encuestame-war/pom.xml

View file
  • Ignore whitespace
                 </webResources>
             </configuration>
         </plugin> -->
-
-
-            <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-                <version>6.1.26</version>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.mortbay.jetty</groupId>
-                        <artifactId>jsp-2.1</artifactId>
-                        <version>6.1.14</version>
-                        <scope>provided</scope>
-                        <exclusions>
-                            <exclusion>
-                                <groupId>commons-el</groupId>
-                                <artifactId>commons-el</artifactId>
-                            </exclusion>
-                        </exclusions>
-                    </dependency>
-                </dependencies>
+        <plugin>
+           <groupId>org.mortbay.jetty</groupId>
+           <artifactId>jetty-maven-plugin</artifactId>
+           <version>${jetty-plugin-version}</version>
+           <dependencies>
+                <dependency>
+                   <groupId>org.mortbay.jetty</groupId>
+                   <artifactId>jetty-ssl</artifactId>
+                   <version>7.0.0.pre5</version>
+                </dependency>
+            </dependencies>
                 <configuration>
-                    <webAppConfig>
-                        <contextPath>/encuestame</contextPath>
-                    </webAppConfig>
                     <connectors>
-                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
-                            <port>${jetty.default.port}</port>
-                            <maxIdleTime>60000</maxIdleTime>
+                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+                             <port>${jetty.default.port}</port>
                         </connector>
-                        <connector implementation="org.mortbay.jetty.security.SslSocketConnector">
+                        <!--<connector implementation="org.mortbay.jetty.ssl.SslSelectChannelConnector">
                             <port>${jetty.default.ssl.port}</port>
-                            <maxIdleTime>60000</maxIdleTime>
                             <keystore>${project.build.directory}/jetty-ssl.keystore</keystore>
                             <password>jetty6</password>
                             <keyPassword>jetty6</keyPassword>
                         </connector>
-                    </connectors>
-                    <scanIntervalSeconds>5</scanIntervalSeconds>
-                    <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
-                        <filename>target/encuestame.log</filename>
-                        <retainDays>90</retainDays>
-                        <append>true</append>
-                        <extended>false</extended>
-                        <logTimeZone>GMT</logTimeZone>
-                    </requestLog>
-                </configuration>
+                 --></connectors>
+                    <webAppConfig>
+                        <contextPath>/encuestame</contextPath>
+                    </webAppConfig>
+                    <scanIntervalSeconds>10</scanIntervalSeconds><!--
+                        <requestLog implementation="org.mortbay.jetty.NCSARequestLog">
+                            <filename>target/encuestame.log</filename>
+                            <retainDays>90</retainDays>
+                            <append>true</append>
+                            <extended>false</extended>
+                            <logTimeZone>GMT</logTimeZone>
+                        </requestLog>
+                --></configuration>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
              <artifactId>jsp-api</artifactId>
              <scope>provided</scope>
        </dependency>
+       <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>bayeux-api</artifactId>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.cometd.javascript</groupId>-->
+<!--            <artifactId>cometd-javascript-dojo</artifactId>-->
+<!--            <type>war</type>-->
+<!--        </dependency>-->
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>cometd-java-server</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>cometd-java-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlets</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-client</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty-maven-plugin</artifactId>
+            <version>${jetty-plugin-version}</version>
+        </dependency>
     </dependencies>
 
     <repositories>
              <url>file:${basedir}/../lib/repository</url>
          </repository>
     </repositories>
+
 </project>

File encuestame-war/src/main/webapp/WEB-INF/web.xml

View file
  • Ignore whitespace
         <filter-name>springSecurityFilterChain</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
-<!--    <filter-mapping>-->
-<!--        <filter-name>VerifyAuthenticationFilter</filter-name>-->
-<!--        <url-pattern>/*</url-pattern>-->
-<!--    </filter-mapping>-->
     <filter-mapping>
         <filter-name>charEncodingFilter</filter-name>
         <url-pattern>/*</url-pattern>
         <filter-name>UrlRewriteFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
+
     <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
+
     <listener>
         <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
     </listener>
+
     <servlet>
         <servlet-name>encuestame-spring-dispacher</servlet-name>
         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
             <param-name>contextConfigLocation</param-name>
             <param-value />
         </init-param>
-        <load-on-startup>2</load-on-startup>
+        <load-on-startup>1</load-on-startup>
     </servlet>
     <servlet>
        <servlet-name>Resource Servlet</servlet-name>
        <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
     </servlet>
-<!--    <servlet>-->
-<!--	  <servlet-name>ViewRendererServlet</servlet-name>-->
-<!--	  <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class>-->
-<!--	</servlet>-->
     <servlet-mapping>
        <servlet-name>Resource Servlet</servlet-name>
        <url-pattern>/resources/*</url-pattern>
     </servlet-mapping>
-<!--    <servlet-mapping>-->
-<!--	  <servlet-name>ViewRendererServlet</servlet-name>-->
-<!--	  <url-pattern>/WEB-INF/servlet/view</url-pattern>-->
-<!--	</servlet-mapping>-->
+
     <!--
         Serves static resource content from .jar files such as
         spring-faces.jar
         <servlet-name>encuestame-spring-dispacher</servlet-name>
         <url-pattern>*.json</url-pattern>
     </servlet-mapping>
+
+   <!-- Cometd Servlet -->
+    <servlet>
+        <servlet-name>cometd</servlet-name>
+        <servlet-class>org.cometd.java.annotation.AnnotationCometdServlet</servlet-class>
+        <!--async-supported>true</async-supported-->
+        <init-param>
+            <param-name>timeout</param-name>
+            <param-value>20000</param-value>
+        </init-param>
+        <init-param>
+            <param-name>interval</param-name>
+            <param-value>0</param-value>
+        </init-param>
+        <init-param>
+            <param-name>maxInterval</param-name>
+            <param-value>10000</param-value>
+        </init-param>
+        <init-param>
+            <param-name>maxLazyTimeout</param-name>
+            <param-value>5000</param-value>
+        </init-param>
+        <init-param>
+            <param-name>long-polling.multiSessionInterval</param-name>
+            <param-value>2000</param-value>
+        </init-param>
+        <init-param>
+            <param-name>logLevel</param-name>
+            <param-value>0</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>cometd</servlet-name>
+        <url-pattern>/cometd/*</url-pattern>
+    </servlet-mapping>
+
     <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
+
 </web-app>

File pom.xml

View file
  • Ignore whitespace
         <hibernate.version>3.5.6-Final</hibernate.version>
         <hibernate.commons.annotations.version>3.2.0.Final</hibernate.commons.annotations.version>
         <hibernate.search.version>3.2.1.Final</hibernate.search.version>
-    <lucene.version>2.9.3</lucene.version>
+        <lucene.version>2.9.3</lucene.version>
 
         <!-- Twitter4J Version -->
         <twitter4j.version>2.1.6</twitter4j.version>
          -->
          <dojo.version>1.5.0</dojo.version>
          <webresources.javascript.location>encuestame-war/src/main/webapp/js</webresources.javascript.location>
+	
+	<!--CometD -->
+	<comet.version>2.1.0</comet.version>
 
-        <!-- Plugin Version -->
-    <surefire.version>2.6</surefire.version>
-    <site.version>2.1.1</site.version>
-
+         <!-- Plugin Version -->
+         <surefire.version>2.6</surefire.version>
+         <site.version>2.1.1</site.version>
+    	 <jetty7.version>7.2.2.v20101205</jetty7.version>
+         <jetty-plugin-version>${jetty7.version}</jetty-plugin-version>
      </properties>
 
     <modules>
             <artifactId>tiles-el</artifactId>
             <version>2.2.1</version>
         </dependency>
-     <!-- Apache Poi  -->
-      <dependency>
-    	<groupId>org.apache.poi</groupId>
-    	<artifactId>poi-scratchpad</artifactId>
-    	<version>3.0.1-FINAL</version>
-      </dependency>
-      <dependency>
-          <groupId>org.apache.poi</groupId>
-          <artifactId>poi</artifactId>
-          <version>3.7</version>
-      </dependency>  
-      <dependency>
-         <groupId>org.apache.poi</groupId>
-         <artifactId>poi-ooxml</artifactId>
-         <version>3.7</version>
-      </dependency> 
-     <!-- PDF Box -->
-      <dependency>
-           <groupId>pdfbox</groupId>
-    <artifactId>pdfbox</artifactId>
-    <version>0.7.3</version>
-      </dependency>
-    <dependency>
-           <groupId>com.google.api.client</groupId>
-           <artifactId>google-api-client</artifactId>
-           <version>1.2.2-alpha</version>
-       </dependency>
+        <!-- Apache Poi  -->
+        <dependency>
+    	   <groupId>org.apache.poi</groupId>
+    	   <artifactId>poi-scratchpad</artifactId>
+    	   <version>3.0.1-FINAL</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>3.7</version>
+        </dependency>  
+        <dependency>
+           <groupId>org.apache.poi</groupId>
+           <artifactId>poi-ooxml</artifactId>
+           <version>3.7</version>
+        </dependency> 
+        <!-- PDF Box -->
+        <dependency>
+            <groupId>pdfbox</groupId>
+            <artifactId>pdfbox</artifactId>
+            <version>0.7.3</version>
+        </dependency>
+        <dependency>
+             <groupId>com.google.api.client</groupId>
+             <artifactId>google-api-client</artifactId>
+             <version>1.2.2-alpha</version>
+        </dependency>
+  	<!-- CommetD -->
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>bayeux-api</artifactId>
+            <version>${comet.version}</version>
+        </dependency>
+       <!-- <
+	 dependency>
+            <groupId>org.cometd.javascript</groupId>
+            <artifactId>cometd-javascript-dojo</artifactId>
+            <version>${comet.version}</version>
+            <type>war</type>
+        </dependency>
+       -->
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>cometd-java-server</artifactId>
+            <version>${comet.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>cometd-java-annotations</artifactId>
+            <version>${comet.version}</version>
+        </dependency>
+                <dependency>
+            <groupId>org.cometd.javascript</groupId>
+            <artifactId>cometd-javascript-dojo</artifactId>
+            <version>${comet.version}</version>
+            <type>war</type>
+        </dependency>
+        <dependency>
+            <groupId>org.cometd.java</groupId>
+            <artifactId>cometd-java-oort</artifactId>
+            <version>${comet.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlets</artifactId>
+            <version>${jetty7.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-client</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
       </dependencies>
     </dependencyManagement>
 </project>