r328 - in trunk: . coser-web coser-web/src/main/java coser-web/src/main/java/fr coser-web/src/main/java/fr/ifremer coser-web/src/main/java/fr/ifremer/coser coser-web/src/main/java/fr/ifremer/coser/web coser-web/src/main/webapp/WEB-INF
Author: chatellier Date: 2010-12-01 17:15:55 +0000 (Wed, 01 Dec 2010) New Revision: 328 Log: Begin coser web module Added: trunk/coser-web/src/main/java/fr/ trunk/coser-web/src/main/java/fr/ifremer/ trunk/coser-web/src/main/java/fr/ifremer/coser/ trunk/coser-web/src/main/java/fr/ifremer/coser/web/ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserServlet.java Modified: trunk/coser-web/pom.xml trunk/coser-web/src/main/webapp/WEB-INF/web.xml trunk/pom.xml Modified: trunk/coser-web/pom.xml =================================================================== --- trunk/coser-web/pom.xml 2010-12-01 16:27:39 UTC (rev 327) +++ trunk/coser-web/pom.xml 2010-12-01 17:15:55 UTC (rev 328) @@ -32,6 +32,10 @@ <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </dependency> + <dependency> + <groupId>org.eclipse.jetty.aggregate</groupId> + <artifactId>jetty-webapp</artifactId> + </dependency> </dependencies> <name>Coser :: Web</name> @@ -42,4 +46,53 @@ <properties> <license.licenseName>agpl_v3</license.licenseName> </properties> + + <build> + <finalName>coser-${project.version}</finalName> + + <!-- Add main class into war to make it executable --> + <plugins> + <plugin> + <artifactId>maven-war-plugin</artifactId> + <configuration> + <archive> + <manifest> + <mainClass>org.nuiton.util.war.JettyLauncher</mainClass> + </manifest> + </archive> + <overlays> + <overlay> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-utils</artifactId> + <type>jar</type> + <includes> + <include>**/war/Jetty*</include> + </includes> + </overlay> + <overlay> + <groupId>org.eclipse.jetty.aggregate</groupId> + <artifactId>jetty-webapp</artifactId> + <type>jar</type> + </overlay> + <overlay> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <type>jar</type> + </overlay> + </overlays> + </configuration> + </plugin> + <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> + <configuration> + <connectors> + <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> + <port>9000</port> + </connector> + </connectors> + </configuration> + </plugin> + </plugins> + </build> </project> Added: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserServlet.java =================================================================== --- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserServlet.java (rev 0) +++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserServlet.java 2010-12-01 17:15:55 UTC (rev 328) @@ -0,0 +1,56 @@ +/* + * #%L + * + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +package fr.ifremer.coser.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Coser main servlet. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class CoserServlet extends HttpServlet { + + /** serialVersionUID. */ + private static final long serialVersionUID = 8814522533745401133L; + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + resp.getWriter().print("Coser : It's works"); + } + + +} Property changes on: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserServlet.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/coser-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2010-12-01 16:27:39 UTC (rev 327) +++ trunk/coser-web/src/main/webapp/WEB-INF/web.xml 2010-12-01 17:15:55 UTC (rev 328) @@ -6,7 +6,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2010 Ifremer, Codelutin + Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -23,10 +23,20 @@ #L% --> -<!DOCTYPE web-app - PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.5//EN" - "http://java.sun.com/dtd/web-app_2_5.dtd"> -<web-app> +<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"> <display-name>Coser</display-name> + + <servlet> + <servlet-name>coser</servlet-name> + <servlet-class>fr.ifremer.coser.web.CoserServlet</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>coser</servlet-name> + <url-pattern>/coser</url-pattern> + </servlet-mapping> + </web-app> - Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-12-01 16:27:39 UTC (rev 327) +++ trunk/pom.xml 2010-12-01 17:15:55 UTC (rev 328) @@ -17,7 +17,7 @@ <modules> <module>coser-business</module> <module>coser-ui</module> - <!-- <module>coser-web</module> --> + <module>coser-web</module> </modules> <dependencyManagement> @@ -187,6 +187,12 @@ <version>3.8.0.GA</version> <scope>runtime</scope> </dependency> + <dependency> + <groupId>org.eclipse.jetty.aggregate</groupId> + <artifactId>jetty-webapp</artifactId> + <version>7.2.1.v20101111</version> + <scope>provided</scope> + </dependency> </dependencies> </dependencyManagement> @@ -253,6 +259,11 @@ </configuration> </plugin> <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>jetty-maven-plugin</artifactId> + <version>7.2.1.v20101111</version> + </plugin> + <plugin> <artifactId>maven-site-plugin</artifactId> <configuration> <locales>fr,en</locales>
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org